Reorder a collection/page
curl --request POST \
--url https://api.orgnise.in/collections/reorder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "1",
"parent": "2",
"index": 3,
"object": "item"
}
'import requests
url = "https://api.orgnise.in/collections/reorder"
payload = {
"id": "1",
"parent": "2",
"index": 3,
"object": "item"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: '1', parent: '2', index: 3, object: 'item'})
};
fetch('https://api.orgnise.in/collections/reorder', 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.orgnise.in/collections/reorder",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '1',
'parent' => '2',
'index' => 3,
'object' => 'item'
]),
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.orgnise.in/collections/reorder"
payload := strings.NewReader("{\n \"id\": \"1\",\n \"parent\": \"2\",\n \"index\": 3,\n \"object\": \"item\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.orgnise.in/collections/reorder")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"1\",\n \"parent\": \"2\",\n \"index\": 3,\n \"object\": \"item\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orgnise.in/collections/reorder")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"1\",\n \"parent\": \"2\",\n \"index\": 3,\n \"object\": \"item\"\n}"
response = http.request(request)
puts response.read_body{
"message": ""
}{
"error": {
"code": "bad_request",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#bad_request"
}
}{
"error": {
"code": "unauthorized",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#unauthorized"
}
}{
"error": {
"code": "forbidden",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#forbidden"
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#not_found"
}
}{
"error": {
"code": "conflict",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#conflict"
}
}{
"error": {
"code": "invite_expired",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#invite_expired"
}
}{
"error": {
"code": "unprocessable_entity",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#unprocessable_entity"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#rate_limit_exceeded"
}
}{
"error": {
"code": "internal_server_error",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#internal_server_error"
}
}collections
Reorder a collection/page
Reorder a collection/page within or outside a collection. This will change the order of the collection/page in the collection.
POST
/
collections
/
reorder
Reorder a collection/page
curl --request POST \
--url https://api.orgnise.in/collections/reorder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "1",
"parent": "2",
"index": 3,
"object": "item"
}
'import requests
url = "https://api.orgnise.in/collections/reorder"
payload = {
"id": "1",
"parent": "2",
"index": 3,
"object": "item"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: '1', parent: '2', index: 3, object: 'item'})
};
fetch('https://api.orgnise.in/collections/reorder', 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.orgnise.in/collections/reorder",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '1',
'parent' => '2',
'index' => 3,
'object' => 'item'
]),
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.orgnise.in/collections/reorder"
payload := strings.NewReader("{\n \"id\": \"1\",\n \"parent\": \"2\",\n \"index\": 3,\n \"object\": \"item\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.orgnise.in/collections/reorder")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"1\",\n \"parent\": \"2\",\n \"index\": 3,\n \"object\": \"item\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orgnise.in/collections/reorder")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"1\",\n \"parent\": \"2\",\n \"index\": 3,\n \"object\": \"item\"\n}"
response = http.request(request)
puts response.read_body{
"message": ""
}{
"error": {
"code": "bad_request",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#bad_request"
}
}{
"error": {
"code": "unauthorized",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#unauthorized"
}
}{
"error": {
"code": "forbidden",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#forbidden"
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#not_found"
}
}{
"error": {
"code": "conflict",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#conflict"
}
}{
"error": {
"code": "invite_expired",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#invite_expired"
}
}{
"error": {
"code": "unprocessable_entity",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#unprocessable_entity"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#rate_limit_exceeded"
}
}{
"error": {
"code": "internal_server_error",
"message": "The requested resource was not found.",
"doc_url": "https://docs.orgnise.in/api-reference/errors#internal_server_error"
}
}Authorizations
Default authentication mechanism
Path Parameters
The slug of the team.
The slug of the workspace.
Body
application/json
Reorder a collection/page.
The id of the collection/page to reorder.
The index to move the collection to.
The parent collection/page id.
The new parent collection/page id.
Object describes the type of the collection/page . Collections will be of type 'collection' and pages will be of type 'item'.
Response
The created collection/page
Was this page helpful?
⌘I