Put a resource in a service
Binds the resource to a service by hand ({"component": "<id or slug>"}), or unbinds it ({"component": null}). The key is
required. A binding made here is never undone by a sweep. Unbinding a
resource whose evohub.io/component annotation names a service lasts
only until its next sweep: change the manifest to move it for good.
Requires the catalog:resource:write scope.
Authorization
Parameters
Path parameters
idstring requiredThe resource's ID.
Request body required
componentstring | null requiredA service's ID or slug, or null to unbind.
Responses
200
The resource.
dataResourceShow Resource properties
idstringenvironment_idstringsource_idstringexternal_idstringproviderstringkindstringnamestringnamespacestringcomponent_idstring | nullcomponent_bound_bystring | nullWhat bound it to its service, when something did.statusstringmissing_sincestring (date-time) | nullfirst_seen_atstring (date-time)last_seen_atstring (date-time)imagesarray of string
400
The request is not valid: a field or filter value is wrong
(VALIDATION_ERROR, with a sentence saying what), the body is not
the expected JSON or carries an unknown field (INVALID_BODY), the
cursor is not one this list gave (INVALID_CURSOR), a binding names
a service that does not exist (UNKNOWN_COMPONENT), or a PATCH
tries to change a slug (SLUG_IMMUTABLE).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
401
No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
403
The key lacks a scope this endpoint needs (FORBIDDEN).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
404
Nothing with this ID (or slug) exists in the organization (NOT_FOUND).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
429
Too many requests (RATE_LIMITED). Wait for Retry-After seconds.
Retry-AfterintegerSeconds to wait before retrying.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
500
Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.
errorobject requiredcodestring requiredmessagestring requiredrequest_idstring
Example request
curl -X POST 'https://evohub.io/api/v1/catalog/resources/res_6b8d0f2a4c6e8a1c3e5b7d9f1a3c5e7b/component' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"component": "payments-api"
}'
