HTTP 400 response when POST'ing migration progress

Hi,

I’m updating my app to send progress updates as part of the Server → Cloud migration, however it fails when making a POST to /rest/atlassian-connect/1/migration/progress/{transferId}. The API documentation is unclear since the API route and schema don’t match the example provided.

Looking at the source code in the example app, it looks like it should be a POST to /rest/atlassian-connect/1/migration/progress/{transferId} with the body containing progressStatus (string) and percent (int) key/value pairs.

I’ve tried combinations of key name and values but the Jira API still returns a 400 response with this message:

{"timestamp":"2021-03-04T01:03:52.477+00:00","status":400,"error":"Bad Request","message":"","path":"/api/connect/v1/progress/{transferId}/{myAppKeyHere}/{someOtherIdHere}"}

What is the right type of request? I’ve tried different combinations of the API doc and all are returning a HTTP 400 response.

The API doc also has this info message:

Note that there is a 14-day time-limit after you receive the first notification of your server app being triggered to access progress reports. After the 14-day period, the App migration platform will return a 400 error response to all requests for information using transferId.

Does the 14-day limit apply per instance, or per transfer? I would expect per transfer, but wanted confirmation.

Regards,
Robert.

So the API is also documented here: https://developer.atlassian.com/platform/app-migration/rest/api-group-status-api/#api-progress-transferid-post and it appears to have the correct information and a valid example:

{
  "progressStatus": "IN_PROGRESS",
  "percent": 183,
  "statusMessage": "<string>"
}

Adding statusMessage to the request (which is required) fixed my problem.

Hi @robertc,

Thanks for replying to your own question with a better SLA that I’m providing. Yes, of the three parameters progressStatus and statusMessage are required.

I’ve had a good look at the documentation in

and I can see in

that the Payload example has status not progressStatus, so I’ll get that fixed. The resource end-point is also wrong with /feedback instead of /progress. Was there anything else?

As to your question about the 14-day time-limit, it’s per transferId.

Hope this helps.

Regards,
James.

1 Like

Hi James,

There are two other errors that I saw:

  1. the percent value is an int, but the example in How automated migration works | App migration platform shows it as a JSON string i.e. "percent": "90" when it should be "percent": 90 (no quotes)

  2. the percent value in the example in https://developer.atlassian.com/platform/app-migration/rest/api-group-status-api/#api-progress-transferid-post is invalid. The doc says

Minimum: 0 , Maximum: 100 , Format: int32

but the example has a value greater than 100:

“percent”: 183,

A small detail, but since you asked I mention it :slight_smile:

Thanks for working to get the docs updated.

Regards,
Robert.

Hi @robertc,

Thanks for the quick response. Along with the other changes above, I can get the “90” -> 90 fixed in the next day or so (we have a review and publish pattern for documentation.) The 183 is a bit harder as this is auto-generated code and we have to change the generation of that code to fix it, which is a non-trivial task. I’m looking into that now.

Thanks,
James.

1 Like

Hi @robertc,

Those updates should be published in the next 24 hours.

Regards,
James.

1 Like