REST API

Skill Registry

Derived from the source of github.com/awee-ai/api/cmd/registry.

Awee Skill Registry API · v1.0.0 · 8 endpoints

Registry

GET/v1/registryAuth

Handles GET /v1/registry

Without an app parameter the route serves the org's whole catalog, which is the browsing view. With ?app=<slug> it serves only what that app holds an install row for, which is what an automation picker wants, because an app should be offered the workflows it was given and not everything the registry happens to hold. owner, owner_kind, label and collection narrow either view.

rest.Handler.GetSkills

Query parameters

ownerstring
owner_kindstring
collectionstring
labelstring
appstring

Responses

200 OKOK
itemsSkill[]required
collectionstring
configstringrequired
created_atstring (date-time)required
deleted_atstring (date-time)
idstringrequired
labelsstring[]
namestringrequired
org_idstringrequired
ownerstring
owner_kindOwnerKind

Separates workflows we ship from workflows somebody else wrote.

requiresRequires

Is a workflow's declaration of what it touches.

connectionsConnectionRequirement[]
capabilitiesstring[]
optionalboolean
providerstringrequired
hostsstring[]

Are the outbound hostnames the workflow contacts directly, without a scheme or path.

tablesTableRequirement[]
fieldsFieldRequirement[]
namestringrequired
optionalboolean
typeFieldType

Enumerates the supported field data types.

optionalboolean

Marks a table the workflow uses when present and copes without.

tablestringrequired
writesboolean
slugstringrequired
updated_atstring (date-time)required
user_idstringrequired
totalinteger (int64)required
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "items": [
    {
      "collection": "string",
      "config": "string",
      "created_at": "2024-01-15T09:30:00Z",
      "deleted_at": "2024-01-15T09:30:00Z",
      "id": "string",
      "labels": [
        "string"
      ],
      "name": "string",
      "org_id": "string",
      "owner": "string",
      "owner_kind": "string",
      "requires": {
        "connections": [
          {
            "capabilities": [
              "string"
            ],
            "optional": true,
            "provider": "string"
          }
        ],
        "hosts": [
          "string"
        ],
        "tables": [
          {
            "fields": [
              {
                "name": "string",
                "optional": true,
                "type": "string"
              }
            ],
            "optional": true,
            "table": "string",
            "writes": true
          }
        ]
      },
      "slug": "string",
      "updated_at": "2024-01-15T09:30:00Z",
      "user_id": "string"
    }
  ],
  "total": 0
}
POST/v1/registryAuth

Handles POST /v1/registry

The body is an inline pipeline.Config JSON carrying the registry metadata keys alongside the authored config, which is why it is decoded twice into two disjoint views of the same object rather than nested. The registry stores the skill keyed by record id while keeping the human slug (cfg.ID) on the row for dedupe and display. Registering never installs. A skill published here is available to no app until an install row says otherwise, and a publisher cannot install itself.

rest.Handler.RegisterSkill

Takes no parameters and no request body.

Responses

201 CreatedCreated
collectionstring
configstringrequired
created_atstring (date-time)required
deleted_atstring (date-time)
idstringrequired
labelsstring[]
namestringrequired
org_idstringrequired
ownerstring
owner_kindOwnerKind

Separates workflows we ship from workflows somebody else wrote.

requiresRequires

Is a workflow's declaration of what it touches.

connectionsConnectionRequirement[]
capabilitiesstring[]
optionalboolean
providerstringrequired
hostsstring[]

Are the outbound hostnames the workflow contacts directly, without a scheme or path.

tablesTableRequirement[]
fieldsFieldRequirement[]
namestringrequired
optionalboolean
typeFieldType

Enumerates the supported field data types.

optionalboolean

Marks a table the workflow uses when present and copes without.

tablestringrequired
writesboolean
slugstringrequired
updated_atstring (date-time)required
user_idstringrequired
400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

201 Created
{
  "collection": "string",
  "config": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "deleted_at": "2024-01-15T09:30:00Z",
  "id": "string",
  "labels": [
    "string"
  ],
  "name": "string",
  "org_id": "string",
  "owner": "string",
  "owner_kind": "string",
  "requires": {
    "connections": [
      {
        "capabilities": [
          "string"
        ],
        "optional": true,
        "provider": "string"
      }
    ],
    "hosts": [
      "string"
    ],
    "tables": [
      {
        "fields": [
          {
            "name": "string",
            "optional": true,
            "type": "string"
          }
        ],
        "optional": true,
        "table": "string",
        "writes": true
      }
    ]
  },
  "slug": "string",
  "updated_at": "2024-01-15T09:30:00Z",
  "user_id": "string"
}
GET/v1/registry/{id}Auth

Handles GET /v1/registry/{id}

rest.Handler.GetSkill

Path parameters

idstringrequired

Responses

200 OKOK
collectionstring
configstringrequired
created_atstring (date-time)required
deleted_atstring (date-time)
idstringrequired
labelsstring[]
namestringrequired
org_idstringrequired
ownerstring
owner_kindOwnerKind

Separates workflows we ship from workflows somebody else wrote.

requiresRequires

Is a workflow's declaration of what it touches.

connectionsConnectionRequirement[]
capabilitiesstring[]
optionalboolean
providerstringrequired
hostsstring[]

Are the outbound hostnames the workflow contacts directly, without a scheme or path.

tablesTableRequirement[]
fieldsFieldRequirement[]
namestringrequired
optionalboolean
typeFieldType

Enumerates the supported field data types.

optionalboolean

Marks a table the workflow uses when present and copes without.

tablestringrequired
writesboolean
slugstringrequired
updated_atstring (date-time)required
user_idstringrequired
400 Bad Requestthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "collection": "string",
  "config": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "deleted_at": "2024-01-15T09:30:00Z",
  "id": "string",
  "labels": [
    "string"
  ],
  "name": "string",
  "org_id": "string",
  "owner": "string",
  "owner_kind": "string",
  "requires": {
    "connections": [
      {
        "capabilities": [
          "string"
        ],
        "optional": true,
        "provider": "string"
      }
    ],
    "hosts": [
      "string"
    ],
    "tables": [
      {
        "fields": [
          {
            "name": "string",
            "optional": true,
            "type": "string"
          }
        ],
        "optional": true,
        "table": "string",
        "writes": true
      }
    ]
  },
  "slug": "string",
  "updated_at": "2024-01-15T09:30:00Z",
  "user_id": "string"
}
GET/v1/registry/{id}/assetsAuth

Handles GET /v1/registry/{id}/assets

rest.Handler.ListAssets

Path parameters

idstringrequired

Responses

200 OKOK
itemsAsset[]required
contentstring (byte)
created_atstring (date-time)required
deleted_atstring (date-time)
idstringrequired
namestringrequired
org_idstringrequired
skill_idstringrequired
updated_atstring (date-time)required
user_idstringrequired
totalinteger (int64)required
400 Bad Requestthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "items": [
    {
      "content": "aGVsbG8=",
      "created_at": "2024-01-15T09:30:00Z",
      "deleted_at": "2024-01-15T09:30:00Z",
      "id": "string",
      "name": "string",
      "org_id": "string",
      "skill_id": "string",
      "updated_at": "2024-01-15T09:30:00Z",
      "user_id": "string"
    }
  ],
  "total": 0
}
POST/v1/registry/{id}/assetsAuth

Handles POST /v1/registry/{id}/assets

rest.Handler.UploadAsset

Path parameters

idstringrequired

Body

application/jsonrequired
contentstringrequired
namestringrequired

Responses

201 CreatedCreated
contentstring (byte)
created_atstring (date-time)required
deleted_atstring (date-time)
idstringrequired
namestringrequired
org_idstringrequired
skill_idstringrequired
updated_atstring (date-time)required
user_idstringrequired
400 Bad Requestthe request could not be completed
errorstringrequired
403 Forbiddenthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request body
{
  "content": "string",
  "name": "string"
}
201 Created
{
  "content": "aGVsbG8=",
  "created_at": "2024-01-15T09:30:00Z",
  "deleted_at": "2024-01-15T09:30:00Z",
  "id": "string",
  "name": "string",
  "org_id": "string",
  "skill_id": "string",
  "updated_at": "2024-01-15T09:30:00Z",
  "user_id": "string"
}
GET/v1/registry/{id}/assets/{file}Auth

Handles GET /v1/registry/{id}/assets/{file}

rest.Handler.GetAsset

Path parameters

idstringrequired
filestringrequired

Responses

200 OKOK
contentstring (byte)
created_atstring (date-time)required
deleted_atstring (date-time)
idstringrequired
namestringrequired
org_idstringrequired
skill_idstringrequired
updated_atstring (date-time)required
user_idstringrequired
400 Bad Requestthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "content": "aGVsbG8=",
  "created_at": "2024-01-15T09:30:00Z",
  "deleted_at": "2024-01-15T09:30:00Z",
  "id": "string",
  "name": "string",
  "org_id": "string",
  "skill_id": "string",
  "updated_at": "2024-01-15T09:30:00Z",
  "user_id": "string"
}
GET/v1/registry/{id}/formAuth

Handles GET /v1/registry/{id}/form

rest.Handler.GetSkillForm

Path parameters

idstringrequired

Responses

200 OKOK
fieldsField[]
defaultunknown

Is the value applied when a record is inserted (or a form is rendered) without an explicit value for this field.

default_sourcestring

Declares the origin of a dynamic default value when the server has resolved one into Default.

descriptionstring

Is a human-readable explanation of the field's purpose.

labelstring

Is the UI label for the field.

namestringrequired

Is the column / input name.

option_labelsstring[]

Is a parallel array to Options that carries display labels for enum values.

optionsstring[]

Is the ordered list of permitted string values for FieldTypeEnum.

related_fieldstring

Is the name of the foreign-key field on the related table.

related_tablestring

Is the name of the target table for relation fields.

relation_label_fieldstring

Names the field on the related record that the UI should show as the dropdown label.

requiredboolean

Marks the field as non-nullable / mandatory.

typeFieldTyperequired

Enumerates the supported field data types.

400 Bad Requestthe request could not be completed
errorstringrequired
404 Not Foundthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "fields": [
    {
      "default": null,
      "default_source": "string",
      "description": "string",
      "label": "string",
      "name": "string",
      "option_labels": [
        "string"
      ],
      "options": [
        "string"
      ],
      "related_field": "string",
      "related_table": "string",
      "relation_label_field": "string",
      "required": true,
      "type": "string"
    }
  ]
}
GET/v1/registry/installsAuth

Handles GET /v1/registry/installs?app={slug}

It exposes the entitlement itself rather than making an operator infer it from a filtered catalog, and it is the read side of the record a marketplace install writes.

rest.Handler.GetInstalls

Query parameters

appstring

Responses

200 OKOK
itemsInstall[]required
app_slugstringrequired
approved_requiresRequires

Is a workflow's declaration of what it touches.

connectionsConnectionRequirement[]
capabilitiesstring[]
optionalboolean
providerstringrequired
hostsstring[]

Are the outbound hostnames the workflow contacts directly, without a scheme or path.

tablesTableRequirement[]
fieldsFieldRequirement[]
namestringrequired
optionalboolean
typeFieldType

Enumerates the supported field data types.

optionalboolean

Marks a table the workflow uses when present and copes without.

tablestringrequired
writesboolean
created_atstring (date-time)required
deleted_atstring (date-time)
idstringrequired
org_idstringrequired
skill_idstringrequired
slugstringrequired
sourceInstallSourcerequired

Records how an install row came to exist.

updated_atstring (date-time)required
user_idstringrequired
totalinteger (int64)required
400 Bad Requestthe request could not be completed
errorstringrequired
500 Internal Server Errorthe request could not be completed
errorstringrequired
Defaultthe request could not be completed
errorstringrequired
Request

No request body.

200 OK
{
  "items": [
    {
      "app_slug": "string",
      "approved_requires": {
        "connections": [
          {
            "capabilities": [
              "string"
            ],
            "optional": true,
            "provider": "string"
          }
        ],
        "hosts": [
          "string"
        ],
        "tables": [
          {
            "fields": [
              {
                "name": "string",
                "optional": true,
                "type": "string"
              }
            ],
            "optional": true,
            "table": "string",
            "writes": true
          }
        ]
      },
      "created_at": "2024-01-15T09:30:00Z",
      "deleted_at": "2024-01-15T09:30:00Z",
      "id": "string",
      "org_id": "string",
      "skill_id": "string",
      "slug": "string",
      "source": "string",
      "updated_at": "2024-01-15T09:30:00Z",
      "user_id": "string"
    }
  ],
  "total": 0
}