Ресурс

Incident State Timeline

Change state of the incidents (Created to Acknowledged for example)

Модель Incident State Timeline

Свойства

  • Имя
    _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

  • Имя
    incident
    Тип
    Incident
    Описание

    Relation to Incident in which this resource belongs

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

    Relation to Incident ID in which this resource 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)

  • Имя
    incidentState
    Тип
    Incident State
    Описание

    Incident State Relation. Which incident state does this incident change to?

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

    Incident State ID Relation. Which incident state does this incident change to?

  • Имя
    subscriberNotificationStatusMessage
    Тип
    Very Long Text
    Описание

    Status message for subscriber notifications - includes success messages, failure reasons, or skip reasons

  • Имя
    shouldStatusPageSubscribersBeNotified
    Тип
    Boolean
    Описание

    Should subscribers be notified about this state change?

  • Имя
    stateChangeLog
    Тип
    JSON
    Описание

  • Имя
    rootCause
    Тип
    Markdown
    Описание

    What is the root cause of this status change?

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

    When did this status change end?

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

    When did this status change?

GETorPOST/api/incident-state-timeline/get-list

Список

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

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

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

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

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

POST
/api/incident-state-timeline/get-list?skip=0&limit=10
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "incidentId": true,
    "incidentStateId": true,
    "projectId": true,
    "createdByUser": true,
    "createdByUserId": true
  },
  "query": {
    "subscriberNotificationStatusMessage": "Successfully sent notifications to 47 subscribers via email and SMS"
  },
  "sort": {
    "createdAt": -1
  }
}

Ответ

{
  "count": 10,
  "limit": 10,
  "skip": 0,
  "data": [
    {
      "_id": "37725500-28fe-11f1-b591-3fdcef396aba",
      "incidentId": "e5f6a7b8-c9d0-1234-5678-90abcdef0123",
      "incidentStateId": "f6a7b8c9-d0e1-2345-6789-0abcdef12345",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "createdByUser": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "createdByUserId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
    },
    {
      "_id": "37725501-28fe-11f1-b591-3fdcef396aba",
      "incidentId": "e5f6a7b8-c9d0-1234-5678-90abcdef0123",
      "incidentStateId": "f6a7b8c9-d0e1-2345-6789-0abcdef12345",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "createdByUser": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "createdByUserId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
    },
    {
      "_id": "37725502-28fe-11f1-b591-3fdcef396aba",
      "incidentId": "e5f6a7b8-c9d0-1234-5678-90abcdef0123",
      "incidentStateId": "f6a7b8c9-d0e1-2345-6789-0abcdef12345",
      "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
      "createdByUser": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "createdByUserId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
    }
  ]
}
GETorPOST/api/incident-state-timeline/:id/get-item

Получить по ID

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

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

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

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

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

POST
/api/incident-state-timeline/:id/get-item
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "select": {
    "incidentId": true,
    "incidentStateId": true,
    "projectId": true,
    "createdByUser": true,
    "createdByUserId": true
  }
}

Ответ

{
  "_id": "37725500-28fe-11f1-b591-3fdcef396aba",
  "incidentId": "e5f6a7b8-c9d0-1234-5678-90abcdef0123",
  "incidentStateId": "f6a7b8c9-d0e1-2345-6789-0abcdef12345",
  "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
  "createdByUser": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "createdByUserId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
POST/api/incident-state-timeline/count

Количество

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

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

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

POST
/api/incident-state-timeline/count
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "query": {
    "subscriberNotificationStatusMessage": "Successfully sent notifications to 47 subscribers via email and SMS"
  }
}

Ответ

{
  "count": 107
}
POST/api/incident-state-timeline

Создать Incident State Timeline

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

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

POST
/api/incident-state-timeline
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "data": {
    "incidentId": "e5f6a7b8-c9d0-1234-5678-90abcdef0123",
    "incidentStateId": "f6a7b8c9-d0e1-2345-6789-0abcdef12345",
    "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
    "createdByUser": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "createdByUserId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
  }
}

Ответ

{
  "_id": "37725500-28fe-11f1-b591-3fdcef396aba",
  "incidentId": "e5f6a7b8-c9d0-1234-5678-90abcdef0123",
  "incidentStateId": "f6a7b8c9-d0e1-2345-6789-0abcdef12345",
  "projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
  "createdByUser": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "createdByUserId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
PUT/api/incident-state-timeline/:id

Обновить по ID

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

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

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

POST/api/incident-state-timeline/:id/update-item
GET/api/incident-state-timeline/:id/update-item

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

PUT
/api/incident-state-timeline/:id
Заголовки
Content-Type: application/json
ApiKey: YOUR_API_KEY
Тело
{
  "data": {
    "incidentStateId": "f6a7b8c9-d0e1-2345-6789-0abcdef12345",
    "incidentState": "f6a7b8c9-d0e1-2345-6789-0abcdef12345",
    "subscriberNotificationStatusMessage": "Successfully sent notifications to 47 subscribers via email and SMS"
  }
}

Ответ

{}
DELETE/api/incident-state-timeline/:id

Удалить по ID

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

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

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

POST/api/incident-state-timeline/:id/delete-item
GET/api/incident-state-timeline/:id/delete-item

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

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

Ответ

{}

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

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

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

Нужны для чтения Incident State Timeline

  • Project Owner
  • Project Admin
  • Project Member
  • Read Incident State Timeline
  • Read All Project Resources

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

Нужны для создания Incident State Timeline

  • Project Owner
  • Project Admin
  • Project Member
  • Create Incident State Timeline

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

Нужны для обновления Incident State Timeline

  • Project Owner
  • Project Admin
  • Project Member
  • Edit Incident State Timeline

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

Нужны для удаления Incident State Timeline

  • Project Owner
  • Project Admin
  • Project Member
  • Delete Incident State Timeline