GET
/v1/graphsList the decision graphs registered on this server.
Graphs loaded from JEFF_GRAPHS at startup (none with code nodes, which the server cannot run); call one through POST /v1/decide with {"graph": {"id": ...}}.
Responses
200The registered graphs.
Response schema
{
"title": "Jeff GET /v1/graphs response",
"description": "The decision graphs registered on the server (none of them has code nodes), callable through POST /v1/decide with {\"graph\": {\"id\": ...}}.",
"type": "object",
"additionalProperties": false,
"required": [
"graphs"
],
"properties": {
"graphs": {
"type": "array",
"items": {
"title": "Jeff decision graph",
"type": "object",
"additionalProperties": false,
"required": [
"graph",
"version",
"input",
"params",
"nodes",
"outputs"
],
"properties": {
"graph": {
"type": "string",
"pattern": "^jeff(\\.[a-z0-9][a-z0-9_-]*){2}$|^[a-z][a-z0-9_-]*$"
},
"version": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"input": {
"type": "string"
},
"params": {
"type": "array",
"items": {
"type": "string"
}
},
"nodes": {
"type": "object",
"minProperties": 1,
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"oneOf": [
{
"required": [
"call"
]
},
{
"required": [
"code"
]
}
],
"properties": {
"call": {
"type": "string"
},
"code": {
"type": "string"
},
"after": {
"type": "array",
"items": {
"type": "string"
}
},
"context": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"required": [
"param"
],
"properties": {
"param": {
"type": "string"
}
}
},
"description": "The called function's context fields, each keyed by its code name (the code_name GET /v1/functions lists, as every caller passes context; 'counterparty_name' for the manifest key 'counterparty name'), never by the exact key with spaces, which is refused (UnknownContext, naming the code name), and mapped to a graph param."
},
"labels": {
"type": "object",
"additionalProperties": false,
"required": [
"param"
],
"properties": {
"param": {
"type": "string"
}
}
},
"when": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"all"
],
"properties": {
"all": {
"type": "array",
"items": {
"$ref": "#/components/schemas/graph/$defs/condition"
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"any"
],
"properties": {
"any": {
"type": "array",
"items": {
"$ref": "#/components/schemas/graph/$defs/condition"
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"not"
],
"properties": {
"not": {
"$ref": "#/components/schemas/graph/$defs/condition"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"is"
],
"properties": {
"node": {
"type": "string"
},
"is": {
"type": [
"string",
"boolean",
"integer"
]
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"in"
],
"properties": {
"node": {
"type": "string"
},
"in": {
"type": "array",
"items": {
"type": [
"string",
"boolean",
"integer"
]
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"abstained"
],
"properties": {
"node": {
"type": "string"
},
"abstained": {
"type": "boolean"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"confidence_below"
],
"properties": {
"node": {
"type": "string"
},
"confidence_below": {
"type": "number"
}
}
}
]
},
"on_low_confidence": {
"enum": [
"return",
"error"
]
}
}
}
},
"outputs": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
}
},
"$defs": {
"param": {
"type": "object",
"additionalProperties": false,
"required": [
"param"
],
"properties": {
"param": {
"type": "string"
}
}
},
"node": {
"type": "object",
"additionalProperties": false,
"oneOf": [
{
"required": [
"call"
]
},
{
"required": [
"code"
]
}
],
"properties": {
"call": {
"type": "string"
},
"code": {
"type": "string"
},
"after": {
"type": "array",
"items": {
"type": "string"
}
},
"context": {
"type": "object",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"required": [
"param"
],
"properties": {
"param": {
"type": "string"
}
}
},
"description": "The called function's context fields, each keyed by its code name (the code_name GET /v1/functions lists, as every caller passes context; 'counterparty_name' for the manifest key 'counterparty name'), never by the exact key with spaces, which is refused (UnknownContext, naming the code name), and mapped to a graph param."
},
"labels": {
"type": "object",
"additionalProperties": false,
"required": [
"param"
],
"properties": {
"param": {
"type": "string"
}
}
},
"when": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"all"
],
"properties": {
"all": {
"type": "array",
"items": {
"$ref": "#/components/schemas/graph/$defs/condition"
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"any"
],
"properties": {
"any": {
"type": "array",
"items": {
"$ref": "#/components/schemas/graph/$defs/condition"
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"not"
],
"properties": {
"not": {
"$ref": "#/components/schemas/graph/$defs/condition"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"is"
],
"properties": {
"node": {
"type": "string"
},
"is": {
"type": [
"string",
"boolean",
"integer"
]
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"in"
],
"properties": {
"node": {
"type": "string"
},
"in": {
"type": "array",
"items": {
"type": [
"string",
"boolean",
"integer"
]
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"abstained"
],
"properties": {
"node": {
"type": "string"
},
"abstained": {
"type": "boolean"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"confidence_below"
],
"properties": {
"node": {
"type": "string"
},
"confidence_below": {
"type": "number"
}
}
}
]
},
"on_low_confidence": {
"enum": [
"return",
"error"
]
}
}
},
"condition": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"all"
],
"properties": {
"all": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"all"
],
"properties": {
"all": {
"type": "array",
"items": {
"$ref": "#/components/schemas/graph/$defs/condition"
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"any"
],
"properties": {
"any": {
"type": "array",
"items": {
"$ref": "#/components/schemas/graph/$defs/condition"
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"not"
],
"properties": {
"not": {
"$ref": "#/components/schemas/graph/$defs/condition"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"is"
],
"properties": {
"node": {
"type": "string"
},
"is": {
"type": [
"string",
"boolean",
"integer"
]
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"in"
],
"properties": {
"node": {
"type": "string"
},
"in": {
"type": "array",
"items": {
"type": [
"string",
"boolean",
"integer"
]
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"abstained"
],
"properties": {
"node": {
"type": "string"
},
"abstained": {
"type": "boolean"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"confidence_below"
],
"properties": {
"node": {
"type": "string"
},
"confidence_below": {
"type": "number"
}
}
}
]
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"any"
],
"properties": {
"any": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"all"
],
"properties": {
"all": {
"type": "array",
"items": {
"$ref": "#/components/schemas/graph/$defs/condition"
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"any"
],
"properties": {
"any": {
"type": "array",
"items": {
"$ref": "#/components/schemas/graph/$defs/condition"
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"not"
],
"properties": {
"not": {
"$ref": "#/components/schemas/graph/$defs/condition"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"is"
],
"properties": {
"node": {
"type": "string"
},
"is": {
"type": [
"string",
"boolean",
"integer"
]
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"in"
],
"properties": {
"node": {
"type": "string"
},
"in": {
"type": "array",
"items": {
"type": [
"string",
"boolean",
"integer"
]
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"abstained"
],
"properties": {
"node": {
"type": "string"
},
"abstained": {
"type": "boolean"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"confidence_below"
],
"properties": {
"node": {
"type": "string"
},
"confidence_below": {
"type": "number"
}
}
}
]
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"not"
],
"properties": {
"not": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"required": [
"all"
],
"properties": {
"all": {
"type": "array",
"items": {
"$ref": "#/components/schemas/graph/$defs/condition"
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"any"
],
"properties": {
"any": {
"type": "array",
"items": {
"$ref": "#/components/schemas/graph/$defs/condition"
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"not"
],
"properties": {
"not": {
"$ref": "#/components/schemas/graph/$defs/condition"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"is"
],
"properties": {
"node": {
"type": "string"
},
"is": {
"type": [
"string",
"boolean",
"integer"
]
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"in"
],
"properties": {
"node": {
"type": "string"
},
"in": {
"type": "array",
"items": {
"type": [
"string",
"boolean",
"integer"
]
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"abstained"
],
"properties": {
"node": {
"type": "string"
},
"abstained": {
"type": "boolean"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"confidence_below"
],
"properties": {
"node": {
"type": "string"
},
"confidence_below": {
"type": "number"
}
}
}
]
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"is"
],
"properties": {
"node": {
"type": "string"
},
"is": {
"type": [
"string",
"boolean",
"integer"
]
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"in"
],
"properties": {
"node": {
"type": "string"
},
"in": {
"type": "array",
"items": {
"type": [
"string",
"boolean",
"integer"
]
},
"minItems": 1
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"abstained"
],
"properties": {
"node": {
"type": "string"
},
"abstained": {
"type": "boolean"
}
}
},
{
"type": "object",
"additionalProperties": false,
"required": [
"node",
"confidence_below"
],
"properties": {
"node": {
"type": "string"
},
"confidence_below": {
"type": "number"
}
}
}
]
}
}
}
}
}
}401HTTP 401; see contract/errors.yaml for which error type(s) answer with this status.
Response schema
{
"type": "object",
"additionalProperties": false,
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"message",
"details"
],
"properties": {
"type": {
"type": "string",
"description": "The JeffError subclass name, e.g. NotLicensed."
},
"message": {
"type": "string"
},
"details": {
"type": "object",
"description": "The error's own extra attributes, if it has any (for example NotInstalled's function_id); empty for most errors."
}
}
}
}
}429HTTP 429; see contract/errors.yaml for which error type(s) answer with this status.
Response schema
{
"type": "object",
"additionalProperties": false,
"required": [
"error"
],
"properties": {
"error": {
"type": "object",
"additionalProperties": false,
"required": [
"type",
"message",
"details"
],
"properties": {
"type": {
"type": "string",
"description": "The JeffError subclass name, e.g. NotLicensed."
},
"message": {
"type": "string"
},
"details": {
"type": "object",
"description": "The error's own extra attributes, if it has any (for example NotInstalled's function_id); empty for most errors."
}
}
}
}
}Example
bash
curl -s -X GET https://api.jeffhub.ai/v1/graphs \ -H "Authorization: Bearer $JEFF_API_KEY"