Querying for activities

Activities cannot exist on their own. They must be attached to a parent object. In ClaimCenter, activities can be attached only to claims (directly or indirectly).

Use the following endpoints to GET activities.

Endpoint Returns
/common/v1/activities

By default, all activities the caller can access based on the relevant Access Control Lists (ACLs). (For more information on the default behavior, see the note at the end of this table.) This endpoint also has special assignedUser and assignedUsername filters. For more information, see The assignedUser filters.

/common/v1/activities/{activityId} The activity with the given ID.
/claim/v1/claims/{claimId}/activities

All activities associated with the given claim. This endpoint also has special assignedUser and assignedUsername filters. For more information, see The assignedUser filters.

Note: By default, internal users who are calling the /common/v1/activities endpoint can view all activities they have permission to access according to their Access Control Lists. This behavior is controlled by the GiveInternalUsersFullPermissionsInCommonActivitiesApi application configuration parameter, which is set to true by default. When it is set to false, internal users can view only activities that are explicitly assigned to them.

Note that the endpoints to retrieve activities exist in different APIs. To get all activities for a claim, you use an endpoint in the Claim API. But to get information about all activities (regardless of parent), or to get information about a specific activity, you use endpoints in the Common API.

For example, the following query retrieves the IDs and subjects of all activities for account demo_sample:1. This endpoint is in the Claim API.

Request

GET claim/v1/claims/demo_sample:1/activities?fields=id,subject

Response

{
  "count": 14,
    "data": [
      {
        "attributes": {
          "id": "cc:23218",
          "subject": "Contact insured"
        }
      },
      {
        "attributes": {
          "id": "cc:40404",
          "subject": "Determine fault rating"
        }
      },
      ...

The following query retrieves activity cc:40404 in detail. This endpoint is in the Common API.

Request

GET /common/v1/activities/pc:40404

Response

{
  "data": {
    "attributes": {
      "activityPattern": "general_reminder",
      "activityType": {
        "code": "general",
        "name": "General"
      },
      "assignedGroup": {
        "displayName": "Auto1 - TeamA",
        "id": "demo_sample:31"
      },
      "assignedUser": {
        "displayName": "Andy Applegate",
        "id": "demo_sample:1",
        "type": "User",
        "uri": "/admin/v1/users/demo_sample:1"
      },
      "assignmentStatus": {
        "code": "assigned",
        "name": "Assigned"
      },
      "createTime": "2023-11-18T02:00:20.481Z",
      "dueDate": "2023-11-07T00:00:00.000Z",
      "escalated": false,
      "externallyOwned": false,
      "id": "cc:40404",
      "importance": {
        "code": "notOnCalendar",
        "name": "Not On Calendar"
      },
      "mandatory": false,
      "priority": {
        "code": "normal",
        "name": "Normal"
      },
      "recurring": false,
      "relatedTo": {
        "displayName": "Ray Newton",
        "id": "cc:SW8RXsrWJZiKa7jfCEAYr",
        "type": "ClaimContact",
        "uri": "/claim/v1/claims/demo_sample:1/contacts/cc:SW8RXsrWJZiKa7jfCEAYr"
      },
      "status": {
        "code": "open",
        "name": "Open"
      },
      "subject": "Determine fault rating"
    },
    ...