getTaskStatus

Operation getTaskStatus returns status of operation with taskId.

Some requests (ie. startLogin, startRegister, addSlaves, etc.) returns id of created task instead of direct answer. In such case status (and result) of task can be checked using getTaskStatus method. The details depending on the type of task are stored in JSON in additionalInfo field.

Note: every task has its timeout, after exceeding it, task is removed from task queue, therefore getTaskStatus will return ERR_TASK_DOES_NOT_EXISTS.

Example SOAP request:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:ns="ns1">
 <SOAP-ENV:Body  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <ns:getTaskStatus>
   <taskId>QF4KJMNG3ESEG2245J7901KD</taskId>
   <uniqueTransferId>11-42225-49853-A</uniqueTransferId>
   <callback>false</callback>
  </ns:getTaskStatus>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Example SOAP response:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:ns="ns1">
 <SOAP-ENV:Body  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <ns:getTaskStatusResponse>
   <return>
    <type>GIVE_MONEY</type>
    <progressPercent>0</progressPercent>
    <status>PREPARATION</status>
    <additionalInfo>{}</additionalInfo>
    <taskId>7W3A0N1N9I2E7N1TKLS54A9PTR</taskId>
    <requestStatus>SUCCESS</requestStatus>
    <requestStatusDescription>Request succeeded.</requestStatusDescription>
   </return>
  </ns:getTaskStatusResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Request parameters:

parametertypedescriptionrequired?
taskIdstringidentifier of taskyes
uniqueTransferIdstringtransaction iddentifierno
callbackboolwhether to send messages with task progress/status or notno

Response parameters:

nametypedescription
typestringtask type
progressPercentunsigned intprogress percent
statusstringtask status
additionalInfostringadditional information
taskIdstringidentifier of created task
requestStatusstringresult of request
requestStatusDescriptionstringstatus description

Possible errors:

errordescription
ERR_INVALID_TASK_IDinvalid task identifier
ERR_TASK_DOES_NOT_EXISTtask with provided identiier does not exist

Possible task statuses:

  • PREPARATION – An initial preparatory phase
  • SEARCHING – Searching for other user on a network
  • WAITING_FOR_USER_DECISION – Waiting for another user’s decision
  • WAITING_FOR_VERIFICATION
  • WAITING_FOR_WRITE_PERMISSION
  • SERIES_ACCEPTED
  • TRANSFERRING – Performing the task
  • WAITING_FOR_RESTART
  • SERIES_FINISHED
  • FINISHED_OK – Completed successfully
  • FINISHED_REVOKED
  • FINISHED_ERR – Ended with an error
  • FINISHED_ERR_USER_REJECTED – Ended with an error, another user rejected
  • FINISHED_ERR_TOO_OFTEN
  • FINISHED_ERR_LOCKED
  • FINISHED_ERR_USER_NOT_FOUND – Ended with an error, a user with this name could not be found
  • FINISHED_ERR_ITEM_NOT_FOUND
  • FINISHED_ERR_NOT_FOUND – Ended with an error, no suitable resource was found
  • FINISHED_ERR_INVALID_USERNAME
  • FINISHED_ERR_USER_NOT_AUTHENTICATED
  • FINISHED_ERR_INVALID_DATA
  • FINISHED_ERR_INVALID_ACCOUNT_NUMBER – Ended with an error, invalid account number
  • FINISHED_ERR_TIMEOUT – Ended with an error, the task has timed out
  • FINISHED_ERR_SELLER_LIMITS_EXCEEDED – Ended with an error, seller limits has been exceeded
  • FINISHED_ERR_BUYER_LIMITS_EXCEEDED – Ended with an error, buyer limits has been exceeded
  • FINISHED_ERR_CHANGE_MISMATCH – Ended with an error, no small change
  • FINISHED_ERR_COLLECTING_MONEX_AMOUNT
  • FINISHED_ERR_NOT_ENOUGH_MONEY – Ended with an error, not enough money
  • FINISHED_ERR_CANCELLED
  • FINISHED_ERR_OUTDATED
  • FINISHED_ERR_VERIFICATION_TIMEOUT
  • FINISHED_ERR_INTERNAL_ERROR – Ended with an error, internal error of CNode
  • FINISHED_ERR_SERIES_CONSTRAINTS_EXCEEDED
  • FINISHED_ERR_OUT_TRANSFERS_LIMIT_EXCEEDED
  • FINISHED_ERR_CANCELLED_DUE_TO_PREVIOUS_ERROR
  • FINISHED_ERR_USER_TIMEOUT
Was this article helpful to you? Yes No

How can we help?