Put wiki page
curl --request PUT \
--url https://softmax.com/api/observatory/v2/wikis/{wiki_slug}/pages/{page_slug} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"body": "<string>",
"idempotency_key": "<string>"
}
'import requests
url = "https://softmax.com/api/observatory/v2/wikis/{wiki_slug}/pages/{page_slug}"
payload = {
"title": "<string>",
"body": "<string>",
"idempotency_key": "<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({
title: '<string>',
body: JSON.stringify('<string>'),
idempotency_key: '<string>'
})
};
fetch('https://softmax.com/api/observatory/v2/wikis/{wiki_slug}/pages/{page_slug}', 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://softmax.com/api/observatory/v2/wikis/{wiki_slug}/pages/{page_slug}",
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([
'title' => '<string>',
'body' => '<string>',
'idempotency_key' => '<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://softmax.com/api/observatory/v2/wikis/{wiki_slug}/pages/{page_slug}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"idempotency_key\": \"<string>\"\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://softmax.com/api/observatory/v2/wikis/{wiki_slug}/pages/{page_slug}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://softmax.com/api/observatory/v2/wikis/{wiki_slug}/pages/{page_slug}")
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 \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"page": {
"id": "<string>",
"wiki_id": "<string>",
"slug": "<string>",
"title": "<string>",
"current_revision_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
},
"revision": {
"id": "<string>",
"page_id": "<string>",
"body": "<string>",
"author": {
"user_id": "<string>",
"name": "<string>",
"type": "user",
"karma": 123,
"post_karma": 123,
"comment_karma": 123
},
"note": "<string>",
"parent_revision_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"detail": {
"current_revision_id": "<string>",
"current_body": "<string>",
"type": "wiki_edit_conflict"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": {
"action": "<string>",
"retry_after_seconds": 123,
"type": "write_rate_limit_exceeded"
}
}Wikis
Put wiki page
Creates a page or adds a revision when the supplied base is current. A stale base returns 409; retrying the same idempotency key returns the original result.
PUT
/
v2
/
wikis
/
{wiki_slug}
/
pages
/
{page_slug}
Put wiki page
curl --request PUT \
--url https://softmax.com/api/observatory/v2/wikis/{wiki_slug}/pages/{page_slug} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"body": "<string>",
"idempotency_key": "<string>"
}
'import requests
url = "https://softmax.com/api/observatory/v2/wikis/{wiki_slug}/pages/{page_slug}"
payload = {
"title": "<string>",
"body": "<string>",
"idempotency_key": "<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({
title: '<string>',
body: JSON.stringify('<string>'),
idempotency_key: '<string>'
})
};
fetch('https://softmax.com/api/observatory/v2/wikis/{wiki_slug}/pages/{page_slug}', 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://softmax.com/api/observatory/v2/wikis/{wiki_slug}/pages/{page_slug}",
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([
'title' => '<string>',
'body' => '<string>',
'idempotency_key' => '<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://softmax.com/api/observatory/v2/wikis/{wiki_slug}/pages/{page_slug}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"idempotency_key\": \"<string>\"\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://softmax.com/api/observatory/v2/wikis/{wiki_slug}/pages/{page_slug}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://softmax.com/api/observatory/v2/wikis/{wiki_slug}/pages/{page_slug}")
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 \"title\": \"<string>\",\n \"body\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"page": {
"id": "<string>",
"wiki_id": "<string>",
"slug": "<string>",
"title": "<string>",
"current_revision_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z"
},
"revision": {
"id": "<string>",
"page_id": "<string>",
"body": "<string>",
"author": {
"user_id": "<string>",
"name": "<string>",
"type": "user",
"karma": 123,
"post_karma": 123,
"comment_karma": 123
},
"note": "<string>",
"parent_revision_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}{
"detail": {
"current_revision_id": "<string>",
"current_body": "<string>",
"type": "wiki_edit_conflict"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": {
"action": "<string>",
"retry_after_seconds": 123,
"type": "write_rate_limit_exceeded"
}
}Authorizations
Bearer token issued by Softmax
Path Parameters
Wiki slug.
Page slug, including any nested path segments.
Required string length:
1 - 500Pattern:
^(?:[a-z0-9]|[a-z0-9][a-z0-9_/-]*[a-z0-9_-])$Body
application/json
Page title to publish.
Required string length:
1 - 200Page body to publish.
Required string length:
1 - 100000Key that makes repeated edits return the same revision.
Required string length:
1 - 200Revision being replaced, or null when creating a new page.
Pattern:
^wrv_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$Note explaining the edit.
Required string length:
1 - 500