GET api/Village/{village}/Task/{activityId}?withHistory={withHistory}

Get a specific task

Request Information

URI Parameters

NameDescriptionTypeAdditional information
village

Village ID

globally unique identifier

Required

activityId

Task's Activity ID

globally unique identifier

Required

withHistory

If true, the task history (comments, assignments, etc.) will be included in the result; defaults to true

boolean

Default value is True

Body Parameters

None.

Response Information

Resource Description

ViewTaskModel
NameDescriptionTypeAdditional information
Location

Obsolete

string

None.

DueDate

Obsolete

date

None.

Description

Obsolete

string

None.

Priority

Obsolete

boolean

None.

Reminder

If specified, the date and time by which the task is due

date

None.

TimeZone

Reminder time zone

string

None.

Completed

If set, the Date/Time at which the task was marked as completed

date

None.

CompletedById

For completed tasks, the ID of the user who completed the task

globally unique identifier

None.

CompletedBy

For completed tasks, the name of the user who completed the task

string

None.

ActivityId

Activity's unique ID

globally unique identifier

None.

CreatedById

ID of the user who created the activity

globally unique identifier

None.

CreatedBy

Name of the user who created the activity

string

None.

Created

Date/Time when the activity was created

date

None.

AssignedTo

List of users the activity is assigned to

Collection of ActivityAssignmentModel

None.

Tags

List of tags for the activity

Collection of string

None.

Attachments

File attachments

Collection of AttachmentModel

None.

History

Activity activity history

Collection of ActivityHistoryModel

None.

CommentCount

Number of entries in History which are comments

integer

None.

VillageId

The ID of the village in which this activity belongs

globally unique identifier

None.

LastUpdated

The date/time this activity was last updated; useful for handling push notifications

date

None.

Cancelled

True for activities that have been cancelled. Default value is false

boolean

None.

Title

Short title for the activity

string

Required

String length: inclusive between 0 and 255

Response Formats

application/json, text/json

Sample:
{
  "Location": "sample string 1",
  "DueDate": "2025-06-03T04:45:28.384+00:00",
  "Description": "sample string 2",
  "Priority": true,
  "Reminder": "2025-06-03T04:45:28.384+00:00",
  "TimeZone": "sample string 4",
  "Completed": "2025-06-03T04:45:28.384+00:00",
  "CompletedById": "ac61228a-ddcc-4388-882a-4356baed56e0",
  "CompletedBy": "sample string 5",
  "ActivityId": "b26fce0a-42df-44ec-b1b9-3453d6f4aa88",
  "CreatedById": "34e670e8-dce5-43ac-b322-ec0fb7eb521c",
  "CreatedBy": "sample string 8",
  "Created": "2025-06-03T04:45:28.384+00:00",
  "AssignedTo": [
    {
      "UserId": "01a5738b-f882-405c-a98a-24c4f842fcfb",
      "Name": "sample string 2"
    },
    {
      "UserId": "01a5738b-f882-405c-a98a-24c4f842fcfb",
      "Name": "sample string 2"
    }
  ],
  "Tags": [
    "sample string 1",
    "sample string 2"
  ],
  "Attachments": [
    {
      "Id": "74a3022a-f33a-4d4e-a6bf-fdacda1d4914",
      "Size": 2,
      "FileName": "sample string 3",
      "ContentType": "sample string 4",
      "UploadedBy": "sample string 5"
    },
    {
      "Id": "74a3022a-f33a-4d4e-a6bf-fdacda1d4914",
      "Size": 2,
      "FileName": "sample string 3",
      "ContentType": "sample string 4",
      "UploadedBy": "sample string 5"
    }
  ],
  "History": [
    {
      "HistoryId": "c79feb4b-35ae-46a3-8ecc-1cac67128c77",
      "ActivityId": "911ca39b-fa91-46e0-8e3f-e3968e3a611c",
      "PerformedById": "086a33e7-e204-46ea-9347-38206950cd88",
      "PerformedBy": "sample string 4",
      "AssignedToId": "e03cae38-1313-4ed5-a43c-e4cbd459ef38",
      "AssignedTo": "sample string 5",
      "Action": "Comment",
      "DateTime": "2025-06-03T04:45:28.384+00:00",
      "Comments": "sample string 7",
      "Updated": "2025-06-03T04:45:28.384+00:00",
      "UpdatedById": "adf8b3ce-d622-446a-9f1b-447bfa8f18c4",
      "UpdatedBy": "sample string 10"
    },
    {
      "HistoryId": "c79feb4b-35ae-46a3-8ecc-1cac67128c77",
      "ActivityId": "911ca39b-fa91-46e0-8e3f-e3968e3a611c",
      "PerformedById": "086a33e7-e204-46ea-9347-38206950cd88",
      "PerformedBy": "sample string 4",
      "AssignedToId": "e03cae38-1313-4ed5-a43c-e4cbd459ef38",
      "AssignedTo": "sample string 5",
      "Action": "Comment",
      "DateTime": "2025-06-03T04:45:28.384+00:00",
      "Comments": "sample string 7",
      "Updated": "2025-06-03T04:45:28.384+00:00",
      "UpdatedById": "adf8b3ce-d622-446a-9f1b-447bfa8f18c4",
      "UpdatedBy": "sample string 10"
    }
  ],
  "CommentCount": 2,
  "VillageId": "90399997-9480-4d5c-be1a-83dca9c62d46",
  "LastUpdated": "2025-06-03T04:45:28.384+00:00",
  "Cancelled": true,
  "Title": "sample string 13"
}

application/xml, text/xml

Sample:
<ViewTaskModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CaringVillage.Shared.Implementation.Models">
  <Title>sample string 13</Title>
  <ActivityId>b26fce0a-42df-44ec-b1b9-3453d6f4aa88</ActivityId>
  <AssignedTo>
    <ActivityAssignmentModel>
      <Name>sample string 2</Name>
      <UserId>01a5738b-f882-405c-a98a-24c4f842fcfb</UserId>
    </ActivityAssignmentModel>
    <ActivityAssignmentModel>
      <Name>sample string 2</Name>
      <UserId>01a5738b-f882-405c-a98a-24c4f842fcfb</UserId>
    </ActivityAssignmentModel>
  </AssignedTo>
  <Attachments>
    <AttachmentModel>
      <ContentType>sample string 4</ContentType>
      <FileName>sample string 3</FileName>
      <Id>74a3022a-f33a-4d4e-a6bf-fdacda1d4914</Id>
      <Size>2</Size>
      <UploadedBy>sample string 5</UploadedBy>
    </AttachmentModel>
    <AttachmentModel>
      <ContentType>sample string 4</ContentType>
      <FileName>sample string 3</FileName>
      <Id>74a3022a-f33a-4d4e-a6bf-fdacda1d4914</Id>
      <Size>2</Size>
      <UploadedBy>sample string 5</UploadedBy>
    </AttachmentModel>
  </Attachments>
  <Cancelled>true</Cancelled>
  <Created>2025-06-03T04:45:28.384175+00:00</Created>
  <CreatedBy>sample string 8</CreatedBy>
  <CreatedById>34e670e8-dce5-43ac-b322-ec0fb7eb521c</CreatedById>
  <History>
    <ActivityHistoryModel>
      <ActivityId>911ca39b-fa91-46e0-8e3f-e3968e3a611c</ActivityId>
      <AssignedTo>sample string 5</AssignedTo>
      <AssignedToId>e03cae38-1313-4ed5-a43c-e4cbd459ef38</AssignedToId>
      <Comments>sample string 7</Comments>
      <DateTime>2025-06-03T04:45:28.384175+00:00</DateTime>
      <HistoryId>c79feb4b-35ae-46a3-8ecc-1cac67128c77</HistoryId>
      <PerformedBy>sample string 4</PerformedBy>
      <PerformedById>086a33e7-e204-46ea-9347-38206950cd88</PerformedById>
      <Updated>2025-06-03T04:45:28.384175+00:00</Updated>
      <UpdatedBy>sample string 10</UpdatedBy>
      <UpdatedById>adf8b3ce-d622-446a-9f1b-447bfa8f18c4</UpdatedById>
    </ActivityHistoryModel>
    <ActivityHistoryModel>
      <ActivityId>911ca39b-fa91-46e0-8e3f-e3968e3a611c</ActivityId>
      <AssignedTo>sample string 5</AssignedTo>
      <AssignedToId>e03cae38-1313-4ed5-a43c-e4cbd459ef38</AssignedToId>
      <Comments>sample string 7</Comments>
      <DateTime>2025-06-03T04:45:28.384175+00:00</DateTime>
      <HistoryId>c79feb4b-35ae-46a3-8ecc-1cac67128c77</HistoryId>
      <PerformedBy>sample string 4</PerformedBy>
      <PerformedById>086a33e7-e204-46ea-9347-38206950cd88</PerformedById>
      <Updated>2025-06-03T04:45:28.384175+00:00</Updated>
      <UpdatedBy>sample string 10</UpdatedBy>
      <UpdatedById>adf8b3ce-d622-446a-9f1b-447bfa8f18c4</UpdatedById>
    </ActivityHistoryModel>
  </History>
  <LastUpdated>2025-06-03T04:45:28.384175+00:00</LastUpdated>
  <Tags xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:string>sample string 1</d2p1:string>
    <d2p1:string>sample string 2</d2p1:string>
  </Tags>
  <VillageId>90399997-9480-4d5c-be1a-83dca9c62d46</VillageId>
  <Completed>2025-06-03T04:45:28.384175+00:00</Completed>
  <CompletedBy>sample string 5</CompletedBy>
  <CompletedById>ac61228a-ddcc-4388-882a-4356baed56e0</CompletedById>
  <Description>sample string 2</Description>
  <DueDate>2025-06-03T04:45:28.384175+00:00</DueDate>
  <Location>sample string 1</Location>
  <Priority>true</Priority>
  <Reminder>2025-06-03T04:45:28.384175+00:00</Reminder>
  <TimeZone>sample string 4</TimeZone>
</ViewTaskModel>