Show / Hide Table of Contents

    Tasks

    This article documents how to perform actions via the API relating to tasks. Ensure that the appropriate authentication headers are configured when sending these requests.

    Service location

    The endpoint you need to use is based on which environment is hosting your PACE system. You can find this out by checking your normal login link. Make your selection below and all examples will be tailored to your environment.

    Schema

    {
        "FullName": string,
        "UserID": string,
        "UserGuid": Guid,
        "IsLocked": boolean,
        "UserStatus": string,  // Active | Archived | Suspended | Long term absent
        "GUID": Guid,
        "TemplateName": string,
        "Status": string,
        "Description": string,
        "Cost": nullable decimal,
        "RequiredByDate": nullable DateTime
    }
    

    Retrieve all tasks

    get api/tasks

    This action will return all assessment instances within your PACE Administration system. This action also supports the Pagination of records functionality.

    Example request

    Send a GET request to https://online.cardinus.com/api/Tasks. This will produce a result object containing a summary of the data and a collection of user instances from the database.

    Example response

    {
        "PageNumber": 1,
        "PageSize": 100,
        "FirstPage": "https://online.cardinus.com/api/Tasks?pageNumber=1&pageSize=2",
        "LastPage": "https://online.cardinus.com/api/Tasks?pageNumber=2322&pageSize=2",
        "TotalPages": 47,
        "TotalRecords": 4644,
        "NextPage": "https://online.cardinus.com/api/Tasks?pageNumber=2&pageSize=2",
        "PreviousPage": null,
        "ItemsCount": 100,
        "Items": [
            {
                "FullName": "Brad Storch",
                "UserID": "bstorch",
                "UserGuid": "65467435-7ae9-e211-a494-00155d145c00",
                "IsLocked": false,
                "UserStatus": "Active",
                "GUID": "c2954c6c-da50-4bde-822d-7a4107e1d453",
                "TemplateName": "Advice given to remedy issue after a Telephonic Intervention",
                "Status": "Overdue",
                "Description": "Actions closed on behalf of the user for this self-assessment as a Telephonic Intervention has been completed with a separate report.",
                "Cost": 0.00,
                "RequiredByDate": "2022-08-11T00:00:00"
            },
            {
                "FullName": "Brad Storch",
                "UserID": "bstorch",
                "UserGuid": "65467435-7ae9-e211-a494-00155d145c00",
                "IsLocked": false,
                "UserStatus": "Active",
                "GUID": "9e96ad47-a0cb-4206-b65d-a884c7d312eb",
                "TemplateName": "Advice given to remedy issue after a Telephonic Intervention",
                "Status": "Overdue",
                "Description": "Actions closed on behalf of the user for this self-assessment as a Telephonic Intervention has been completed with a separate report.",
                "Cost": 0.00,
                "RequiredByDate": "2022-08-11T00:00:00"
            },
            etc...
        ],
        "Succeeded": true,
        "Errors": null,
        "Message": null
    }
    

    Retrieve tasks by user

    get api/tasks/{userid}

    This action will return tasks created for a specific user via the parameter passed in on the request. The parameter is the user's unique identifier in a GUID format.

    Parameter Description Location
    userid User ID in a GUID format URL

    Example request

    Send a GET request to https://online.cardinus.com/api/Tasks/{userid}. The resulting data will be a collection of tasks restricted to the given user.

    Example response

    {
        "Count": 2,
        "Items": [
            {
                "FullName": "Brad Storch",
                "UserID": "bstorch",
                "UserGuid": "65467435-7ae9-e211-a494-00155d145c00",
                "IsLocked": false,
                "UserStatus": "Active",
                "GUID": "c2954c6c-da50-4bde-822d-7a4107e1d453",
                "TemplateName": "Advice given to remedy issue after a Telephonic Intervention",
                "Status": "Overdue",
                "Description": "Actions closed on behalf of the user for this self-assessment as a Telephonic Intervention has been completed with a separate report.",
                "Cost": 0.00,
                "RequiredByDate": "2022-08-11T00:00:00"
            },
            {
                "FullName": "Brad Storch",
                "UserID": "bstorch",
                "UserGuid": "65467435-7ae9-e211-a494-00155d145c00",
                "IsLocked": false,
                "UserStatus": "Active",
                "GUID": "9e96ad47-a0cb-4206-b65d-a884c7d312eb",
                "TemplateName": "Advice given to remedy issue after a Telephonic Intervention",
                "Status": "Overdue",
                "Description": "Actions closed on behalf of the user for this self-assessment as a Telephonic Intervention has been completed with a separate report.",
                "Cost": 0.00,
                "RequiredByDate": "2022-08-11T00:00:00"
            }
        ]
    }
    

    Filter tasks

    post api/tasks/filter

    This action will retrieve all tasks depending on the parameters passed in the body. The body is in JSON format and providing no parameters will default to all tasks.

    Parameter Description Location
    assessment details The filtering query options to restrict the result set Request body
    Important

    The content-type header must be included and set to application/json.

    Example request

    Send a POST request to https://online.cardinus.com/api/Tasks/Filter with search criteria in the body as specified below. The response will contain filtered results. Each property is applied using the AND logical operator.

    The JSON schema including all the properties that can be used to filter data:

    {
      "UserId": string,
      "FullName": string,  
      "IsLocked": true,
      "UserStatus": string,
      "TemplateName": string,
      "Description": string
    }
    

    For example, to retrieve only tasks associated with archived users you can use this filter:

    {
      "UserStatus": "archived"
    }
    

    Example response

    {
        "PageNumber": 1,
        "PageSize": 100,
        "FirstPage": "https://online.cardinus.com/api/Tasks/Filter?pageNumber=1&pageSize=100",
        "LastPage": "https://online.cardinus.com/api/Tasks/Filter?pageNumber=6&pageSize=100",
        "TotalPages": 6,
        "TotalRecords": 516,
        "NextPage": "https://online.cardinus.com/api/Tasks/Filter?pageNumber=2&pageSize=100",
        "PreviousPage": null,
        "ItemsCount": 100,
        "Items": [
            {
                "FullName": "Brad Storch",
                "UserID": "bstorch",
                "UserGuid": "65467435-7ae9-e211-a494-00155d145c00",
                "IsLocked": false,
                "UserStatus": "Archived",
                "GUID": "c2954c6c-da50-4bde-822d-7a4107e1d453",
                "TemplateName": "Advice given to remedy issue after a Telephonic Intervention",
                "Status": "Overdue",
                "Description": "Actions closed on behalf of the user for this self-assessment as a Telephonic Intervention has been completed with a separate report.",
                "Cost": 0.00,
                "RequiredByDate": "2022-08-11T00:00:00"
            },
            {
                "FullName": "Brad Storch",
                "UserID": "bstorch",
                "UserGuid": "65467435-7ae9-e211-a494-00155d145c00",
                "IsLocked": false,
                "UserStatus": "Archived",
                "GUID": "9e96ad47-a0cb-4206-b65d-a884c7d312eb",
                "TemplateName": "Advice given to remedy issue after a Telephonic Intervention",
                "Status": "Overdue",
                "Description": "Actions closed on behalf of the user for this self-assessment as a Telephonic Intervention has been completed with a separate report.",
                "Cost": 0.00,
                "RequiredByDate": "2022-08-11T00:00:00"
            },
            etc...
        ],
        "Succeeded": true,
        "Errors": null,
        "Message": null
    }
    

    Retrieve an overview of all tasks

    get api/tasks/overview

    This action will give an overview of relevant data for all tasks in the PACE Administration system.

    Example request

    Send a GET request to https://online.cardinus.com/api/tasks/overview with no parameters to get the overview of task data in your PACE system.

    Example response

    {
        "Count": 17
    }
    
    Theme Back to top