ActivitySubscriptions API
-
- UpdatedJan 30, 2025
- 13 minutes to read
- Yokohama
- API reference
The ActivitySubscriptions API provides endpoints to retrieve Activity entities from the Subscriptions and Activity Feed Framework.
This API requires activation of the Subscriptions and Activity Feed Framework (com.snc.activity_subscriptions) plugin. Activate the Customer Central (com.sn_csm_customer_central) plugin to seed configuration in all required tables. For more information on customer central configuration settings, see Configure customer central.
ActivitySubscriptions - GET /now/actsub/activities
Retrieves activity records from the Subscriptions and Activity Feed Framework.
No role is required to access this endpoint, but data returned is limited by user access settings.
URL format
Versioned URL: /api/now/{api_version}/actsub/activities
Default URL: /api/now/actsub/activities
Supported request parameters
Name | Description |
---|---|
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Request the second and third activity records for a specific Contact, limiting to data from 2020:
The response body includes the two requested activity records for the specified Contact:
ActivitySubscriptions - GET /now/actsub/facets/{activity_context}/{context_instance}
Retrieves facets configured for an activity context from the Subscriptions and Activity Feed Framework. Displays activity counts and data for each facet as determined by activity type, group, and context settings.
Users must have the actsub_user or admin role to access this endpoint. Data returned is limited by user access settings.
For more details on activity context facets, see Create facets for activity contexts.
URL format
Versioned URL: /api/now/{api_version}/actsub/facets/{activity_context}/{context_instance}
Default URL: /api/now/actsub/facets/{activity_context}/{context_instance}
Supported request parameters
Name | Description |
---|---|
activity_context | Sys_id of an activity context. Predefined activity contexts include Consumer and Contact. Navigate to to view the full list of activity contexts defined for your instance.Data type: String Table: Activity Contexts [sn_actsub_activity_context] |
api_version | Optional. Version of the endpoint to access. For example, v1 or v2. Only specify this value to use an endpoint version other than the
latest.
Data type: String |
context_instance | Sys_id of an instance of the specified activity context, representing the initiator of the activities you want to retrieve facets for. As an example, if you set activity_context to the sys_id of the Contact activity context, you should set this parameter to the sys_id of the Contact [customer_contact] record for the contact whose activity facets you want to retrieve. Data type: String Table: In the context table specified for the activity context record in the Activity Contexts [sn_actsub_activity_context] table. |
Name | Description |
---|---|
None |
Headers
The following request and response headers apply to this HTTP action only, or apply to this action in a distinct way. For a list of general headers used in the REST API, see Supported REST API headers.
Header | Description |
---|---|
Accept | Data format of the response
body. Supported types: application/json or
application/xml.
Default: application/json |
Header | Description |
---|---|
None |
Status codes
The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST API HTTP response codes.
Response body parameters (JSON or XML)
Example: cURL request
Retrieve Chat, Phone, and Knowledge articles facets and activity counts for a Contact:
The response body includes the three requested facets as children of their facet groups, with activity counts displayed: