Revisions
curl --request POST \
--url https://api.aisa.one/apis/v1/stackexchange-com/questions/revisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"revision_guid": "CB322AD9-6248-4D59-9ABA-D85C2D000877"
}
'import requests
url = "https://api.aisa.one/apis/v1/stackexchange-com/questions/revisions"
payload = { "revision_guid": "CB322AD9-6248-4D59-9ABA-D85C2D000877" }
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({revision_guid: 'CB322AD9-6248-4D59-9ABA-D85C2D000877'})
};
fetch('https://api.aisa.one/apis/v1/stackexchange-com/questions/revisions', 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.aisa.one/apis/v1/stackexchange-com/questions/revisions",
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([
'revision_guid' => 'CB322AD9-6248-4D59-9ABA-D85C2D000877'
]),
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.aisa.one/apis/v1/stackexchange-com/questions/revisions"
payload := strings.NewReader("{\n \"revision_guid\": \"CB322AD9-6248-4D59-9ABA-D85C2D000877\"\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.aisa.one/apis/v1/stackexchange-com/questions/revisions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"revision_guid\": \"CB322AD9-6248-4D59-9ABA-D85C2D000877\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/stackexchange-com/questions/revisions")
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 \"revision_guid\": \"CB322AD9-6248-4D59-9ABA-D85C2D000877\"\n}"
response = http.request(request)
puts response.read_body{
"count": 1,
"has_more": false,
"history_url": "https://stackoverflow.com/posts/3940144/revisions",
"observed_at_ms": 1792000000000,
"page": 1,
"post_id": 3940144,
"quota": {
"backoff_seconds": null,
"max": 300,
"remaining": 280
},
"revision_guid": "CB322AD9-6248-4D59-9ABA-D85C2D000877",
"revisions": [
{
"body_html": "<p>To get a <em>new</em> reversed list, apply the <a href=\"https://docs.python.org/3/library/functions.html#reversed\" rel=\"nofollow noreferrer\"><code>reversed</code></a> function and collect the items into a <a href=\"https://docs.python.org/3/library/stdtypes.html#list\" rel=\"nofollow noreferrer\"><code>list</code></a>:</p>\n<pre><code>>>> xs = [0, 10, 20, 40]\n>>> list(reversed(xs))\n[40, 20, 10, 0]\n</code></pre>\n<p>To iterate backwards through a list:</p>\n<pre><code>>>> xs = [0, 10, 20, 40]\n>>> for x in reversed(xs):\n... print(x)\n40\n20\n10\n0\n</code></pre>\n",
"comment": "Accuracy.",
"content_license": "CC BY-SA 4.0",
"created_at_ms": 1660588390000,
"is_rollback": false,
"last_tags": null,
"last_title": null,
"post_id": 3940144,
"post_type": "answer",
"revision_guid": "CB322AD9-6248-4D59-9ABA-D85C2D000877",
"revision_number": 11,
"revision_type": "single_user",
"set_community_wiki": false,
"site": "stackoverflow",
"source_url": "https://stackoverflow.com/revisions/3940144/11",
"tags": null,
"title": null,
"user": {
"display_name": "Mateen Ulhaq",
"link": "https://stackoverflow.com/users/365102/mateen-ulhaq",
"reputation": 28128,
"user_id": 365102,
"user_type": "registered"
}
}
],
"site": "stackoverflow",
"source_url": "https://api.stackexchange.com/2.3/revisions/CB322AD9-6248-4D59-9ABA-D85C2D000877?site=stackoverflow&page=1&pagesize=30&filter=%2120aKG._8Oscv*6c2blRrG",
"total": 1
}
Stack Exchange
Revisions
Edit history of one question or answer by post_id or URL, newest first, or one revision by revision_guid. Each revision carries what changed (title, tags, body HTML), the editor, the edit comment and its public revision page.
POST
https://api.aisa.one
/
apis
/
v1
/
stackexchange-com
/
questions
/
revisions
Revisions
curl --request POST \
--url https://api.aisa.one/apis/v1/stackexchange-com/questions/revisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"revision_guid": "CB322AD9-6248-4D59-9ABA-D85C2D000877"
}
'import requests
url = "https://api.aisa.one/apis/v1/stackexchange-com/questions/revisions"
payload = { "revision_guid": "CB322AD9-6248-4D59-9ABA-D85C2D000877" }
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({revision_guid: 'CB322AD9-6248-4D59-9ABA-D85C2D000877'})
};
fetch('https://api.aisa.one/apis/v1/stackexchange-com/questions/revisions', 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.aisa.one/apis/v1/stackexchange-com/questions/revisions",
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([
'revision_guid' => 'CB322AD9-6248-4D59-9ABA-D85C2D000877'
]),
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.aisa.one/apis/v1/stackexchange-com/questions/revisions"
payload := strings.NewReader("{\n \"revision_guid\": \"CB322AD9-6248-4D59-9ABA-D85C2D000877\"\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.aisa.one/apis/v1/stackexchange-com/questions/revisions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"revision_guid\": \"CB322AD9-6248-4D59-9ABA-D85C2D000877\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/stackexchange-com/questions/revisions")
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 \"revision_guid\": \"CB322AD9-6248-4D59-9ABA-D85C2D000877\"\n}"
response = http.request(request)
puts response.read_body{
"count": 1,
"has_more": false,
"history_url": "https://stackoverflow.com/posts/3940144/revisions",
"observed_at_ms": 1792000000000,
"page": 1,
"post_id": 3940144,
"quota": {
"backoff_seconds": null,
"max": 300,
"remaining": 280
},
"revision_guid": "CB322AD9-6248-4D59-9ABA-D85C2D000877",
"revisions": [
{
"body_html": "<p>To get a <em>new</em> reversed list, apply the <a href=\"https://docs.python.org/3/library/functions.html#reversed\" rel=\"nofollow noreferrer\"><code>reversed</code></a> function and collect the items into a <a href=\"https://docs.python.org/3/library/stdtypes.html#list\" rel=\"nofollow noreferrer\"><code>list</code></a>:</p>\n<pre><code>>>> xs = [0, 10, 20, 40]\n>>> list(reversed(xs))\n[40, 20, 10, 0]\n</code></pre>\n<p>To iterate backwards through a list:</p>\n<pre><code>>>> xs = [0, 10, 20, 40]\n>>> for x in reversed(xs):\n... print(x)\n40\n20\n10\n0\n</code></pre>\n",
"comment": "Accuracy.",
"content_license": "CC BY-SA 4.0",
"created_at_ms": 1660588390000,
"is_rollback": false,
"last_tags": null,
"last_title": null,
"post_id": 3940144,
"post_type": "answer",
"revision_guid": "CB322AD9-6248-4D59-9ABA-D85C2D000877",
"revision_number": 11,
"revision_type": "single_user",
"set_community_wiki": false,
"site": "stackoverflow",
"source_url": "https://stackoverflow.com/revisions/3940144/11",
"tags": null,
"title": null,
"user": {
"display_name": "Mateen Ulhaq",
"link": "https://stackoverflow.com/users/365102/mateen-ulhaq",
"reputation": 28128,
"user_id": 365102,
"user_type": "registered"
}
}
],
"site": "stackoverflow",
"source_url": "https://api.stackexchange.com/2.3/revisions/CB322AD9-6248-4D59-9ABA-D85C2D000877?site=stackoverflow&page=1&pagesize=30&filter=%2120aKG._8Oscv*6c2blRrG",
"total": 1
}
Request contract
- Method and path: POST /apis/v1/stackexchange-com/questions/revisions
- Availability: enabled
- Request URL template:
https://api.aisa.one/apis/v1/stackexchange-com/questions/revisions
{
"operationId": "stackexchange-com.questions.revisions",
"method": "POST",
"path": "/apis/v1/stackexchange-com/questions/revisions",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"examples": {
"provider": {
"summary": "Official provider example; checked against AIsa request constraints",
"value": {
"revision_guid": "CB322AD9-6248-4D59-9ABA-D85C2D000877"
}
}
},
"schema": {
"additionalProperties": true,
"allOf": [
{
"anyOf": [
{
"properties": {
"post_id": {}
},
"required": [
"post_id"
]
},
{
"properties": {
"revision_guid": {}
},
"required": [
"revision_guid"
]
},
{
"properties": {
"url": {}
},
"required": [
"url"
]
}
]
}
],
"properties": {
"include_body": {
"description": "include_body",
"type": "boolean",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"key": {
"description": "Optional Stack Exchange application key. Raises the per-IP quota from 300 to 10,000 requests per day and unlocks pages above 25, which the API refuses anonymously. Keys are public identifiers, not secrets.",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"page": {
"default": 1,
"description": "Pages above 25 need `key`: Stack Exchange serves deeper pages only with an application key (`access_denied` otherwise). Without one the last page reports partial coverage.\n\nProvider reference: minimum 1; maximum 10000; default 1.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 10000,
"min": 1
}
},
"pagesize": {
"default": 30,
"description": "pagesize\n\nProvider reference: minimum 1; maximum 100; default 30.",
"type": "number",
"x-alexandria-option-metadata": {
"in": "body",
"max": 100,
"min": 1
}
},
"post_id": {
"description": "post_id",
"type": "number"
},
"revision_guid": {
"description": "One revision by its GUID, as in /revisions/<guid>/view-source links. Pattern: ^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$.",
"type": "string"
},
"site": {
"default": "stackoverflow",
"description": "Stack Exchange site API parameter, e.g. stackoverflow, superuser, math, askubuntu, english, physics. Use `sites` to list them. Pattern: ^[a-z0-9]+(\\.[a-z0-9]+)*$.\n\nProvider reference: default \"stackoverflow\".",
"type": "string",
"x-alexandria-option-metadata": {
"in": "body"
}
},
"url": {
"description": "A pasted revision history URL (/posts/<id>/revisions), revision source URL (/revisions/<guid>/view-source) or revision page URL (/revisions/<post_id>/<n>, returns the whole history) on any Stack Exchange site. The site is derived from the host; an explicit `site` must match it.",
"type": "string"
}
},
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Usage-based pricing. Default request estimate: $0.0005 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.Authorizations
Body
application/json
- Option 1
- Option 2
- Option 3
Response
Edit history of one question or answer by post_id or URL, newest first, or one revision by revision_guid. Each revision carries what changed (title, tags, body HTML), the editor, the edit comment and its public revision page.
The response contains the tool result directly.
| Documented field | Provider type | Description |
|---|---|---|
count | number | |
has_more | boolean | |
history_url | string | Public revision history page of the post. |
observed_at_ms | number | |
page | number | |
post_id | number | |
quota | object | |
revision_guid | string | |
revisions | object[] | |
site | string | |
source_url | string | |
total | number |
These are the provider's documented fields. Field requiredness, nullability and nested object structures are specified only where the descriptions explicitly say so.