`GET /api/scripts/{id}/revisions/{version}` -- fetch one prior revision with its full `source` so the revisions tab can diff it against the current script source (ADR 0030 UX3-E). 404 for an unknown id/version or one in another workspace.
GET
/api/scripts/{id}/revisions/{version}
const url = 'https://example.com/api/scripts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/revisions/1';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/scripts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/revisions/1Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
version
required
integer format: int32
Responses
Section titled “Responses”Media typeapplication/json
One historical revision of a Script (ADR 0030 UX3-E). version_number is
monotonic per script; author is the user whose edit produced this revision
(NULL for repo-sync / system edits).
object
author
string | null format: uuid
created_at
required
string format: date-time
id
required
string format: uuid
script_id
required
string format: uuid
source
required
string
version_number
required
integer format: int32
Examplegenerated
{ "author": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "created_at": "2026-04-15T12:00:00Z", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "script_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "source": "example", "version_number": 1}