Get version content
Returns a historical version of an agent’s content, identified by its version number
(see GET {agentId}/versions).
format controls the shape of the returned content:
json(default) - the canonical config as a JSON object. This is the only formatPOST {agentId}/contentaccepts.yaml- the plain-text NestedText format used by the agent editor, returned as a string.
Secret values in the content (for example static input values, or FTP/Snowflake passwords and API keys) are returned as encrypted ciphertext, not plaintext.
Requires read access to the agent.
curl https://dashboard.sequentum.com/api/v1/agent/123/version/4/content \
-H "Authorization: ApiKey $SEQUENTUM_API_KEY"
# Add ?format=yaml to get the plain-text NestedText format instead (content becomes a string):
# curl https://dashboard.sequentum.com/api/v1/agent/123/version/4/content?format=yaml \
# -H "Authorization: ApiKey $SEQUENTUM_API_KEY"const res = await fetch("https://dashboard.sequentum.com/api/v1/agent/123/version/4/content", {
headers: {
"Authorization": `ApiKey ${process.env.SEQUENTUM_API_KEY}`,
},
});
const agentContent = await res.json();
console.log(agentContent.content); // a JSON object, e.g. { Agent: { Commands: [...] } }
// Add ?format=yaml to the URL to get the plain-text NestedText format instead
// (content becomes a string).import os
import requests
response = requests.get(
"https://dashboard.sequentum.com/api/v1/agent/123/version/4/content",
headers={"Authorization": f"ApiKey {os.environ['SEQUENTUM_API_KEY']}"},
)
response.raise_for_status()
agent_content = response.json()
print(agent_content["content"]) # a JSON object, e.g. {"Agent": {"Commands": [...]}}
# Add ?format=yaml to the URL to get the plain-text NestedText format instead
# (content becomes a string).{
"agentId": 123,
"version": 123,
"validationStatus": 1,
"content": "<unknown>"
}{
"statusCode": 123,
"statusDescription": "<string>",
"message": "<string>",
"severity": 0,
"errorCode": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"statusCode": 123,
"statusDescription": "<string>",
"message": "<string>",
"severity": 0,
"errorCode": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
API Key authorization header. Example: "Authorization: ApiKey {your-api-key}"
OAuth 2.0 Bearer token. Example: "Authorization: Bearer {access-token}"
Path Parameters
The ID of the agent
The version number to retrieve
Query Parameters
Either json (default) or yaml
Which shape an agent's content is exchanged in on the agent-content download endpoints
(GET {agentId}/content, GET {agentId}/version/{versionNumber}/content). The
upload endpoint (POST {agentId}/content) only ever accepts Sequentum.Enterprise.ControlCenter.AgentContentFormat.Json. (0 = Json; 1 = Yaml)
json, yaml Response
The agent's content at the requested version
An agent's content, returned by the agent-content download endpoints - either the latest version or a specific historical one.
The ID of the agent this content belongs to.
The version number of this content, matching the requested version, or the agent's latest version if none was requested.
Semantic validation status of a config's most recently saved definition (e.g. whether every
fixed export schema column is actually produced by a command). Serialized as its underlying
int, not a string - see Sequentum.Enterprise.ControlCenter.Swagger.EnumDescriptionsSchemaFilter
for how these values get documented in the public OpenAPI spec. (1 = Unknown - Validation status was not computed for this response (e.g. a historical config version, which does not retain its own stored status); 2 = Invalid - The config has one or more semantic validation errors (e.g. a required export column with no producing command); 3 = Valid - The config has no semantic validation errors)
1, 2, 3 The agent's content. A JSON object holding the canonical config when format=json (the
default), or a plain-text NestedText string when format=yaml - see the format query
parameter on this endpoint.