Get alerts
Query alerts from your Domo instance.Playground
GETEndpoint:
/api/social/v4/alerts?all=true&limit=5
Code Example
Query Parameters
| Property Name | Type | Required | Default | Description |
|---|---|---|---|---|
| all | Boolean | Optional | Whether to fetch all alerts at once | |
| cardId | Integer | Optional | A specific card id to fetch alerts for | |
| currentUserSubscriptions | Boolean | Optional | false | Whether to fetch the alerts subscribed to by the current user |
| dataSetId | String | Optional | A specific dataset id to fetch alerts for | |
| disabled | Boolean | Optional | Whether to fetch only disabled alerts | |
| fields | String | Optional | id, category, type, name, description, resourceType, resourceId, createdAt, createdBy, modifiedAt, modifiedBy | Which alert fields to include in the response (can be set to ‘all’ to fetch all fields) |
| limit | Integer | Optional | 100 | The query limit |
| offset | Integer | Optional | 0 | The query offset (for pagination) |
| ownerId | Integer | Optional | A specific user id to fetch owned alerts for | |
| pageId | Integer | Optional | A specific page id to fetch alerts for | |
| sort | String | Optional | createdAt | The field to sort by |
| subscriberId | Integer | Optional | A specific user id to fetch subscribed alerts for | |
| subscriptionTypes | String | Optional | A list of subscription types to filter the alerts by | |
| suggested | Boolean | Optional | Whether to fetch only alerts that are suggested for you | |
| triggered | String | Optional | Whether to fetch only alerts that have been triggered |
Response
Returns the alerts based on the included query params.Get an alert
Gets an existing alert by id.Playground
GETEndpoint:
/api/social/v4/alerts/{alertId}
Code Example
Path Parameters
| Property Name | Type | Description |
|---|---|---|
| alertId | Integer | The id of the alert you want to get |
Query Parameters
| Property Name | Type | Required | Description |
|---|---|---|---|
| fields | String | Optional | Which alert fields to include in the response |
Response
Returns the alert.Delete an alert
Deletes an existing alert by id.Playground
DELETEEndpoint:
/api/social/v4/alerts/{alertId}
Code Example
Arguments
| Property Name | Type | Required | Description |
|---|---|---|---|
| alertId | Integer | Required | The id of the alert you want to delete |
Response
Returns the parameter of success or error based on the alert id being valid.Subscribe user to an alert
This endpoint subscribes a Domo user to an existing alert.Playground
POSTEndpoint:
/api/social/v4/alerts/{alertId}/subscriptions
Code Example
Arguments
| Property Name | Type | Required | Description |
|---|---|---|---|
| alertId | Integer | Required | The id of the alert you want to subscribe the user to |
Response
Returns the parameter of success or error based on the alert id being valid.Unsubscribe user from an alert
This endpoint unsubscribes a Domo user from an existing alert.Playground
POSTEndpoint:
/api/social/v4/alerts/{alertId}/subscriptions?subscriberId={subscriberId}&type={type}
Code Example
Arguments
| Property Name | Type | Required | Description |
|---|---|---|---|
| alertId | Integer | Required | The id of the alert you want to subscribe the user to |
Query Parameters
| Property Name | Type | Required | Description |
|---|---|---|---|
| subscriberId | Integer | Required | The id of the entity unsubscribing from the alert |
| type | String | Required | The entity type, can be USER, GROUP, BUZZ, DAILY, WEEKLY, or AUTO |
Response
Returns the parameter of success or error based on the alert id being valid.Share an alert
This endpoint shares an existing alert with a Domo user.Playground
POSTEndpoint:
/api/social/v4/alerts/{alertId}/share
Code Example
Arguments
| Property Name | Type | Required | Description |
|---|---|---|---|
| alertId | Integer | Required | The id of the alert you want to subscribe the user to |
Request Body
| Property Name | Type | Required | Description |
|---|---|---|---|
| userMessage | String | Required | The message you want to send to the person |
| alertSubscriptions | Object[] | Required | The entities you want to share the alert with. See above for entity params. |
| sendEmail | Boolean | Whether or not to send an email to the person once the alert is shared | |
| metaData | Object |