Migration Status

To verify migration status you can use the below API.

info

{api-base-url} can be obtained from the MirrorFly console.

HTTP request#

curl -X GET "https://{api-base-url}/api/v1/chat/migration/status?fileToken={filetoken}"
-H "accept: */*"
-H "Authorization: AuthToken"

Request Params#

ParamDataTypeRequiredDescription
fileTokenStringYesToken obtained from fileupload api

Responses#

If successful, this action returns current status of uploaded file, in the response body.

{
"status": 200,
"data": {
"filename": "samplefilename", // String - Uploaded file name
"status": "", // String - Current status of the uploaded file
"total": 0, // Number - Total rows in the uploaded file. Excluding header and empty rows.
"processed": 0, // Number - Total rows processed and inserted to our system
"errorMessage": "xxxxx", // String - Some message describing the reason if the file could not be proessed. `Could be null if no errors.`
"invalidData": [ // Array - List of rows with error messages those were invalid as per our system. `Could be null if no errors.`
{
"row": 0, // Number - Number of the invalid row in the file
"errors": [
"" // String - Error message
]
}
]
},
"message": "Data retrieved successfully"
}

Error#

In the case of an error, an error object like below is returned.

When the token passed in Headers is expired

{
"status": 401,
"message": "Token Expired"
}

In the case of a Bad Request, an error message is returned

{
"status": 400,
"message": "Error Message"
}