POST api/v1/admin/tasks/account

Creates a new task for the account. Before a new task can be created a client must have been created before hand.

Request Information

URI Parameters

None.

Body Parameters

The details of the task to be created.

AccountTaskRequest
NameDescriptionTypeAdditional information
TaskID

The ID of the task to be registered.

globally unique identifier

Required

ClientID

The client ID for the task to use.

globally unique identifier

Required

ClientSecret

The client secret for the task to use.

string

Required

Frequency

How often the task should run.

Frequency

Required

StartDate

Determines when the task should start running.

date

None.

FinishDate

Determines when the task should stop running.

date

None.

Parameters

The parameters for the task.

string

Required

ContentType

The format the parameters are in. Must either be application/xml or application/json.

string

Required

Notification

Determines the notifications the task could send back to the user.

TaskNotification

None.

Request Formats

application/json, text/json

Sample:
{
  "TaskID": "a0003d8b-0d84-4786-b934-7568ca9826d9",
  "ClientID": "3286e2d9-b115-476c-b401-5ed4ebb11260",
  "ClientSecret": "sample string 3",
  "Frequency": 0,
  "StartDate": "2018-01-22T10:25:06.0783067Z",
  "FinishDate": "2018-01-22T10:25:06.0783067Z",
  "Parameters": "sample string 5",
  "ContentType": "sample string 6",
  "Notification": 0
}

application/xml, text/xml

Sample:
<AccountTaskRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <TaskID>a0003d8b-0d84-4786-b934-7568ca9826d9</TaskID>
  <ClientID>3286e2d9-b115-476c-b401-5ed4ebb11260</ClientID>
  <ClientSecret>sample string 3</ClientSecret>
  <Frequency>NONE</Frequency>
  <StartDate>2018-01-22T10:25:06.0783067Z</StartDate>
  <FinishDate>2018-01-22T10:25:06.0783067Z</FinishDate>
  <Parameters>sample string 5</Parameters>
  <ContentType>sample string 6</ContentType>
  <Notification>NONE</Notification>
</AccountTaskRequest>

Response Information

Resource Description

The task details with its ID field populated.

ResponseOfAccountTaskResponse
NameDescriptionTypeAdditional information
Error

Error

None.

ResponseData

ResponseDataOfAccountTaskResponse

None.

Response Formats

application/json, text/json

Sample:
{
  "Error": {
    "ErrorCode": "sample string 1",
    "ErrorReason": "sample string 2"
  },
  "ResponseData": {
    "Identification": {
      "UserId": "sample string 1"
    },
    "Result": "sample string 1",
    "Detail": {
      "ID": "56a1da2d-6dc0-491a-8273-f95b596b59ce",
      "TaskID": "22f5e46a-d023-43fa-9802-e4a03aad15b1",
      "Name": "sample string 3",
      "Enabled": true,
      "Frequency": "sample string 5",
      "StartDate": "2018-01-22T10:25:06.1095572Z",
      "FinishDate": "2018-01-22T10:25:06.1095572Z",
      "Parameters": "sample string 7",
      "ContentType": "sample string 8",
      "Notification": "sample string 9",
      "DateCreated": "2018-01-22T10:25:06.1095572Z",
      "DateModified": "2018-01-22T10:25:06.1095572Z",
      "LastRunOn": "2018-01-22T10:25:06.1095572Z",
      "LastRunBy": "sample string 11",
      "LastModifiedBy": "sample string 12",
      "Status": "sample string 13",
      "ClientID": "caa022db-50ca-4cda-9d51-3abaf5aebcc7"
    }
  }
}