List Graphs
Every graph the team has. author narrows to one person, search to a name, and
creative/task to the ones built on one record — those that read it in a context node and
those that export into it. templates decides whether the shelf is included; it is left out by
default, so a personal list stays personal.
A filter rather than its own path: /graphs/using would be shadowed by /graphs/{graph_id},
and a route that only works while it is declared in the right order is a trap for whoever
file next.
GET
/api/v1/graphsAuthorization
AuthorizationBearer token · headerrequiredor
AuthorizationOAuth2 access token · headerrequiredQuery parameters
authorstring | anyClerk user id of the owner
searchstring | anyMatches the name, case-insensitively
creativestring | anyOnly graphs whose Creative or Export node names it
taskstring | anyOnly graphs whose Task or Export node names it
forked_fromstring | anyOnly the copies of one template
templatesTemplatesWhether template graphs are in the answer
Allowed:
excludeonlyalllimitintegermin 1 · max 100 · default: 50
offsetintegermin 0 · default: 0
Responses
200Successful Response
successbooleandefault: true
dataGraphsList | anyShow propertiesHide properties
Any of:
GraphsList
graphsNodeGraph[]requiredShow propertiesHide properties
Array of
NodeGraphidstringnamestringrequireddescriptionstringdefault: ""
definitionobjectui_stateobjectforked_fromstring | anyShow propertiesHide properties
Any of:
string
stringany
anytemplatebooleandefault: false
owner_idstringrequiredcreated_atstring<date-time>updated_atstring<date-time>deleted_atstring<date-time> | anyShow propertiesHide properties
Any of:
string<date-time>
string<date-time>any
anyauthorsobjectpreviewsobjectrunsobjectmetaPaginationMetarequiredShow propertiesHide properties
totalintegerrequiredlimitintegerrequiredoffsetintegerrequiredany
anymessagestring | anyShow propertiesHide properties
Any of:
string
stringany
anyerrorsstring[] | anyShow propertiesHide properties
Any of:
string[]
Array of
stringstringany
any422Validation Error
detailValidationError[]Show propertiesHide properties
Array of
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
Array of
string | integerAny of:
string
stringinteger
integermsgstringrequiredtypestringrequiredinputanyctxobjectRequest
curl -X GET "/api/v1/graphs" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("/api/v1/graphs", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"/api/v1/graphs",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"success": true,
"data": {
"graphs": [
{
"id": "string",
"name": "string",
"description": "",
"definition": {},
"ui_state": {},
"forked_from": "string",
"template": false,
"owner_id": "string",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z",
"deleted_at": "2019-08-24T14:15:22Z"
}
],
"authors": {
"property1": "string",
"property2": "string"
},
"previews": {
"property1": "string",
"property2": "string"
},
"runs": {
"property1": [
{
"id": "string",
"created_at": "2019-08-24T14:15:22Z",
"status": "draft",
"credits_consumed": 0,
"targets": [
"string"
],
"exported_at": "2019-08-24T14:15:22Z"
}
],
"property2": [
{
"id": "string",
"created_at": "2019-08-24T14:15:22Z",
"status": "draft",
"credits_consumed": 0,
"targets": [
"string"
],
"exported_at": "2019-08-24T14:15:22Z"
}
]
},
"meta": {
"total": 0,
"limit": 0,
"offset": 0
}
},
"message": "string",
"errors": [
"string"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}