SMS Log
Logs of all the SMS sent out to all users and subscribers for this project.
Модель SMS Log
Свойства
- Имя
_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
- Имя
toNumber- Тип
- PhoneОбязательно
- Описание
Phone Number SMS was sent to
- Имя
fromNumber- Тип
- Phone
- Описание
Phone Number SMS was sent from
- Имя
smsText- Тип
- Very Long Text
- Описание
Text content of the message
- Имя
statusMessage- Тип
- Long Text
- Описание
Status Message (if any)
- Имя
providerExternalId- Тип
- Long Text
- Описание
ID returned by the SMS provider (used for delivery status webhooks)
- Имя
status- Тип
- TextОбязательно
- Описание
Status of the SMS sent
- Имя
smsCostInUSDCents- Тип
- NumberОбязательно
- Описание
SMS Cost in USD Cents
- Имя
incident- Тип
- Incident
- Описание
Incident associated with this SMS (if any)
- Имя
incidentId- Тип
- Object ID
- Описание
ID of Incident associated with this SMS (if any)
- Имя
user- Тип
- User
- Описание
User who initiated this SMS (if any)
- Имя
userId- Тип
- Object ID
- Описание
ID of User who initiated this SMS (if any)
- Имя
alert- Тип
- Alert
- Описание
Alert associated with this SMS (if any)
- Имя
alertId- Тип
- Object ID
- Описание
ID of Alert associated with this SMS (if any)
- Имя
monitor- Тип
- Monitor
- Описание
Monitor associated with this SMS (if any)
- Имя
monitorId- Тип
- Object ID
- Описание
ID of Monitor associated with this SMS (if any)
- Имя
scheduledMaintenance- Тип
- Scheduled Maintenance Event
- Описание
Scheduled Maintenance associated with this SMS (if any)
- Имя
scheduledMaintenanceId- Тип
- Object ID
- Описание
ID of Scheduled Maintenance associated with this SMS (if any)
- Имя
statusPage- Тип
- Status Page
- Описание
Status Page associated with this SMS (if any)
- Имя
statusPageId- Тип
- Object ID
- Описание
ID of Status Page associated with this SMS (if any)
- Имя
statusPageAnnouncement- Тип
- Status Page Announcement
- Описание
Status Page Announcement associated with this SMS (if any)
- Имя
statusPageAnnouncementId- Тип
- Object ID
- Описание
ID of Status Page Announcement associated with this SMS (if any)
- Имя
onCallDutyPolicy- Тип
- On-Call Policy
- Описание
On-Call Duty Policy associated with this SMS (if any)
- Имя
onCallDutyPolicyId- Тип
- Object ID
- Описание
ID of On-Call Duty Policy associated with this SMS (if any)
- Имя
onCallDutyPolicyEscalationRule- Тип
- Escalation Rule
- Описание
On-Call Duty Policy Escalation Rule associated with this SMS (if any)
- Имя
onCallDutyPolicyEscalationRuleId- Тип
- Object ID
- Описание
ID of On-Call Duty Policy Escalation Rule associated with this SMS (if any)
- Имя
onCallDutyPolicySchedule- Тип
- On-Call Policy Schedule
- Описание
On-Call Duty Policy Schedule associated with this SMS (if any)
- Имя
onCallDutyPolicyScheduleId- Тип
- Object ID
- Описание
ID of On-Call Duty Policy Schedule associated with this SMS (if any)
- Имя
team- Тип
- Team
- Описание
Team associated with this SMS (if any)
- Имя
teamId- Тип
- Object ID
- Описание
ID of Team associated with this SMS (if any)
/api/sms-log/get-listСписок
Этот метод возвращает постраничный список ваших объектов «SMS Log». По умолчанию на странице до десяти записей.
Необязательные query-параметры
limit- число
- Сколько объектов вернуть. По умолчанию 10, максимум 100
skip- число
- Сколько объектов пропустить (для пагинации)
Необязательное тело запроса
query- Чтобы фильтровать SMS Log, укажите запрос здесь. Подробнее: написание запросов.
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
sort- По умолчанию сортировка по дате создания. Порядок можно изменить — см. раздел «Сортировка» в типах данных.
Запрос списка
POST/api/sms-log/get-list?skip=0&limit=10Content-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"projectId": true,
"smsCostInUSDCents": true,
"status": true,
"toNumber": true,
"alert": true
},
"query": {
"status": "Delivered"
},
"sort": {
"createdAt": -1
}
}Ответ
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "37789690-28fe-11f1-b591-3fdcef396aba",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"smsCostInUSDCents": 75,
"status": "Delivered",
"toNumber": "+1-555-123-4567",
"alert": "d4e5f6a7-89ab-23de-f456-456789abcdef"
},
{
"_id": "37789691-28fe-11f1-b591-3fdcef396aba",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"smsCostInUSDCents": 75,
"status": "Delivered",
"toNumber": "+1-555-123-4567",
"alert": "d4e5f6a7-89ab-23de-f456-456789abcdef"
},
{
"_id": "37789692-28fe-11f1-b591-3fdcef396aba",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"smsCostInUSDCents": 75,
"status": "Delivered",
"toNumber": "+1-555-123-4567",
"alert": "d4e5f6a7-89ab-23de-f456-456789abcdef"
}
]
}/api/sms-log/:id/get-itemПолучить по ID
Возвращает объект «SMS Log» по идентификатору.
id- строка
- ID объекта
Необязательное тело запроса
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
Запрос одного объекта
POST/api/sms-log/:id/get-itemContent-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"projectId": true,
"smsCostInUSDCents": true,
"status": true,
"toNumber": true,
"alert": true
}
}Ответ
{
"_id": "37789690-28fe-11f1-b591-3fdcef396aba",
"projectId": "5f8b9c0d-e1a2-4b3c-8d5e-6f7a8b9c0d1e",
"smsCostInUSDCents": 75,
"status": "Delivered",
"toNumber": "+1-555-123-4567",
"alert": "d4e5f6a7-89ab-23de-f456-456789abcdef"
}/api/sms-log/countКоличество
Возвращает количество ваших объектов «SMS Log».
Необязательное тело запроса
query- Чтобы фильтровать SMS Log, укажите запрос здесь. Подробнее: написание запросов.
Запрос количества
POST/api/sms-log/countContent-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {
"status": "Delivered"
}
}Ответ
{
"count": 107
}Права доступа
Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.
Права на чтение
Нужны для чтения SMS Log
Project OwnerProject AdminProject MemberRead SMS LogRead All Project Resources
Права на создание
Нужны для создания SMS Log
Права на обновление
Нужны для обновления SMS Log
Права на удаление
Нужны для удаления SMS Log