/activities

Get a complete list of live or closed activities.

Resource URL

/v1/applications/{communityApiKeyName}/activities

Note:

Use the appropriate regional endpoint to ensure that you comply with your organization's privacy policy, and applicable laws and regulations. For details about the available regional endpoints, and how to identify your organization's region, see API Access.

Note: Some activities are not accessible through the API. For a list of available activities, open the Activities page in the application. For more information, see The Activities page.
Tip: To view the member events associated with the activity, click the summary reference link at the end of the response. For more information, Activity Summary reference.

Available methods

Method Description
GET Returns all the live or closed 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:
  • createdBy
  • id
  • lastUpdatedBy
  • panelId
  • sourceId
  • templateUrl
/activities?status=open&projectType=research
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 except for:
  • createdBy
  • id
  • lastUpdatedBy
  • panelId
  • sourceId
  • templateUrl
/activities?sort=accessedOn:d

For more information, see Content control.

Available Fields

Field Description
accessedOn The timestamp value for the last date the activity was opened in the Activities page of the application.
activityType The string name for the event type. Standard values include:
  • Survey
  • Forum
  • ExternalActivity
  • Sparq1survey
alternateId The ID for an activity in an external system.
Note: Some of activities may be missing from the alternateId in the payload.
closedOn The timestamp value for when the activity status change from open to closed.
Note:
  • This value only applies to activities where the status is either open or closed.
  • This date may occur in the future. An activity may be re-opened after it has been closed.
createDate The timestamp value for the date the activity was created.
createdBy

The GUID value for the user who created the activity.

excludeFromParticipation
The boolean value indicating whether the activity statistics are excluded from the participation metrics:
  • true (default): The activity will not show in participation reports
  • false: The activity will show in participation reports

For more information, see Exclude an activity from community statistics.

hideFromMember The boolean value indicating whether the activity is hidden in the member's activity feed. The default is false.
id The GUID value for the activity's unique identifier.
isReady The boolean value indicating if an activity is ready to be distributed to members.
lastUpdateDate The timestamp value for the date the activity was last changed.
lastUpdatedBy

The GUID value of for the last user who edited the activity.

name The string label for the given activity
openedOn The timestamp value for when the first email invitation or the activity link was set to Open. This value only applies to activities where the status is either open or closed.
Note: This date may occur in the future.
panelId The GUID value for the panel associated with the community.
Note: This is a reserved field.
projectId The GUID value for the parent project of this activity.
projectType The string value of the project type of this activity. Possible values are:
  • Research: A standard activity created from the Projects menu option in the application
  • Recruitment: A system defined activity used for recruiting members that triggers the double opt-in registration workflow
sourceId

The GUID value of an activity that was duplicated.

For example, you duplicate a survey named satisfaction_survey, creating a new survey named satisfaction_survey_copy. The value for sourceId of satisfaction_survey_copy represents the activity named satisfaction_survey.

status
The string value for the activity status as seen in the Distribution page in the application. Possible values are:
  • open
  • closed
statusChangedOn The timestamp value for the date the activity changed from one status to another.
templateUrl The URL used to create an activity based on a template.
Example: GET request

Get a list of activities with a status of open on January 1, 2016.

https://api.{region}.alida.com/v1/applications/{communityApiKeyName}/activities?status=open&q=openedOn>="2016-01-01T00:00:00Z" and openedOn<"2016-01-02T00:00:00Z"
Tip: If the query string parameter q does not work, encode the URL. For more information, see HTML URL Encoding Reference.
Example: GET response
{
   "meta": {
      "offset": 0,
      "limit": 20,
      "count": 1
   },
   "items": [
      {
         "id": <GUID of activity>,
         "sourceId": <GUID of the activity that was duplicated, if applicable>
         "activityType": <type of activity>,
         "name": <activity name>,
         "externalName": <the external activity name as seen by members>,
         "status": <Open|Closed>,
         "statusChangedOn": <date-time (UTC) of when that activity status changed>,
         "alternateId": <GUID of activity in an external system>,
         "projectId": <GUID of parent project>,
         "projectType": <Recruitment|Research|Forum>,
         "excludeFromParticipation": <true|false>,
         "hideFromMember": <true|false>,
         "isReady": <true|false>,
         "openedOn": <date-time (UTC) of when this activity was opened>,
         "closedOn": <date-time (UTC) of when this activity closed>,
         "accessedOn": <date-time (UTC) of when this activity was last accessed on>,
         "createDate": <date-time (UTC) of when this record was created>,
         "createdBy": <user context that created this record>,
         "lastUpdateDate": <date-time (UTC) of when this record was last updated>,
         "lastUpdatedBy": <user context that last updated this record>,
         "templateUrl": <URL of activity template>,
         "links": [
            {
               "rel": "summary",
               "href": "https://api.{region}.alida.com/c/services/api/v1/tenants/{panelId}/activities/{id}/summary"
            }
         ],
         "href": "https://api.{region}.alida.com/c/services/api/v1/tenants/{panelId}/activities/{id}"
      },
      ...
   ],
   "links": [
      {
         "rel": "first",
         "href": "https://api.{region}.alida.com/c/services/api/v1/tenants/{panelId}/activities?offset=0&limit=20"
      },
      {
         "rel": "prev"
      },
      {
         "rel": "last"
      },
      {
         "rel": "next"
      }
   ],
   "href": "https://api.{region}.alida.com/c/services/api/v1/tenants/{panelId}/activities"
}