--- title: ActivitySubscriptions API description: The ActivitySubscriptions API provides endpoints to retrieve Activity entities from the Subscriptions and Activity Feed Framework.Retrieves activity records from the Subscriptions and Activity Feed Framework.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. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/api-reference/rest-apis/actsub-api.html release: australia product: REST APIs classification: rest-apis topic_type: concept last_updated: "2026-03-12" reading_time_minutes: 18 breadcrumb: [REST API reference, API reference, API implementation and reference] --- # ActivitySubscriptions API 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](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/customer-service-management/configure-customer-central.md). **Parent Topic:**[REST API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/api-rest.md) ## 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` **Note:** Available versions are specified in the [REST API Explorer](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/use-REST-API-Explorer.md). For scripted REST APIs there is additional version information on the [Scripted REST Service form](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-api-explorer/c_CustomWebServices.md). ### 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 |
|---|---|
| before | Date/time value. The request returns only records created prior to this date and time.Data type: String Format: YYYY-MM-DD hh:mm:ss or YYYY-MM-DD |
| context | Required. Sys\_id of an activity context.Predefined activity contexts include Consumer and Contact. Data type: String Table: Activity Context \[sn\_actsub\_activity\_context\] |
| context\_instance | Required. Sys\_id of an instance of the specified activity context, representing the initiator of the activities you want to retrieve. Located in the appropriate table for the activity context.As an example, if you set **context** to the sys\_id of the Consumer activity context, set this parameter to the sys\_id of the Consumer \[csm\_consumer\] table record for the consumer whose activities you want to retrieve. Data type: String |
| end\_date | Date/time value. The request returns only records created during the time period defined by **start\_date** and this parameter. Must be set along with **start\_date**.Data type: String Format: YYYY-MM-DD hh:mm:ss or YYYY-MM-DD |
| facets | Comma-separated list of sys\_ids of activity facet types to retrieve for the specified activity context.For more details on activity facets, see [Create facets for activity contexts](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/customer-service-management/create-facet-customer-central.md). Data type: String Default: Return all activity facet types configured for the activity context. Table: Activity Facet \[sn\_actsub\_facet\] |
| last | Index value of the first result row omitted from the response body. The result row index starts at 0, so the last row included in the response body is the one with the index **last**-1.For example, setting `last=5` omits rows with index 5 and above and returns at most only the first five result rows \(with index values 0 through 4\). Setting `stFrom=1` and `last=5` skips the first result row and returns the second through fifth result rows \(with index values 1 through 4\). Data type: Number \(integer\) Default: The value of the **com.snc.actsub.activities.api.fetch.limit** system property \(10 by default\). |
| record\_id | Sys\_id of a record to use when rendering dynamic facets. Located in the appropriate table for the activity type you want to retrieve.For example, if you want to fetch activities for a Case record, set this parameter to the sys\_id of the Case record in question. For more details on dynamic facets, see [Create facets for activity contexts](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/customer-service-management/create-facet-customer-central.md). Data type: String |
| start\_date | Date/time value. The request returns only records created during the time period defined by this parameter and **end\_date**. Must be set along with **end\_date**.Data type: String Format: YYYY-MM-DD hh:mm:ss or YYYY-MM-DD |
| stFrom | Index value of the first result row to include in the response body. The result row index starts at 0.For example, `stFrom=2` skips the first two result rows and returns results from the third row onward. Data type: Number \(integer\) Default: 0 |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Status code | Description |
|---|---|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. The response body **result.message** parameter describes the nature of the error.Example error messages: - `Make sure a valid context and context_instance are passed` or `Make sure a valid stream and user are passed` indicates that the request lacks one or both of the **context** and **context\_instance** query parameters. These parameters are required. - `stFrom can not be greater than last` indicates that the **stFrom** query parameter value exceeds the **last** query parameter value. - `Please provide start_date and end_date` indicates that the request includes only one of the **start\_date** and **end\_date** query parameters, which cannot be used separately. - `start_date can not be ahead of end_date` indicates that the specified **start\_date** query parameter value occurs after the specified **end\_date** query parameter value. - `Provided context is not configured in the system` indicates that the **context** query parameter value does not represent a valid activity context. - `Make sure a valid context_instance is passed` indicates that the **context\_instance** query parameter value does not represent a valid instance of the specified activity context. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
| Name | Description |
|---|---|
| result | Result object.Data type: Object ``` "result": { "activities": [Array], "message": "String", "status": Number, "stream": "String", "user": "String" } ``` |
| result.activities | Array of objects in which each object represents an activity record from the specified activity context and context instance.Data type: Array of Objects ``` "activities": [ { "activity_type_id": "String", "content_fields": [Array], "created": "String", "icon": "String", "source_table_name": "String", "subheader_fields": [Array], "subobject_sys_id": "String", "subobject_table_name": "String", "sys_id": "String", "title": "String" } ] ``` |
| result.activities.activity\_type\_id | Sys\_id of the record from the Activity Types \[sn\_actsub\_activity\_type\] table that corresponds to the type of this activity record.Data type: String |
| result.activities.content\_fields | Array of objects in which each object represents a field to display as content in the tile for the activity record.Data type: Array of Objects ``` "content_fields": [ { "deeplink_to_subobject": "String", "display_as_timeago": "String", "label": "String", "show_label": "String", "type": "String", "value": "String" } ] ``` |
| result.activities.content\_fields.deeplink\_to\_subobject | Flag indicating whether or not the content field displays as a hyperlink to the record for the object on which this activity was performed.Valid values: - true: The content field displays as a hyperlink to the record for the object on which this activity was performed. - false: The content field displays as a hyperlink to the record for the object on which this activity was performed. Data type: String |
| result.activities.content\_fields.display\_as\_timeago | Flag indicating whether or not the content field displays in time ago format.Valid values: - true: The content field displays in time ago format. - false: The content field does not display in time ago format. Data type: String |
| result.activities.content\_fields.label | Label for the content field.Data type: String |
| result.activities.content\_fields.show\_label | Flag indicating whether or not the content field label displays for content field values in the tile for this activity record.Valid values: - true: The content field label displays for content field values in the tile for this activity record. - false: The content field label doesn't display for content field values in the tile for this activity record. Data type: String |
| result.activities.content\_fields.type | Type of the content field.Data type: String |
| result.activities.content\_fields.value | Value of the content field.Data type: String |
| result.activities.created | Creation date/time for this activity record.Data type: String Format: YYYY-DD-MM hh:mm:ss |
| result.activities.icon | Name of the icon displayed on the tile for this activity record.Data type: String |
| result.activities.source\_table\_name | Name of the table in which this activity record is located. Determined by the Activity Source defined in the Activity Types \[sn\_actsub\_activity\_type\] table for the type associated with this activity record. Data type: String |
| result.activities.subheader\_fields | Array of objects in which each object represents a field displayed in the subheader of the tile for this activity record.Data type: Array of Objects ``` "subheader_fields": [ { "deeplink_to_subobject": "String", "display_as_timeago": "String", "label": "String", "show_label": "String", "type": "String", "value": "String" } ] ``` |
| result.activities.subheader\_fields.deeplink\_to\_subobject | Flag indicating whether or not the subheader field displays as a hyperlink to the record for the object on which this activity was performed.Valid values: - true: The subheader field displays as a hyperlink to the record for the object on which this activity was performed. - false: The subheader field doesn't display as a hyperlink to the record for the object on which this activity was performed. Data type: String |
| result.activities.subheader\_fields.display\_as\_timeago | Flag indicating whether or not the subheader field displays in time ago format.Valid values: - true: The subheader field displays in time ago format. - false: The subheader field doesn't display in time ago format. Data type: String |
| result.activities.subheader\_fields.label | Label for the subheader field.Data type: String |
| result.activities.subheader\_fields.show\_label | Flag indicating whether or not the subheader field label displays for subheader field values in the tile for this activity record.Valid values: - true: The subheader field label displays for subheader field values in the tile for this activity record. - false: The subheader field label doesn't display for subheader field values in the tile for this activity record. Data type: String |
| result.activities.subheader\_fields.type | Type of the subheader field.Data type: String |
| result.activities.subheader\_fields.value | Value of the subheader field.Data type: String |
| result.activities.subobject\_sys\_id | Sys\_id of the record for the object on which this activity was performed. Located in the table specified in the **subobject\_table\_name** parameter value.Data type: String |
| result.activities.subobject\_table\_name | Name of the table containing the record for the object on which this activity was performed. Determined by the Table Name defined in the Activity Group \[sn\_actsub\_subscribable\_object\] table for the group containing the activity type associated with this activity record. Data type: String |
| result.activities.sys\_id | Sys\_id of this activity record. Located in the table specified as the **source\_table\_name** response body parameter value.Data type: String |
| result.activities.title | Title that displays on the tile for this activity record.Data type: String |
| result.hasMoreRecords | Flag indicating whether or not the list of activities in the response body is truncated by the **last** query parameter value.Valid values: - true: The list of activities in the response body is truncated by the **last** query parameter value. Repeating the request with a higher **last** query parameter value will return additional activities for this context and context instance. - false: The list of activities in the response body isn't truncated by the **last** query parameter value. No further activities are available for this context and context instance. Data type: String |
| result.message | Error message describing the problem encountered during request processing.Data type: String |
| result.status | HTTP status code returned for request.Valid values: Refer to Status Codes. Data type: Number |
| result.stream | Sys\_id specified in request **context** query parameter.Data type: String Table: Activity Context \[sn\_actsub\_activity\_context\] |
| result.user | Sys\_id specified in request **context\_instance** query parameter. Located in the appropriate table for the activity context.Data type: String |
| Name | Description |
|---|---|
| activity\_context | Sys\_id of an activity context.Predefined activity contexts include Consumer and Contact. Navigate to **Customer Central** > **Customer Activity** > **Activity Contexts** 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 |
|---|---|
| end\_date | Date/time value. The request returns only records created during the time period defined by **start\_date** and this parameter. Must be set along with **start\_date**.Data type: String Format: YYYY-MM-DD hh:mm:ss or YYYY-MM-DD |
| facets | Comma-separated list of sys\_ids of activity facets to retrieve for the specified activity context.To see the activity facet types defined for an activity context, navigate to **Customer Central** > **Customer Activity** > **Activity Contexts** and examine the **Facets** related list. Data type: String Default: Return all activity facets configured for the activity context. |
| get\_activity\_count | Flag indicating whether or not to include activity counts for each facet in the response body.Valid values: - true: Include facet activity counts. - false: Omit facet activity counts. Data type: Boolean Default: false |
| lazy\_load | Flag indicating whether or not to improve performance by omitting facet activity data and activity counts from the response body. This parameter takes precedence over **get\_activity\_count**.Valid values: - true: Omit facet activity data and activity counts. - false: Retrieve facet activity data and activity counts. Data type: Boolean Default: false |
| start\_date | Date/time value. The request returns only records created during the time period defined by this parameter and **end\_date**. Must be set along with **end\_date**.Data type: String Format: YYYY-MM-DD hh:mm:ss or YYYY-MM-DD |
| Header | Description |
|---|---|
| Accept | Data format of the response body. Supported types: **application/json** or **application/xml**. Default: **application/json** |
| Status code | Description |
|---|---|
| 200 | Successful. The request was successfully processed. |
| 400 | Bad Request. A bad request type or malformed request was detected. The response body **result.message** parameter describes the nature of the error.Example error messages: - `Make sure a valid activity context details are passed` indicates that the **activity\_context** path parameter value does not represent a valid activity context, the **context\_instance** path parameter value does not represent a valid instance of the specified activity context, or both. - `Please provide start_date and end_date` indicates that the request includes only one of the **start\_date** and **end\_date** query parameters, which cannot be used separately. - `start_date can not be ahead of end_date` indicates that the specified **start\_date** query parameter value occurs after the specified **end\_date** query parameter value. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
| Name | Description |
|---|---|
| result | List of activity facets.Data type: Array of Objects ``` "result": [ { "activity_count": Number, "children": [Array], "facets": [Array], "icon": "String", "is_dynamic": "String", "message": "String", "name": "String", "status": Number } ] ``` |
| result.activity\_count | Number of activity records included in this facet \(and its children, if any. Only displayed when **lazy\_load** query parameter is false and **get\_activity\_count** query parameter is true.Data type: Number |
| result.children | Array of objects in which each object represents an activity record \(if this is a dynamic facet\) or a child facet \(if this is a static facet\).Data type: Array of Objects ``` "children": [ { "activity_count": Number "facet": "String", "icon": "String", "title": "String" } ] ``` |
| result.children.activity\_count | Number of activity records included in this child facet \(and its children, if any\). Only displayed when the **lazy\_load** query parameter is false and the **get\_activity\_count** query parameter is true.Data type: Number |
| result.children.created | Creation date/time for this activity record.Data type: String Format: YYYY-MM-DD hh:mm:ss |
| result.children.facet | Sys\_id of this child facet record.Data type: String Table: Activity Facet \[sn\_actsub\_facet\] |
| result.children.icon | Name of the icon associated with this child facet.Data type: String |
| result.children.sys\_id | Sys\_id of this activity record. Located in the appropriate table for the parent facet type.As an example, an activity record included in the Cases facet has a sys\_id located in the Case \[sn\_customerservice\_case\] table. Data type: String |
| result.children.metadata | Array of objects in which each object includes activity record data for a facet field configured in the Activity Facet \[sn\_actsub\_facet\] table record for this facet type.Data type: Array of Objects ``` "metadata": [ { "key": "String", "label": "String", "type": "String", "value": "String" } ] ``` |
| result.children.metadata.key | Name of this facet field.Data type: String |
| result.children.metadata.label | Label of this facet field.Data type: String |
| result.children.metadata.type | Type of this facet field.Data type: String |
| result.children.metadata.value | Value of this facet field.Data type: String |
| result.children.title | Name of this activity record or child facet.Data type: String |
| result.facets | List of sys\_ids associated with this facet record. For a dynamic facet, this array contains the sys\_id of the facet itself. For a static facet, it instead contains the sys\_ids of all facets which are children of the facet.Data type: Array ``` "facets": [ "510d7e2e73570010e37d71ef64f6a70d", "bc9bfaaa73570010e37d71ef64f6a771" ] ``` Table: Activity Facet \[sn\_actsub\_facet\] |
| result.icon | Name of the icon associated with this facet.Data type: String |
| result.is\_dynamic | Flag indicating whether or not this facet is a dynamic facet. This value determines the type of information included in the **children** response body parameter.Possible values: - true: This is a dynamic facet. The **children** response body parameter value contains activity record details, and the **facets** parameter contains the dynamic facet sys\_id. - false: This is a static facet \(a facet group\). The **children** response body parameter value contains child facets, and the **facets** parameter contains the sys\_ids of these child facets. Data type: Boolean |
| result.message | Error message describing problem encountered during request processing.Data type: String |
| result.name | Name of the facet or facet group.Data type: String |
| result.status | HTTP status code returned for request.Possible values: See the Status Code table. Data type: Number |