Reorder category articles
curl --request PATCH \
--url https://{your-subdomain}.neetokb.com/api/external/v2/categories/{category_id}/article_order \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"article_ids": [
"getting-started",
"a-84af178b"
]
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({article_ids: ['getting-started', 'a-84af178b']})
};
fetch('https://{your-subdomain}.neetokb.com/api/external/v2/categories/{category_id}/article_order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetokb.com/api/external/v2/categories/{category_id}/article_order"
payload = { "article_ids": ["getting-started", "a-84af178b"] }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"articles": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"title": "<string>",
"sequence": 123
}
]
}{
"error": "<string>"
}Categories
Reorder category articles
This API sets the order of articles in a category. Listed articles get positions 1 to n. Articles of the category that you leave out follow in their current order. The put method works too. For CLI sessions, this needs the Manage categories permission.
PATCH
/
categories
/
{category_id}
/
article_order
Reorder category articles
curl --request PATCH \
--url https://{your-subdomain}.neetokb.com/api/external/v2/categories/{category_id}/article_order \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"article_ids": [
"getting-started",
"a-84af178b"
]
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({article_ids: ['getting-started', 'a-84af178b']})
};
fetch('https://{your-subdomain}.neetokb.com/api/external/v2/categories/{category_id}/article_order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{your-subdomain}.neetokb.com/api/external/v2/categories/{category_id}/article_order"
payload = { "article_ids": ["getting-started", "a-84af178b"] }
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"articles": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"title": "<string>",
"sequence": 123
}
]
}{
"error": "<string>"
}Replace
Learn how to find your subdomain in Workspace subdomain.
{your-subdomain} with your workspace’s subdomain. Learn how to find your subdomain in Workspace subdomain.
Headers
Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.
Path Parameters
Category ID or slug.
Body
application/json
Articles in the order you want, each given by slug, permalink identifier or UUID. Each must be in this category. No repeats.
Example:
["getting-started", "a-84af178b"]