List agent schema versions
const url = 'https://app.prefactorai.com/api/v1/agent_schema_version?agent_id=013xrzp12g3nqk8ns6jadrqmpgrjkeny';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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://app.prefactorai.com/api/v1/agent_schema_version?agent_id=013xrzp12g3nqk8ns6jadrqmpgrjkeny' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”A valid agent ID
Example
013xrzp12g3nqk8ns6jadrqmpgrjkenySort order; a field name, optionally prefixed with - for descending (e.g. -id). Supported fields: id, external_identifier.
Sort order; a field name, optionally prefixed with - for descending (e.g. -id). Supported fields: id, external_identifier.
Zero-based offset of the first item to return.
Number of items to return per page (1-100).
Responses
Section titled “Responses”Success
object
Pagination information
object
The total number of items
The index of the last item in the page (one-based)
The index of the first item in the page (one-based)
The total number of pages
The index of the current page (one-based)
The offset of the first item in the page (zero-based)
The number of items per page
Null
object
A valid account ID
A valid agent ID
Agent deployments whose current version uses this schema version (empty if none).
External identifier for the agent schema version
Count of rows sharing this external identifier (helps distinguish duplicates).
A valid agent schema version ID
When the agent schema version was created
Number of span schemas in this schema version
Type of resource (always ‘agent_schema_version’)
When the agent schema version was last updated
Example
{ "pagination": { "item_count": 200, "item_end": 100, "item_start": 91, "next_page_offset": 110, "page_count": 20, "page_index": 10, "page_offset": 90, "page_size": 10, "previous_page_offset": 80 }, "sorting": null, "status": "success", "summaries": [ { "account_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "agent_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "current_agent_deployment_refs": [ "013xrzp12g3nqk8ns6jadrqmpgrjkeny" ], "external_identifier": "v0", "id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "inserted_at": "2024-01-01T00:00:00Z", "span_schemas_count": 3, "type": "agent_schema_version", "updated_at": "2024-01-01T00:00:00Z" } ]}default
Section titled “default”Error