Skip to content

Retrieve Assignments by Collection

Request

Fetches a list of assignments based on the provided collection ID. A valid authorization token is required for the request.

Security
Bearer
Query
collectionIdinteger, (int32)required

The unique identifier for the collection

curl -i -X GET \
  'https://developer.sustainabilitymaster.ai/_mock/openapi/api/DataCollection/AssignmentsByCollection?collectionId=0' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Successfully retrieved the assignments for the specified collection ID

Bodyapplication/json
Array [
idinteger, (int32)

Gets the unique identifier for the assignment.

Example:123
namestring or null

Gets the name of the assignment.

Example:"Assignment Template 1"
descriptionstring or null

Gets the description of the assignment.

Example:"Assignment to update data collection for the client."
assignmentTypestring or null

Type of the Assignment

Example:"Composed/Instant"
templateFileUrlstring or null

Gets the URL to the template file for the assignment.

Example:"https://example.com/template/assignment1.csv"
statusinteger or null, (int32)

Gets the status code of the assignment.

Example:1
ownerUidstring or null

Gets the unique identifier of the assignment owner.

Example:"deef544d-7334-4bbc-8cdc-2d5a932ef1d9"
ownerDisplayNamestring or null

Gets the display name of the assignment owner.

Example:"John Doe"
targetUidstring or null

Gets the unique identifier of the target user for the assignment.

Example:"1dda1b77-e687-4b43-a0b9-5afb8c83a115"
targetDisplayNamestring or null

Gets the display name of the target user for the assignment.

Example:"Jane Smith"
targetEmailstring or null

Gets the email of the target user for the assignment.

Example:"jane.smith@example.com"
updateFrequencystring or null

Gets the frequency at which the assignment is updated.

Example:"Monthly"
notificationstring or null

Gets the notification preferences for the assignment.

Example:"Email"
assignmentStatusstring or null

Gets the current status of the assignment.

Example:"Launched"
startDatestring or null, (date-time)

Gets the start date of the assignment.

Example:"2025-03-01T00:00:00"
endDatestring or null, (date-time)

Gets the end date of the assignment.

Example:"2025-04-01T00:00:00"
lastUpdatedOnstring or null, (date-time)

Gets the date when the assignment was last updated.

Example:"2025-02-20T14:30:00"
nextScheduledUpdatestring or null, (date-time)

Gets the date for the next scheduled update of the assignment.

Example:"2025-03-08T00:00:00"
]
Response
[ { "id": 123, "name": "Assignment Template 1", "description": "Assignment to update data collection for the client.", "assignmentType": "Composed/Instant", "templateFileUrl": "https://example.com/template/assignment1.csv", "status": 1, "ownerUid": "deef544d-7334-4bbc-8cdc-2d5a932ef1d9", "ownerDisplayName": "John Doe", "targetUid": "1dda1b77-e687-4b43-a0b9-5afb8c83a115", "targetDisplayName": "Jane Smith", "targetEmail": "jane.smith@example.com", "updateFrequency": "Monthly", "notification": "Email", "assignmentStatus": "Launched", "startDate": "2025-03-01T00:00:00", "endDate": "2025-04-01T00:00:00", "lastUpdatedOn": "2025-02-20T14:30:00", "nextScheduledUpdate": "2025-03-08T00:00:00" } ]