createService
Create and configure new services with attributes like name, description, and associated IDs for integrations such as PagerDuty, Opsgenie, and GitHub.
Instructions
Creates a new service from provided data
Responses:
- 201 (Success): service created
- Content-Type:
application/vnd.api+json
- Example:
- Content-Type:
{
"key": "value"
}
- 401: responds with unauthorized for invalid token
- Content-Type:
application/vnd.api+json
- Example:
- Content-Type:
{
"key": "value"
}
- 422: invalid request
- Content-Type:
application/vnd.api+json
- Example:
- Content-Type:
{
"key": "value"
}
Input Schema
Name | Required | Description | Default |
---|---|---|---|
data | Yes |
Input Schema (JSON Schema)
{
"properties": {
"data": {
"properties": {
"attributes": {
"additionalProperties": false,
"properties": {
"alert_urgency_id": {
"description": "The alert urgency id of the service",
"nullable": true,
"type": "string"
},
"alerts_email_enabled": {
"description": "Enable alerts through email",
"nullable": true,
"type": "boolean"
},
"backstage_id": {
"description": "The Backstage entity id associated to this service. eg: :namespace/:kind/:entity_name",
"nullable": true,
"type": "string"
},
"color": {
"description": "The hex color of the service",
"nullable": true,
"type": "string"
},
"cortex_id": {
"description": "The Cortex group id associated to this service",
"nullable": true,
"type": "string"
},
"description": {
"description": "The description of the service",
"nullable": true,
"type": "string"
},
"environment_ids": {
"description": "Environments associated with this service",
"items": {
"type": "string"
},
"nullable": true,
"type": "array"
},
"external_id": {
"description": "The external id associated to this service",
"nullable": true,
"type": "string"
},
"github_repository_branch": {
"description": "The GitHub repository branch associated to this service. eg: main",
"nullable": true,
"type": "string"
},
"github_repository_name": {
"description": "The GitHub repository name associated to this service. eg: rootlyhq/my-service",
"nullable": true,
"type": "string"
},
"gitlab_repository_branch": {
"description": "The GitLab repository branch associated to this service. eg: main",
"nullable": true,
"type": "string"
},
"gitlab_repository_name": {
"description": "The GitLab repository name associated to this service. eg: rootlyhq/my-service",
"nullable": true,
"type": "string"
},
"name": {
"description": "The name of the service",
"type": "string"
},
"notify_emails": {
"description": "Emails to attach to the service",
"items": {
"type": "string"
},
"nullable": true,
"type": "array"
},
"opsgenie_id": {
"description": "The Opsgenie service id associated to this service",
"nullable": true,
"type": "string"
},
"opsgenie_team_id": {
"description": "The Opsgenie team id associated to this service",
"nullable": true,
"type": "string"
},
"owners_group_ids": {
"description": "Owner Teams associated with this service",
"items": {
"type": "string"
},
"nullable": true,
"type": "array"
},
"owners_user_ids": {
"description": "Owner Users associated with this service",
"items": {
"type": "integer"
},
"nullable": true,
"type": "array"
},
"pagerduty_id": {
"description": "The PagerDuty service id associated to this service",
"nullable": true,
"type": "string"
},
"position": {
"description": "Position of the service",
"nullable": true,
"type": "integer"
},
"public_description": {
"description": "The public description of the service",
"nullable": true,
"type": "string"
},
"service_ids": {
"description": "Services dependent on this service",
"items": {
"type": "string"
},
"nullable": true,
"type": "array"
},
"service_now_ci_sys_id": {
"description": "The Service Now CI sys id associated to this service",
"nullable": true,
"type": "string"
},
"show_uptime": {
"description": "Show uptime",
"nullable": true,
"type": "boolean"
},
"show_uptime_last_days": {
"default": 60,
"description": "Show uptime over x days",
"enum": [
30,
60,
90
],
"nullable": true,
"type": "integer"
},
"slack_aliases": {
"description": "Slack Aliases associated with this service",
"items": {
"properties": {
"id": {
"description": "Slack alias ID",
"type": "string"
},
"name": {
"description": "Slack alias name",
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"nullable": true,
"type": "array"
},
"slack_channels": {
"description": "Slack Channels associated with this service",
"items": {
"properties": {
"id": {
"description": "Slack channel ID",
"type": "string"
},
"name": {
"description": "Slack channel name",
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"nullable": true,
"type": "array"
}
},
"required": [
"name"
],
"type": "object"
},
"type": {
"enum": [
"services"
],
"type": "string"
}
},
"required": [
"type",
"attributes"
],
"type": "object"
}
},
"required": [
"data"
],
"type": "object"
}