WhatsApp Log
Logs of all the WhatsApp messages sent out to all users and subscribers for this project.
Модель WhatsApp 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 WhatsApp message was sent to
- Имя
fromNumber- Тип
- Phone
- Описание
Phone Number WhatsApp message was sent from (Business Number ID)
- Имя
messageText- Тип
- Very Long Text
- Описание
Text content of the WhatsApp message
- Имя
statusMessage- Тип
- Long Text
- Описание
Status Message (if any)
- Имя
whatsAppMessageId- Тип
- Text
- Описание
Message ID returned by Meta's API
- Имя
status- Тип
- TextОбязательно
- Описание
Status of the WhatsApp message sent
- Имя
whatsAppCostInUSDCents- Тип
- NumberОбязательно
- Описание
WhatsApp Message Cost in USD Cents
- Имя
incident- Тип
- Incident
- Описание
Incident associated with this message (if any)
- Имя
incidentId- Тип
- Object ID
- Описание
ID of Incident associated with this message (if any)
- Имя
user- Тип
- User
- Описание
User who initiated this message (if any)
- Имя
userId- Тип
- Object ID
- Описание
ID of User who initiated this message (if any)
- Имя
alert- Тип
- Alert
- Описание
Alert associated with this message (if any)
- Имя
alertId- Тип
- Object ID
- Описание
ID of Alert associated with this message (if any)
- Имя
monitor- Тип
- Monitor
- Описание
Monitor associated with this message (if any)
- Имя
monitorId- Тип
- Object ID
- Описание
ID of Monitor associated with this message (if any)
- Имя
scheduledMaintenance- Тип
- Scheduled Maintenance Event
- Описание
Scheduled Maintenance associated with this message (if any)
- Имя
scheduledMaintenanceId- Тип
- Object ID
- Описание
ID of Scheduled Maintenance associated with this message (if any)
- Имя
statusPage- Тип
- Status Page
- Описание
Status Page associated with this message (if any)
- Имя
statusPageId- Тип
- Object ID
- Описание
ID of Status Page associated with this message (if any)
- Имя
statusPageAnnouncement- Тип
- Status Page Announcement
- Описание
Status Page Announcement associated with this message (if any)
- Имя
statusPageAnnouncementId- Тип
- Object ID
- Описание
ID of Status Page Announcement associated with this message (if any)
- Имя
team- Тип
- Team
- Описание
Team associated with this message (if any)
- Имя
teamId- Тип
- Object ID
- Описание
ID of Team associated with this message (if any)
- Имя
onCallDutyPolicy- Тип
- On-Call Policy
- Описание
On-Call Duty Policy associated with this message (if any)
- Имя
onCallDutyPolicyId- Тип
- Object ID
- Описание
ID of On-Call Duty Policy associated with this message (if any)
- Имя
onCallDutyPolicyEscalationRule- Тип
- Escalation Rule
- Описание
On-Call Duty Policy Escalation Rule associated with this message (if any)
- Имя
onCallDutyPolicyEscalationRuleId- Тип
- Object ID
- Описание
ID of On-Call Duty Policy Escalation Rule associated with this message (if any)
- Имя
onCallDutyPolicySchedule- Тип
- On-Call Policy Schedule
- Описание
On-Call Duty Policy Schedule associated with this message (if any)
- Имя
onCallDutyPolicyScheduleId- Тип
- Object ID
- Описание
ID of On-Call Duty Policy Schedule associated with this message (if any)
/api/whatsapp-log/get-listСписок
Этот метод возвращает постраничный список ваших объектов «WhatsApp Log». По умолчанию на странице до десяти записей.
Необязательные query-параметры
limit- число
- Сколько объектов вернуть. По умолчанию 10, максимум 100
skip- число
- Сколько объектов пропустить (для пагинации)
Необязательное тело запроса
query- Чтобы фильтровать WhatsApp Log, укажите запрос здесь. Подробнее: написание запросов.
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
sort- По умолчанию сортировка по дате создания. Порядок можно изменить — см. раздел «Сортировка» в типах данных.
Запрос списка
POST/api/whatsapp-log/get-list?skip=0&limit=10Content-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"projectId": true,
"status": true,
"toNumber": true,
"whatsAppCostInUSDCents": true,
"_id": true
},
"query": {
"status": "Example status of the whatsapp message"
},
"sort": {
"createdAt": -1
}
}Ответ
{
"count": 10,
"limit": 10,
"skip": 0,
"data": [
{
"_id": "377f9b73-28fe-11f1-b591-3fdcef396aba",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"status": "Example status of the whatsapp message",
"toNumber": "+1-555-123-4567",
"whatsAppCostInUSDCents": 100
},
{
"_id": "377fc280-28fe-11f1-b591-3fdcef396aba",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"status": "Example status of the whatsapp message",
"toNumber": "+1-555-123-4567",
"whatsAppCostInUSDCents": 100
},
{
"_id": "377fc281-28fe-11f1-b591-3fdcef396aba",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"status": "Example status of the whatsapp message",
"toNumber": "+1-555-123-4567",
"whatsAppCostInUSDCents": 100
}
]
}/api/whatsapp-log/:id/get-itemПолучить по ID
Возвращает объект «WhatsApp Log» по идентификатору.
id- строка
- ID объекта
Необязательное тело запроса
select- По умолчанию возвращается только ID; для других полей используйте select. Подробнее: как выбирать поля.
Запрос одного объекта
POST/api/whatsapp-log/:id/get-itemContent-Type: application/json ApiKey: YOUR_API_KEY
{
"select": {
"projectId": true,
"status": true,
"toNumber": true,
"whatsAppCostInUSDCents": true,
"_id": true
}
}Ответ
{
"_id": "550e8400-e29b-41d4-a716-446655440000",
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"status": "Example status of the whatsapp message",
"toNumber": "+1-555-123-4567",
"whatsAppCostInUSDCents": 100
}/api/whatsapp-log/countКоличество
Возвращает количество ваших объектов «WhatsApp Log».
Необязательное тело запроса
query- Чтобы фильтровать WhatsApp Log, укажите запрос здесь. Подробнее: написание запросов.
Запрос количества
POST/api/whatsapp-log/countContent-Type: application/json ApiKey: YOUR_API_KEY
{
"query": {
"status": "Example status of the whatsapp message"
}
}Ответ
{
"count": 107
}Права доступа
Для операций с ресурсом у ключа API должны быть права. При их отсутствии вернётся ответ 4xx.
Права на чтение
Нужны для чтения WhatsApp Log
Project OwnerProject AdminProject MemberRead WhatsApp LogRead All Project Resources
Права на создание
Нужны для создания WhatsApp Log
Права на обновление
Нужны для обновления WhatsApp Log
Права на удаление
Нужны для удаления WhatsApp Log