Reference
View as MarkdownLinks API
Service links.
4 operations. Every call needs a session cookie or an Authorization: Bearer nct_… token unless marked Public. Conventions, errors and scopes
/environments/{environmentId}/link-proposalsPreview the variables linking two services would propose
Writes nothing. Returns every reference the consumer (from) could hold to reach the provider (to), the recommended set flagged and each row's status on the consumer, plus warnings and whether an edge already exists. Add the chosen ones with PUT /services/{id}/variables; the edge is drawn from those references.
| Parameter | In | Type | Description |
|---|---|---|---|
environmentIdrequired | path | string | |
from | query | string | The consumer: the service that would hold the variables |
to | query | string | The provider: the service the variables point at |
Response 200 · OK · application/json
- existingKeysstring[] | nullrequired
- linkedbooleanrequired
- MeshPlanrequired
- ProposedVariable[] | nullrequired
- warningsstring[] | nullrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/environments/{environmentId}/linksList the links between services of an environment
| Parameter | In | Type | Description |
|---|---|---|---|
environmentIdrequired | path | string |
Response 200 · OK · application/json
- LinkView[] | nullrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/environments/{environmentId}/linksLink two services
A link is presentation plus review only. The response proposes variables for the source service; they are NOT added. Add them with PUT /services/{id}/variables after the user confirms. When the two services run on different servers the link also opens a mesh grant (cross-server service link): the response's mesh block lists the links and devices; devices need acceptMeshChanges.
| Parameter | In | Type | Description |
|---|---|---|---|
environmentIdrequired | path | string |
Request body · application/json · required
- acceptMeshChangesbooleanConfirm the tailnet devices a link between services on different servers adds; without it the request fails with mesh_confirmation_required when devices would be added
- fromServiceIdstringrequired
- toServiceIdstringrequired
Response 201 · Created · application/json
- LinkViewrequired
- MeshPlanrequired
- ProposedVariable[] | nullrequired
- warningsstring[] | nullrequired
401Unauthorized403Forbidden404Not Found409Conflict422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/links/{linkId}Remove a link
| Parameter | In | Type | Description |
|---|---|---|---|
linkIdrequired | path | string | UUID of a manual link; derived reference links (ref:<from>:<to>) cannot be deleted |
Response 204 · No Content
No body.
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.