Service
Services is a collection of services that you have in your organization. It can be a collection of services that you are monitoring or services that you are providing to your customers. It can be anything that you want to keep track of.
The Service Model
Properties
- Name
_id- Type
- Object ID
- Description
ID of this object
- Name
createdAt- Type
- Date
- Description
Date and Time when the object was created.
- Name
updatedAt- Type
- Date
- Description
Date and Time when the object was updated.
- Name
project- Type
- Project
- Description
Relation to Project Resource in which this object belongs
- Name
projectId- Type
- Object IDRequired
- Description
ID of your Project in which this object belongs
- Name
name- Type
- TextRequired
- Description
Any friendly name of this object
- Name
slug- Type
- SlugRequired
- Description
Friendly globally unique name for your object
- Name
description- Type
- Long Text
- Description
Friendly description that will help you remember
- Name
createdByUser- Type
- User
- Description
Relation to User who created this object (if this object was created by a User)
- Name
createdByUserId- Type
- Object ID
- Description
User ID who created this object (if this object was created by a User)
- Name
labels- Type
- Label
- Description
Relation to Labels Array where this object is categorized in.
- Name
serviceColor- Type
- Color
- Description
Color for this service
- Name
techStack- Type
- JSON
- Description
Tech stack used in the service. This will help other developers understand the service better.
- Name
retainTelemetryDataForDays- Type
- Number
- Description
Number of days to retain telemetry data for this service.
/api/service/get-listList
This endpoint allows you to retrieve a paginated list of all your Service. By default, a maximum of ten Service are shown per page.
Optional Query Params
limit- number
- Number of objects to fetch. By default 10, you can increase this count up to 100
skip- number
- Number of objects to skip. This can be useful in pagination
Optional Request Body
query- If you would like to filter on Service. You can specify include a query here. For more information, please check out writing queries here.
select- By default you will only retrieve ID of objects, to retrieve more fields you need to select them. For more information, please check how to select here.
sort- Objects will be sorted based on created date by default. You can change the sort order — see Data Types: Sort.
List Request
POST/api/service/get-list?skip=0&limit=10Content-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"name": true,
"projectId": true,
"createdByUserId": true,
"description": true,
"slug": true
},
"query": {
"name": "User Authentication API"
},
"sort": {
"createdAt": -1
}
}Response
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "377a9260-28fe-11f1-b591-3fdcef396aba",
"name": "User Authentication API",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"description": "RESTful API service that handles user authentication, authorization, and session management for the platform",
"slug": "Example slug"
},
{
"_id": "377a9261-28fe-11f1-b591-3fdcef396aba",
"name": "User Authentication API",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"description": "RESTful API service that handles user authentication, authorization, and session management for the platform",
"slug": "Example slug"
},
{
"_id": "377a9262-28fe-11f1-b591-3fdcef396aba",
"name": "User Authentication API",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"description": "RESTful API service that handles user authentication, authorization, and session management for the platform",
"slug": "Example slug"
}
]
}/api/service/:id/get-itemGet item by ID
This endpoint allows you to retrieve Service by ID.
id- text
- ID of the Object
Optional Request Body
select- By default you will only retrieve ID of objects, to retrieve more fields you need to select them. For more information, please check how to select here.
Get Item Request
POST/api/service/:id/get-itemContent-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"name": true,
"projectId": true,
"createdByUserId": true,
"description": true,
"slug": true
}
}Response
{
"_id": "377a9260-28fe-11f1-b591-3fdcef396aba",
"name": "User Authentication API",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"description": "RESTful API service that handles user authentication, authorization, and session management for the platform",
"slug": "Example slug"
}/api/service/countCount
This endpoint allows you to retrieve the count of all your Service.
Optional Request Body
query- If you would like to filter on Service. You can specify include a query here. For more information, please check out writing queries here.
Count Request
POST/api/service/countContent-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {
"name": "User Authentication API"
}
}Response
{
"count": 107
}/api/serviceCreate Service
This endpoint allows you to create a new object.
Create Request
POST/api/serviceContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"name": "User Authentication API",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"description": "RESTful API service that handles user authentication, authorization, and session management for the platform",
"createdByUser": "Example created by user"
}
}Response
{
"_id": "377a9260-28fe-11f1-b591-3fdcef396aba",
"name": "User Authentication API",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"createdByUserId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"description": "RESTful API service that handles user authentication, authorization, and session management for the platform",
"slug": "Example slug"
}/api/service/:idUpdate by ID
This endpoint allows you to update object by its ID.
Alternative Methods
For clients that do not support PUT requests, you can use POST or GET with the same request headers and body:
Update Request
PUT/api/service/:idContent-Type: application/json ApiKey: YOUR_API_KEY
{
"data": {
"name": "User Authentication API",
"description": "RESTful API service that handles user authentication, authorization, and session management for the platform",
"labels": []
}
}Response
{}/api/service/:idDelete by ID
This endpoint allows you to delete object by its ID.
Alternative Methods
For clients that do not support DELETE requests, you can use POST or GET with the same request headers and body:
Delete Request
DELETE/api/service/:idContent-Type: application/json ApiKey: YOUR_API_KEY
Response
{}Permissions
Your API Token needs permissions to create, update, read or delete this resource. If you do not have permissions to make a request a 4xx status will be sent as response.
Read Permissions
Required to read Service
Project OwnerProject AdminProject MemberProject MemberRead ServiceRead All Project Resources
Create Permissions
Required to create Service
Project OwnerProject AdminProject MemberCreate Service
Update Permissions
Required to update Service
Project OwnerProject AdminProject MemberEdit Service
Delete Permissions
Required to delete Service
Project OwnerProject AdminProject MemberDelete Service