Ресурс

Service Dependency

Service 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.

Модель Service Dependency

Свойства

  • Имя
    _id
    Тип
    Object ID
    Описание

    ID of this object

  • Имя
    createdAt
    Тип
    Date
    Описание

    Date and Time when the object was created.

  • Имя
    updatedAt
    Тип
    Date
    Описание

    Date and Time when the object was updated.

  • Имя
    project
    Тип
    Project
    Описание

    Relation to Project Resource in which this object belongs

  • Имя
    projectId
    Тип
    Object IDОбязательно
    Описание

    ID of your Project in which this object belongs

  • Имя
    service
    Тип
    Service
    Описание

    Relation to Service Resource in which this object belongs

  • Имя
    serviceId
    Тип
    Object IDОбязательно
    Описание

    ID of your Service in which this object belongs

  • Имя
    dependencyService
    Тип
    Service
    Описание

    Relation to Service Resource in which this object belongs

  • Имя
    dependencyServiceId
    Тип
    Object IDОбязательно
    Описание

    ID of your Service in which this object belongs

  • Имя
    createdByUser
    Тип
    User
    Описание

    Relation to User who created this object (if this object was created by a User)

  • Имя
    createdByUserId
    Тип
    Object ID
    Описание

    User ID who created this object (if this object was created by a User)

GETorPOST/api/service-dependency/get-list

Список

Этот метод возвращает постраничный список ваших объектов «Service Dependency». По умолчанию на странице до десяти записей.

Необязательные query-параметры

  • limit
    число
    Сколько объектов вернуть. По умолчанию 10, максимум 100
  • skip
    число
    Сколько объектов пропустить (для пагинации)

Необязательное тело запроса

Запрос списка

POST
/api/service-dependency/get-list?skip=0&limit=10
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "dependencyServiceId": true,
    "projectId": true,
    "serviceId": true,
    "createdByUser": true,
    "createdByUserId": true
  },
  "query": {},
  "sort": {
    "createdAt": -1
  }
}

Ответ

{
  "count": 10,
  "limit": 10,
  "skip": 0,
  "data": [
    {
      "_id": "377ae080-28fe-11f1-b591-3fdcef396aba",
      "dependencyServiceId": "a7b8c9d0-e1f2-3456-ab78-cd90ef123456",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "serviceId": "f6a7b8c9-d0e1-2345-fa67-bc89de012345",
      "createdByUser": "c3d4e5f6-a7b8-9012-cd34-ef56ab789012",
      "createdByUserId": "c3d4e5f6-a7b8-9012-cd34-ef56ab789012"
    },
    {
      "_id": "377ae081-28fe-11f1-b591-3fdcef396aba",
      "dependencyServiceId": "a7b8c9d0-e1f2-3456-ab78-cd90ef123456",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "serviceId": "f6a7b8c9-d0e1-2345-fa67-bc89de012345",
      "createdByUser": "c3d4e5f6-a7b8-9012-cd34-ef56ab789012",
      "createdByUserId": "c3d4e5f6-a7b8-9012-cd34-ef56ab789012"
    },
    {
      "_id": "377ae082-28fe-11f1-b591-3fdcef396aba",
      "dependencyServiceId": "a7b8c9d0-e1f2-3456-ab78-cd90ef123456",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "serviceId": "f6a7b8c9-d0e1-2345-fa67-bc89de012345",
      "createdByUser": "c3d4e5f6-a7b8-9012-cd34-ef56ab789012",
      "createdByUserId": "c3d4e5f6-a7b8-9012-cd34-ef56ab789012"
    }
  ]
}
GETorPOST/api/service-dependency/:id/get-item

Получить по ID

Возвращает объект «Service Dependency» по идентификатору.

  • id
    строка
    ID объекта

Необязательное тело запроса

  • select
    По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.

Запрос одного объекта

POST
/api/service-dependency/:id/get-item
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "dependencyServiceId": true,
    "projectId": true,
    "serviceId": true,
    "createdByUser": true,
    "createdByUserId": true
  }
}

Ответ

{
  "_id": "377ae080-28fe-11f1-b591-3fdcef396aba",
  "dependencyServiceId": "a7b8c9d0-e1f2-3456-ab78-cd90ef123456",
  "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
  "serviceId": "f6a7b8c9-d0e1-2345-fa67-bc89de012345",
  "createdByUser": "c3d4e5f6-a7b8-9012-cd34-ef56ab789012",
  "createdByUserId": "c3d4e5f6-a7b8-9012-cd34-ef56ab789012"
}
POST/api/service-dependency/count

Количество

Возвращает количество ваших объектов «Service Dependency».

Необязательное тело запроса

Запрос количества

POST
/api/service-dependency/count
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "query": {}
}

Ответ

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

Создать Service Dependency

Создаёт новый объект.

Запрос создания

POST
/api/service-dependency
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "data": {
    "dependencyServiceId": "a7b8c9d0-e1f2-3456-ab78-cd90ef123456",
    "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
    "serviceId": "f6a7b8c9-d0e1-2345-fa67-bc89de012345",
    "createdByUser": "c3d4e5f6-a7b8-9012-cd34-ef56ab789012",
    "createdByUserId": "c3d4e5f6-a7b8-9012-cd34-ef56ab789012"
  }
}

Ответ

{
  "_id": "377ae080-28fe-11f1-b591-3fdcef396aba",
  "dependencyServiceId": "a7b8c9d0-e1f2-3456-ab78-cd90ef123456",
  "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
  "serviceId": "f6a7b8c9-d0e1-2345-fa67-bc89de012345",
  "createdByUser": "c3d4e5f6-a7b8-9012-cd34-ef56ab789012",
  "createdByUserId": "c3d4e5f6-a7b8-9012-cd34-ef56ab789012"
}
PUT/api/service-dependency/:id

Обновить по ID

Обновляет объект по ID.

Альтернативные методы

Если клиент не поддерживает PUT, используйте POST или GET с теми же заголовками и телом:

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

Запрос обновления

PUT
/api/service-dependency/:id
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "data": {}
}

Ответ

{}
DELETE/api/service-dependency/:id

Удалить по ID

Удаляет объект по ID.

Альтернативные методы

Если клиент не поддерживает DELETE, используйте POST или GET с теми же заголовками и телом:

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

Запрос удаления

DELETE
/api/service-dependency/:id
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY

Ответ

{}

Права доступа

Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.

Права на чтение

Нужны для чтения Service Dependency

  • Project Owner
  • Project Admin
  • Project Member
  • Project Member
  • Read Service Dependency
  • Read All Project Resources

Права на создание

Нужны для создания Service Dependency

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

Права на обновление

Нужны для обновления Service Dependency

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

Права на удаление

Нужны для удаления Service Dependency

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