External Request Task Controller

createTaskAndSendEmail

MethodPOST
Prod URLhttps://irm.trustarc.com/server/api/v1/external/requests/{requestId}/tasks
HeadersAuthorization: Bearer <access_token from 'Token Access' section>
URL ParametersN/A
Sample Request
{
  "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "createdById": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "createdDate": "1595824012.298",
  "description": "Task Description",
  "dueDate": "1595824012.298",
  "externalUserAssignees": [
    {
      "email": "sample@test.com",
      "name": "Sample name"
    }
  ],
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "itSystemIds": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "itSystemNames": [
    "Sample System Name"
  ],
  "jiraExternalId": "samplejira.id",
  "modifiedDate": "1595824012.298",
  "parentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "priority": "HIGH",
  "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "resolution": "Can’t find data",
  "status": "COMPLETE",
  "title": "Sample Unique Title",
  "type": "",
  "userAssigneeIds": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ]
}
Sample Success Response
{
  "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "createdById": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  ...
}
Where:
  • response - task object created
  • itSystemIds - system ids from Data Inventory Hub
Success ResponseCode: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

 

createFromTemplate

MethodPOST
Prod URLhttps://irm.trustarc.com/server/api/v1/external/requests/{requestId}/tasks/from-task-templates
HeadersAuthorization: Bearer <access_token from 'Token Access' section>
URL ParametersRequired Query Parameters
NameValueDescription
idstring($uuid)The id(UUID) is the ID of the request.
taskTemplateIds(body)Array of task-template ids that tasks will be based on. 
Sample Request
[
  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
]
Sample Success Response
[
  {
    "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "createdById": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    ...
  }
]
Where:
  • response- array of task object
Success ResponseCode: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

 

updateTaskAndSendEmail

MethodPUT
Prod URLhttps://irm.trustarc.com/server/api/v1/external/requests/tasks/{taskId}
HeadersAuthorization: Bearer <access_token from 'Token Access' section>
URL ParametersN/A
Sample Request
{
  "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "createdById": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "createdDate": "1595824012.298",
  "description": "Task Description",
  "dueDate": "1595824012.298",
  "externalUserAssignees": [
    {
      "email": "sample@test.com",
      "name": "Sample name"
    }
  ],
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "itSystemIds": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "itSystemNames": [
    "Sample System Name"
  ],
  "jiraExternalId": "samplejira.id",
  "modifiedDate": "1595824012.298",
  "parentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "priority": "HIGH",
  "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "resolution": "Can’t find data",
  "status": "COMPLETE",
  "title": "Sample Unique Title",
  "type": "",
  "userAssigneeIds": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ]
}
Sample Success Response
{
  "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "createdById": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  ...
}
Where:
  • response - task object created
Success ResponseCode: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

 

getRequestTasks

MethodGET
Prod URLhttps://irm.trustarc.com/server/api/v1/external/requests/{requestId}/tasks
HeadersAuthorization: Bearer <access_token from 'Token Access' section>
URL ParametersRequired Query Parameters
NameValueDescription
noParentboolean 
parentIdstring($uuid) 
titlestring 
requestIdRequest IDRequest where the tasks will be fetched from.
pageinteger($int32)Results page you want to retrieve (0…N).
sizeinteger($int32)Number of records per page.
sortarray[string]Sorting criteria in the format: property(,asc|desc).Default sort order is ascending. Multiple sort criteria are supported.Example: createdDate,asc
Sample RequestN/A
Sample Success Response
{
  "content": [
    {
      "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "children": [
        null
      ],
      "createdById": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "createdDate": "string",
      "description": "string",
      "dueDate": "string",
      "externalUserAssignees": [
        {
          "email": "string",
          "name": "string"
        }
      ],
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "itSystemIds": [
        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      ],
      "itSystemNames": [
        "string"
      ],
      "jiraExternalId": "string",
      "modifiedDate": "string",
      "parentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "priority": "HIGH",
      "requestId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "resolution": "string",
      "status": "COMPLETE",
      "title": "string",
      "type": "string",
      "userAssignees": [
        {
          "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "firstName": "string",
          "fullName": "string",
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "lastName": "string",
          "status": "Active",
          "username": "string"
        }
      ]
    }
  ],
  "empty": true,
  "first": true,
  "last": true,
  "number": 0,
  "numberOfElements": 0,
  "pageable": {
    "page": "string",
    "size": "string",
    "sort": [
      "string"
    ]
  },
  "size": 0,
  "sort": {
    "empty": true,
    "sorted": true,
    "unsorted": true
  },
  "totalElements": 0,
  "totalPages": 0
}
Where:
  • content – list of task objects
  • numberOfElements – number of elements in content
  • totalElements – number of total elements in the database
  • number – page number
  • size –size from url parameter
  • itSystemIds - system ids from Data Inventory Hub
Success ResponseCode: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

 

getTaskAttachments

MethodGET
Prod URLhttps://irm.trustarc.com/server/api/v1/external/requests/tasks/{taskId}/attachments
HeadersAuthorization: Bearer <access_token from 'Token Access' section>
URL ParametersRequired Query Parameters
NameValueDescription
taskIdTask IDTask where the attachments will be fetched from.
pageinteger($int32)Results page you want to retrieve (0…N).
sizeinteger($int32)Number of records per page.
sortarray[string]Sorting criteria in the format: property(,asc|desc)Example: createdDate,asc
Sample RequestN/A
Sample Success Response
{
 "content": [{"id": "9023a7aa-cc33-481e-ba16-7cb30256ff98", ...}],
 "numberOfElements": "10",
 "totalElements": "99",
 "number": "0",
 "size": "10",
}

 

Where:

  • content – list of attachment objects
  • numberOfElements – number of elements in content
  • totalElements – number of total elements in the database
  • number – page number
  • size –size from url parameter
Success ResponseCode: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

 

uploadTaskAttachments

MethodPOST
Prod URLhttps://irm.trustarc.com/server/api/v1/external/requests/tasks/{taskId}/attachments
HeadersAuthorization: Bearer <access_token from 'Token Access' section>
URL ParametersN/A
Sample Requestfile (formData)
Sample Success Response
{
 "id": "9023a7aa-cc33-481e-ba16-7cb30256ff98",
 "fileName": "Sample.txt"
}
Where:
  • id – auto-generated attachment identifier
  • fileName – filename of uploaded file
Success ResponseCode: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found

 

searchTaskAssignees

MethodGET
Prod URLhttps://irm.trustarc.com/server/api/v1/external/requests/tasks/assignees/search
HeadersAuthorization: Bearer <access_token from 'Token Access' section>
URL ParametersRequired Query Parameters
NameValueDescription
namestringSearch query by name
pageinteger($int32)Results page you want to retrieve (0…N).
sizeinteger($int32)Number of records per page.
Sample RequestN/A
Sample Success Response
{
 "content": [
    {
      "firstName": "John",
      "fullName": "John Doe",
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "lastName": "Doe",
      "username": "john.doe@test.com"
    }
  ],
 "numberOfElements": "10",
 "totalElements": "99",
 "number": "0",
 "size": "10",
}
Where:
  • content – list of user objects
  • numberOfElements – number of elements in content
  • number – page number
  • size –size from url parameter
Success ResponseCode: 200 OK
Error Response

Code: 401 Unauthorized

Code: 403 Forbidden

Code: 404 Not Found