Get a collection of Touchpoint activities.
Resource URL
/v2/applications/{communityApiKeyName}/touchpoint/activities
Available methods
| Method | Description |
|---|---|
| GET | Returns a collection of Touchpoint activities. |
Parameters
Use the following parameters to control how the data is returned:
| Operation | Description | Example |
|---|---|---|
| Refine the response by field | To reduce the number of fields returned, specify the fields in a comma separated list. |
/activities?fields=name,id
|
| Filtering by value |
By default, all the items are returned unless you specify your criteria using the variable name and value. You can filter the response on all the values in the fields except for:
|
/activities?status=ACTIVITY_PUBLISHED&type=ACTIVITY_NPS
|
| Paging | By default, 20 items are returned at a time and the maximum is 1000. | Use the limit and offset query string parameters to effectively page through the results. |
| Sorting | You can sort the response on all of the available items. |
/activities?sort=created_at:d
|
For more information, see Content control.
Available Fields
| Field | Description |
|---|---|
id
|
The ID of the activity. |
org_id
|
The Touchpoint org that the activity is associated with. This is mapped to the communityApiKeyName. |
name
|
The string label for the given activity. |
status
|
The string value for the activity status. Standard values include:
|
created_at
|
The timestamp value for the date the activity was created. |
updated_at
|
The timestamp value for the date the activity was last changed. |
published_at
|
The timestamp value for the date the activity was first distributed. |
uid
|
The unique identifier of the activity. |
share_settings
|
The share settings of the activity. |
type
|
The string value for the activity type. Standard values include:
|
can_publish
|
The boolean value denoting whether the activity can be published in its current state. |
styles
|
The styles of the activity. |
etc
|
Extra attributes of the activity. |
live_activity_id
|
For activities with status
ACTIVITY_REPUBLISH_DRAFT, this value is a
reference to the live activity associated with the republish draft.
|
republish_draft_id
|
For activities with status
ACTIVITY_PUBLISHED, this value is a reference
to the republish draft activity if one exists.
|
Example: GET request
Get published activities and order by descending created_at date.
https://api.{region}.alida.com/v2/applications/{applicationName}/touchpoint/activities?status=ACTIVITY_PUBLISHED&sort=created_at:d
Example: GET response
{
"items": [
{
"id": <id of activity>,
"org_id": <org id of activity>,
"name": <activity name>,
"status": <activity status>,
"created_at": <date-time (UTC)>,
"updated_at": <date-time (UTC)>,
"published_at": <date-time (UTC)>,
"uid": <unique identifier of activity>,
"share_settings": <activity share settings>,
"type": <activity type>,
"can_publish": <true|false>,
"styles": <activity styles>,
"etc": <activity extra attributes>,
“live_activity_id”: <reference to live activity id, if exists>,
“republish_draft_id”: <reference to republish draft id, if exists>
},
…
],
"meta": {
"limit": 20,
"offset": 0,
"count": "1"
},
"links": [
{
"rel": "first",
"href": "https://api.{region}.alida.com/v2/applications/{applicationName}/touchpoint/activities?limit=1&offset=0&sort=created_at%3Ad&status=ACTIVITY_PUBLISHED"
},
{
"rel": "last"
},
{
"rel": "prev"
},
{
"rel": "next"
}
]
}