Skip to content
AGH RuntimeAPI Reference

Resources

AGH Resources HTTP endpoints.

Audience
Operators running durable agent work
Focus
API Reference guidance shaped for scanability, day-two clarity, and operator context.

List desired-state resources on the local operator control plane

GET/api/resources

Query Parameters

kind?string

Filter by resource kind

scope_kind?string

Filter by resource scope kind

Value in"global" | "workspace"
scope_id?string

Filter by workspace scope id

owner_kind?string

Filter by stamped owner kind

owner_id?string

Filter by stamped owner id

source_kind?string

Filter by stamped source kind

source_id?string

Filter by stamped source id

limit?integer

Maximum number of records to return

Formatint32

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/resources"
{
  "records": [
    {
      "created_at": "2019-08-24T14:15:22Z",
      "id": "string",
      "kind": "string",
      "owner": {
        "id": "string",
        "kind": "string"
      },
      "scope": {
        "id": "string",
        "kind": "global"
      },
      "source": {
        "id": "string",
        "kind": "string"
      },
      "spec": null,
      "updated_at": "2019-08-24T14:15:22Z",
      "version": 0
    }
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

List one desired-state resource kind on the local operator control plane

GET/api/resources/{kind}

Path Parameters

kind*string

Resource kind

Query Parameters

scope_kind?string

Filter by resource scope kind

Value in"global" | "workspace"
scope_id?string

Filter by workspace scope id

owner_kind?string

Filter by stamped owner kind

owner_id?string

Filter by stamped owner id

source_kind?string

Filter by stamped source kind

source_id?string

Filter by stamped source id

limit?integer

Maximum number of records to return

Formatint32

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/resources/string"
{
  "records": [
    {
      "created_at": "2019-08-24T14:15:22Z",
      "id": "string",
      "kind": "string",
      "owner": {
        "id": "string",
        "kind": "string"
      },
      "scope": {
        "id": "string",
        "kind": "global"
      },
      "source": {
        "id": "string",
        "kind": "string"
      },
      "spec": null,
      "updated_at": "2019-08-24T14:15:22Z",
      "version": 0
    }
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Read one desired-state resource on the local operator control plane

GET/api/resources/{kind}/{id}

Path Parameters

kind*string

Resource kind

id*string

Resource id

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://loading/api/resources/string/string"
{
  "record": {
    "created_at": "2019-08-24T14:15:22Z",
    "id": "string",
    "kind": "string",
    "owner": {
      "id": "string",
      "kind": "string"
    },
    "scope": {
      "id": "string",
      "kind": "global"
    },
    "source": {
      "id": "string",
      "kind": "string"
    },
    "spec": null,
    "updated_at": "2019-08-24T14:15:22Z",
    "version": 0
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Delete one desired-state resource on the local operator control plane

DELETE/api/resources/{kind}/{id}

Path Parameters

kind*string

Resource kind

id*string

Resource id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://loading/api/resources/string/string" \  -H "Content-Type: application/json" \  -d '{    "expected_version": 0  }'
Empty
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty

Create or replace one desired-state resource on the local operator control plane

PUT/api/resources/{kind}/{id}

Path Parameters

kind*string

Resource kind

id*string

Resource id

Request Body

application/json

JSON request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://loading/api/resources/string/string" \  -H "Content-Type: application/json" \  -d '{    "scope": {      "kind": "global"    },    "spec": null  }'
{
  "record": {
    "created_at": "2019-08-24T14:15:22Z",
    "id": "string",
    "kind": "string",
    "owner": {
      "id": "string",
      "kind": "string"
    },
    "scope": {
      "id": "string",
      "kind": "global"
    },
    "source": {
      "id": "string",
      "kind": "string"
    },
    "spec": null,
    "updated_at": "2019-08-24T14:15:22Z",
    "version": 0
  }
}
{
  "record": {
    "created_at": "2019-08-24T14:15:22Z",
    "id": "string",
    "kind": "string",
    "owner": {
      "id": "string",
      "kind": "string"
    },
    "scope": {
      "id": "string",
      "kind": "global"
    },
    "source": {
      "id": "string",
      "kind": "string"
    },
    "spec": null,
    "updated_at": "2019-08-24T14:15:22Z",
    "version": 0
  }
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
Empty