Declare a service
Declares a service. slug and display_name are required. kind
defaults to service and lifecycle to production. The slug is a
DNS label (lowercase letters, digits and single hyphens, starting with
a letter, at most 63 characters) and can never change.
Resources already running whose evohub.io/component annotation
names the new slug are matched to it straight away.
Requires the catalog:component:write scope.
Authorization
Request body required
slugstring requireddisplay_namestring requireddescriptionstringkindComponentKindowner_team_idstring | nullA team ID (team_…), or null for no owner.tier_idstring | nullOne of the organization's tiers in use.tierinteger | nullInstead oftier_id, the tier at this place in the order.sla_overridesSLATargetsShow SLATargets properties
availabilitynumberA percentage above 0 and at most 100, up to 3 decimals.responseobjectMinutes to acknowledge, per On-Call severity (critical,high,medium,low,info), 1 to 525600.resolutionobjectMinutes to resolve, per severity.support_hoursobjectkindstring requiredtimezonestringdaysarray of integerISO weekdays, 1 is Monday.fromstringtostring
max_unowned_daysinteger
lifecycleLifecyclerepo_urlstringEmpty, or an http(s) URL with a host and no user name or password, at most 2048 characters. The same fordocs_urlandrunbook_url.docs_urlstringrunbook_urlstring
Responses
201
The service.
dataComponentShow Component properties
idstringorg_idstringslugstringdisplay_namestringdescriptionstringkindComponentKindowner_team_idstring | nulltier_idstring | nulltierinteger | nullThe tier's place in the order, 1 the most critical.sla_overridesSLATargetsShow SLATargets properties
availabilitynumberA percentage above 0 and at most 100, up to 3 decimals.responseobjectMinutes to acknowledge, per On-Call severity (critical,high,medium,low,info), 1 to 525600.resolutionobjectMinutes to resolve, per severity.support_hoursobjectkindstring requiredtimezonestringdaysarray of integerISO weekdays, 1 is Monday.fromstringtostring
max_unowned_daysinteger
lifecycleLifecyclerepo_urlstringdocs_urlstringrunbook_urlstringcreated_bystringcreated_atstring (date-time)updated_atstring (date-time)
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
409
A service with this slug exists (SLUG_TAKEN), or the tier is archived (TIER_ARCHIVED).
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/components' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"slug": "payments-api",
"tier": 1,
"description": "Takes card payments for checkout.",
"runbook_url": "https://wiki.acme.example/runbooks/payments",
"display_name": "Payments API",
"owner_team_id": "team_3b6f0e2a-1c4d-4e8f-9a7b-2d5c6e8f0a1b"
}'
