Initiates a task

post

/ArchiveService/api/v1/archives/tasks

This api will initiate a task on entity level activity data. The task name and action will reflect the nature of the task.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : activityLevels
Type: array
Show Source
Nested Schema : clientGuids
Type: array
Show Source
Nested Schema : policyGuids
Type: array
Show Source
Nested Schema : policyNumbers
Type: array
Show Source
Nested Schema : statusCodes
Type: array
Show Source
Back to Top

Response

Supported Media Types

201 Response

Task submitted successfully and an entry got created in the system to complete the task.
Body ()
Root Schema : schema
Type: object
Show Source
  • ArchiveGUID of the process created in system.
    Example: 5289446E-A8AB-4D7D-80F6-A81CE6335522
Back to Top

Examples

Post a request for creating, pausing, resuming, aborting, retrieving, and deleting an archive.

Creating an Archive

Use the following cURL, Request Body for initiating a new archive request.

Example cURL Command

Use the following cURL command to submit a request on the REST resource:

curl -X POST \ 
     -H "Accept: application/json" \ 
     -H "Content-Type: application/json" \
     -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
     -L "http://server:port/ArchiveService/api/v1/archives/tasks"\
     -d {"taskName":"ARCHIVAL", "entityType":"ACTIVITY", "activityLevel":"POLICY", "statusCodes":["01"], "effectiveTo":"2010-02-01", "batchSize":"50"}

Example Request Body

The following shows an example of the request body in JSON format:

{
"taskName":"ARCHIVAL",
"entityType":"ACTIVITY",
"activityLevels":["POLICY", "CLIENT"],
"statusCodes":["01","12","34"], 
"effectiveTo":"2016-07-18", 
"batchSize":"100"
}

Example Response Body

The following shows an example of the response body in JSON format:

{
    "archiveGUID": "1019F931-4461-5A92-E063-05914C64D5DB"
}

Pausing an Archive

Use the following cURL, and Request Body example to pause a running archive service.

Example cURL Command

Use the following cURL command to submit a request on the REST resource:

curl -X POST \ 
     -H "Accept: application/json" \ 
     -H "Content-Type: application/json" \
     -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
     -L "http://server:port/ArchiveService/api/v1/archives/tasks" \
     -d {"taskName": "ARCHIVAL","action": "PAUSE","archiveGUID": "4CB70824-F15F-4FD9-8A10-5E5D28F4E903"}

Example Request Body

The following shows an example of the request body in JSON format.

{
  "taskName": "ARCHIVAL",
  "action": "PAUSE",
  "archiveGUID": "0E0AF7AC-8543-913C-E063-05914C6479EE"
}

Example Response Body

The response would be a success message: 201 Created. There would be no message in the response window.

Resuming an Archive

Use the following cURL, and Request Body example to resume a paused archive service.

Example cURL Command

Use the following cURL command to submit a request on the REST resource:

curl -X POST \ 
     -H "Accept: application/json" \ 
     -H "Content-Type: application/json" \
     -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
     -L "http://server:port/ArchiveService/api/v1/archives/tasks" \
     -d {"taskName": "ARCHIVAL","action": "RESUME","archiveGUID": "4CB70824-F15F-4FD9-8A10-5E5D28F4E903"}

Example Request Body

The following shows an example of the request body in JSON format.

{
  "taskName": "ARCHIVAL",
  "action": "RESUME",
  "archiveGUID": "0F0E2F08-520D-F3AD-E063-05914C64853A"
}

Example Response Body

The response would be a success message: 201 Created. There would be no message in the respone window.

Aborting an Archive

Use the following cURL, and Request Body example to abort/stop a running archive service.

Example cURL Command

Use the following cURL command to submit a request on the REST resource:

curl -X POST \ 
     -H "Accept: application/json" \ 
     -H "Content-Type: application/json" \
     -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
     -L "http://server:port/ArchiveService/api/v1/archives/tasks" \
     -d {"taskName": "ARCHIVAL","action": "ABORT","archiveGUID": "4CB70824-F15F-4FD9-8A10-5E5D28F4E903"}

Example Request Body

The following shows an example of the request body in JSON format.

{
  "taskName": "ARCHIVAL",
  "action": "ABORT",
  "archiveGUID": "A819B26C-F6C8-4CB6-8363-BD193AE150C4"
}

Example Response Body

The response would be a success message: 201 Created. There would be no message in the respone window.

Deleting Pending Entities

Use the following cURL, and Request Body example to delete all the entities marked as DeletePending from the source database.

Example cURL Command

Use the following cURL command to submit a request on the REST resource:

curl -X POST \ 
     -H "Accept: application/json" \ 
     -H "Content-Type: application/json" \
     -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
     -L "http://server:port/ArchiveService/api/v1/archives/tasks" \
     -d {"taskName": "ARCHIVAL", "action": "DELETEPENDINGFROMSOURCE", "archiveGUID": "A7A49999-92C2-45AB-AB9D-8179D8B770D6"}

Example Request Body

The following shows an example of the request body in JSON format.

{
    "taskName": "ARCHIVAL",
    "action": "DELETEPENDINGFROMSOURCE",
    "archiveGUID": "A214D98E-04C4-4945-BC59-6E81B2422FFC"
}

Example Response Body

The response would be a success message: 201 Created. There would be no message in the respone window.

Retrieving an Archived Activity

Use the following cURL, and Request Body example to retrieve the arachived data from the database.

Example cURL Command

Use the following cURL command to submit a request on the REST resource:

curl -X POST \ 
     -H "Accept: application/json" \ 
     -H "Content-Type: application/json" \
     -u 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
     -L "http://server:port/ArchiveService/api/v1/archives/tasks" \
     -d {"taskName":"RETRIEVAL","policyNumbers"}

Example Request Body

The following shows an example of the request body in JSON format:

{
"taskName": "RETRIEVAL",
"entityType": "ACTIVITY",
"policyNumbers": ["VDA20055406"],
"policyGuids":["9D42AF83-743C-4772-885C-1B77C6F-B6B0A"],
"clientGuids":["B03DA23B-0236-467C-B46D-B4A2C77-CB57A"],
"effectiveTo": "2016-07-18"
}

Example Response Body

The following shows an example of the response body in JSON format:

{
    "retrievalGUID": "0E976827-57F5-9B87-E063-05914C64401A"
}
Back to Top