Reorder blocks
curl --request PUT \
--url https://{domain}/api/v1/biolinks/pages/{page}/blocks/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"blocks": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://{domain}/api/v1/biolinks/pages/{page}/blocks/order"
payload = { "blocks": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({blocks: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://{domain}/api/v1/biolinks/pages/{page}/blocks/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://{domain}/api/v1/biolinks/pages/{page}/blocks/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([
'blocks' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$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://{domain}/api/v1/biolinks/pages/{page}/blocks/order"
payload := strings.NewReader("{\n \"blocks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("If-Match", "<if-match>")
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://{domain}/api/v1/biolinks/pages/{page}/blocks/order")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"blocks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v1/biolinks/pages/{page}/blocks/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"blocks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"revision": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"domain": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"public_url": "<string>",
"title": "<string>",
"handle": "<string>",
"tagline": "<string>",
"theme": "<string>",
"status": "active",
"disabled": true,
"verified": true,
"hide_branding": true,
"avatar_color": "<string>",
"appearance": {},
"has_password": true,
"settings": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Blocks
Reorder blocks
Send every block ID of the page exactly once, in the new order.
Required permission: biolinks:pages:write
Changing an active page also needs biolinks:pages:publish.
PUT
/
pages
/
{page}
/
blocks
/
order
Reorder blocks
curl --request PUT \
--url https://{domain}/api/v1/biolinks/pages/{page}/blocks/order \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"blocks": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://{domain}/api/v1/biolinks/pages/{page}/blocks/order"
payload = { "blocks": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({blocks: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://{domain}/api/v1/biolinks/pages/{page}/blocks/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://{domain}/api/v1/biolinks/pages/{page}/blocks/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([
'blocks' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$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://{domain}/api/v1/biolinks/pages/{page}/blocks/order"
payload := strings.NewReader("{\n \"blocks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("If-Match", "<if-match>")
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://{domain}/api/v1/biolinks/pages/{page}/blocks/order")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"blocks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{domain}/api/v1/biolinks/pages/{page}/blocks/order")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"blocks\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"revision": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"domain": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"public_url": "<string>",
"title": "<string>",
"handle": "<string>",
"tagline": "<string>",
"theme": "<string>",
"status": "active",
"disabled": true,
"verified": true,
"hide_branding": true,
"avatar_color": "<string>",
"appearance": {},
"has_password": true,
"settings": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Authorizations
bearerAuthapiKeyHeader
A workspace API key: Authorization: Bearer osk_...
Headers
The current revision in quotes, from the resource's ETag. Missing returns 428; out of date returns 412.
Example:
"\"a1b2c3\""
Path Parameters
Page ID.
Body
application/json
Maximum array length:
200Response
200 - application/json
Success
Show child attributes
Show child attributes