curl --request GET \
--url https://api.erstan.com/v1/public/authoring/agents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.erstan.com/v1/public/authoring/agents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.erstan.com/v1/public/authoring/agents/{id}', 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.erstan.com/v1/public/authoring/agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.erstan.com/v1/public/authoring/agents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.erstan.com/v1/public/authoring/agents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erstan.com/v1/public/authoring/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"agent": {
"name": "<string>",
"description": "<string>",
"category": "<string>",
"tags": [
"<string>"
],
"difficulty": "<string>",
"estimatedTime": "<string>",
"behaviorType": "interactive",
"runAsSelf": true,
"nodes": [
{}
],
"edges": [
{}
],
"id": "<string>",
"status": "<string>",
"currentVersion": 2,
"publishedVersion": 2,
"defaultTeamId": "<string>",
"revision": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"isEditable": true,
"presentationKnown": true
},
"builderUrl": "<string>",
"selectedVersion": 123,
"issuedWebhookCredentials": [
{}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"requestId": "<string>"
}
}get agent authoring content
Requires the stagedAuthoring workspace capability. Reads require agents:read; lists also require agents:list; writes and validation require agents:read plus agents:write. Saving stages content; publication is a separate operation. Current permissions are checked again on every retry. Multi-resource operations are not atomic.
curl --request GET \
--url https://api.erstan.com/v1/public/authoring/agents/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.erstan.com/v1/public/authoring/agents/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.erstan.com/v1/public/authoring/agents/{id}', 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.erstan.com/v1/public/authoring/agents/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.erstan.com/v1/public/authoring/agents/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.erstan.com/v1/public/authoring/agents/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erstan.com/v1/public/authoring/agents/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"agent": {
"name": "<string>",
"description": "<string>",
"category": "<string>",
"tags": [
"<string>"
],
"difficulty": "<string>",
"estimatedTime": "<string>",
"behaviorType": "interactive",
"runAsSelf": true,
"nodes": [
{}
],
"edges": [
{}
],
"id": "<string>",
"status": "<string>",
"currentVersion": 2,
"publishedVersion": 2,
"defaultTeamId": "<string>",
"revision": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"isEditable": true,
"presentationKnown": true
},
"builderUrl": "<string>",
"selectedVersion": 123,
"issuedWebhookCredentials": [
{}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"requestId": "<string>"
}
}Authorizations
Workspace API key created in Erstan Settings. Keys carry scopes (agents:list, agents:read, agents:write, agents:run, runs:read, tasks:execute, documents:read, documents:write, files:read, files:write). Agent access follows the key creator's current workspace, team, and agent permissions. Agent draft creation requires agents:write; update, validation, and publishing require both agents:read and agents:write; draft testing also requires agents:run. Keys with tasks:execute must include at least one allowed project or team (allowedProjectIds / allowedTeamIds); keys with document or file scopes must include at least one allowed team. Empty allowlists mean no access — the API fails closed.