Service and link specifications API
A service specification defines a service: the attributes a developer fills in, the actions that run on it, and how scopes can link to it. Everything in this section is what a platform team crafts. The instances created from it live in the Service and link API.
How the endpoints nest
Specifications form a tree. A service specification owns action specifications and link specifications, and each link specification owns its own action specifications. Every specification, link and action also keeps an append-only history of snapshots, which packages pin.
service_specification
├── action_specification service actions: create, update, delete, custom
├── link_specification
│ └── action_specification link actions: link, unlink, custom
└── snapshots one history per specification, link and action
| Entity | Endpoints | Nested under | Where to find it |
|---|---|---|---|
| Service specification | /service_specification, /service_specification/{id} | Nothing, it's the root | This page |
| Link specifications of a specification | /service_specification/{id}/link_specification | Service specification | This page |
| Snapshots | /{service,link,action}_specification/{id}/snapshots, plus /{snapshotId} | Each specification, link or action | This page, Link specification and Action specification |
| Package a specification | /service_specification/{id}/package | Service specification | This page, then the Package API |
| Link specification | /link_specification, /link_specification/{id} | Service specification, through specification_id | Link specification |
| Service action specification | /service_specification/{serviceSpecificationId}/action_specification, plus /{id} | Service specification | Service action specification |
| Link action specification | /link_specification/{linkSpecificationId}/action_specification, plus /{id} | Link specification | Link action specification |
| Any action specification | /action_specification, /action_specification/{id}, /action_context | Reads across both kinds | Action specification |
A typical flow
- Create the specification with
POST /service_specification: its name, who can see it (visible_to), and the JSON schema of its attributes. Withuse_default_actions, nullplatform creates the create, update and delete actions for you. - Add its actions under
/service_specification/{serviceSpecificationId}/action_specification, one per operation the service supports beyond the defaults. - Describe how scopes link to it with
POST /link_specification, then add the link's own actions under/link_specification/{linkSpecificationId}/action_specification. - Version it. Every change mints a snapshot. To freeze a set of snapshots together with the image or repository that implements them, package the specification with
POST /service_specification/{id}/packageand continue in the Package API. Specification reads acceptpackage_revision_idto return exactly what a package revision pins.
Related guides
- Craft a service: the end-to-end guide to writing a specification
- Service specifications: the specification schema and its fields
- Link specifications: how a service exposes itself to scopes
- Action specifications: the actions a service runs
- Action specifications for links: the actions a link runs
Endpoints
📄️ List service specifications
List service specifications
📄️ Create a service specification
Create a service specification
📄️ Read a service specification
Read a service specification
📄️ Update a service specification
Updates a service specification
📄️ Delete a service specification
Delete a service specification
📄️ List associated link specifications
List associated link specifications
📄️ List snapshots of a service specification
List the append-only snapshot history of a service specification, newest first. Snapshot ids are what package components pin as resource_revision_id.
📄️ Read a snapshot of a service specification
Read a single snapshot of a service specification, including its full content.
📄️ Package an existing service specification
Create a package from a service specification that doesn't belong to a package yet. The server assembles the bill of materials for you, in a single database transaction:
🗃️ Link specification
7 items
🗃️ Action specification
5 items
🗃️ Service action specification
5 items
🗃️ Link action specification
5 items