Reorder articles
curl --request PUT \
--url https://api.gleap.io/v3/helpcenter/collections/{helpcenterCollectionId}/articles/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"articleIds": [
"<string>"
]
}
'import requests
url = "https://api.gleap.io/v3/helpcenter/collections/{helpcenterCollectionId}/articles/order"
payload = { "articleIds": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({articleIds: ['<string>']})
};
fetch('https://api.gleap.io/v3/helpcenter/collections/{helpcenterCollectionId}/articles/order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gleap.io/v3/helpcenter/collections/{helpcenterCollectionId}/articles/order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'articleIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gleap.io/v3/helpcenter/collections/{helpcenterCollectionId}/articles/order"
payload := strings.NewReader("{\n \"articleIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.gleap.io/v3/helpcenter/collections/{helpcenterCollectionId}/articles/order")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"articleIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gleap.io/v3/helpcenter/collections/{helpcenterCollectionId}/articles/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"articleIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"updatedAt": "<string>",
"createdAt": "<string>",
"sourceUsage": 123,
"version": 123,
"isDraft": true,
"targetAudience": "<string>",
"tags": [
"<string>"
],
"extendedAudienceFilter": "<unknown>",
"baseAudienceFilter": "<unknown>",
"docId": 123,
"author": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"helpcenterCollection": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"upvotes": "<unknown>",
"plainContent": "<unknown>",
"lexorank": "<string>",
"project": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"externalId": "<string>",
"content": "<unknown>",
"title": "<unknown>",
"description": "<unknown>"
}
]Help center articles
Reorder articles
Set the order of the articles in a collection. Send every article id in the order they should appear; the server rewrites all of the collection’s ranks so the order is exact and stable. Articles left out of the list keep their relative order and follow the listed ones. Returns the collection’s articles in their new order.
PUT
/
helpcenter
/
collections
/
{helpcenterCollectionId}
/
articles
/
order
Reorder articles
curl --request PUT \
--url https://api.gleap.io/v3/helpcenter/collections/{helpcenterCollectionId}/articles/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"articleIds": [
"<string>"
]
}
'import requests
url = "https://api.gleap.io/v3/helpcenter/collections/{helpcenterCollectionId}/articles/order"
payload = { "articleIds": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({articleIds: ['<string>']})
};
fetch('https://api.gleap.io/v3/helpcenter/collections/{helpcenterCollectionId}/articles/order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gleap.io/v3/helpcenter/collections/{helpcenterCollectionId}/articles/order",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'articleIds' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gleap.io/v3/helpcenter/collections/{helpcenterCollectionId}/articles/order"
payload := strings.NewReader("{\n \"articleIds\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.gleap.io/v3/helpcenter/collections/{helpcenterCollectionId}/articles/order")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"articleIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gleap.io/v3/helpcenter/collections/{helpcenterCollectionId}/articles/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"articleIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"updatedAt": "<string>",
"createdAt": "<string>",
"sourceUsage": 123,
"version": 123,
"isDraft": true,
"targetAudience": "<string>",
"tags": [
"<string>"
],
"extendedAudienceFilter": "<unknown>",
"baseAudienceFilter": "<unknown>",
"docId": 123,
"author": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"helpcenterCollection": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"upvotes": "<unknown>",
"plainContent": "<unknown>",
"lexorank": "<string>",
"project": {
"isValid": {},
"createFromHexString": {},
"createFromTime": {},
"generate": {},
"cacheHexString": "<unknown>"
},
"externalId": "<string>",
"content": "<unknown>",
"title": "<unknown>",
"description": "<unknown>"
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The ids of this collection's articles, in the order they should be shown. Articles of the collection that are left out keep their relative order and are appended after the listed ones.
Response
200 - application/json
Ok
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I