Service and link API
Services are the instances developers create from a service specification: a database, a bucket, a queue, or anything a platform team crafted. This section covers what happens to a service once it exists, from creating it to linking a scope to it and running actions on it. The definitions behind those services live in the Service and link specifications API.
How the endpoints nest
| Entity | Endpoints | Lives under | Defined by |
|---|---|---|---|
| Service | /service, /service/{id}, /service/{id}/compare | The NRN you create it at (entity_nrn) | A service specification |
| Service action | /service/{serviceId}/action, /service/{serviceId}/action/{id} | A service | The specification's service action specifications |
| Link | /link, /link/{id} | A scope and a service | One of the specification's link specifications |
| Link action | /link/{linkId}/action, /link/{linkId}/action/{id} | A link | The link specification's link action specifications |
A typical flow
- Create the service with
POST /service, sending itsspecification_idand theentity_nrnit belongs to. When the specification is packaged, the service binds to the package's default revision unless you send apackage_revision_id. - Follow its actions. Creating, updating and deleting a service run the specification's actions.
GET /service/{serviceId}/actionlists them with their status, andPOSTruns a custom action. - Link a scope with
POST /link, choosing one of the specification's link specifications. Links run their own actions, listed under/link/{linkId}/action. - Move it to another version by patching
desired_package_revision_id. The next successful action makes that revision the one the service runs.
Related guides
- Services: what services are and how developers use them
- Manage and provision services: create, link and operate services from the UI and the CLI
Endpoints
📄️ List services
List services
📄️ Create a service
Create a service
📄️ Read a service
Read a service
📄️ Update a service
Updates a service
📄️ Delete a service
Delete a service
📄️ Compare two services
Compare two services
🗃️ Service action
5 items
🗃️ Link
5 items
🗃️ Link action
5 items