Resource

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.

GETorPOST/api/service/get-list

List

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

List Request

POST
/api/service/get-list?skip=0&limit=10
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "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"
    }
  ]
}
GETorPOST/api/service/:id/get-item

Get item by ID

This endpoint allows you to retrieve Service by ID.

  • id
    text
    ID of the Object

Optional Request Body

Get Item Request

POST
/api/service/:id/get-item
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "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"
}
POST/api/service/count

Count

This endpoint allows you to retrieve the count of all your Service.

Optional Request Body

Count Request

POST
/api/service/count
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "query": {
    "name": "User Authentication API"
  }
}

Response

{
  "count": 107
}
POST/api/service

Create Service

This endpoint allows you to create a new object.

Create Request

POST
/api/service
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "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"
}
PUT/api/service/:id

Update 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:

POST/api/service/:id/update-item
GET/api/service/:id/update-item

Update Request

PUT
/api/service/:id
Headers
Content-Type: application/json
ApiKey: YOUR_API_KEY
Body
{
  "data": {
    "name": "User Authentication API",
    "description": "RESTful API service that handles user authentication, authorization, and session management for the platform",
    "labels": []
  }
}

Response

{}
DELETE/api/service/:id

Delete 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:

POST/api/service/:id/delete-item
GET/api/service/:id/delete-item

Delete Request

DELETE
/api/service/:id
Headers
Content-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 Owner
  • Project Admin
  • Project Member
  • Project Member
  • Read Service
  • Read All Project Resources

Create Permissions

Required to create Service

  • Project Owner
  • Project Admin
  • Project Member
  • Create Service

Update Permissions

Required to update Service

  • Project Owner
  • Project Admin
  • Project Member
  • Edit Service

Delete Permissions

Required to delete Service

  • Project Owner
  • Project Admin
  • Project Member
  • Delete Service