Accounts-accountId-action-interFranchiseMigration:GET
From Hostway API Documentation
Revision as of 13:33, 30 May 2016 by Corinne.chui (Talk | contribs)
GET /accounts/{accountId}/action/interFranchiseMigration
Get details about an account's migration to another franchise
Request
GET /accounts/{accountId}/action/interFranchiseMigration
Parameters
- accountId - string
- The Id of the account.
URI Parameters
None.
Request Headers
- Authorization - HTTP Authorization header [1]
- The Authentication credentials of the client application.
Response
Status Code
- 200 OK
- Success.
- 403 Forbidden
- Forbidden access to accounts by a user not authorized for such access.
- 404 Not Found
- The account Id was not found or a migration request has not been created for this account.
Response Body
{ "status": "{status}", "progress": {progress}, "links": [ {"href": "https://api.hostway.com/accounts/{account-number}/action/interFranchiseMigration", "rel": "self"} ] }
Parameters
- status - string
- The status of the migration. Valid values are pending, complete, inprogress or unknown - in case there is no InterFranchise migration started on the account, for this case the progress is None.
- progress - float
- A float from 0 to 1 representing the migration request's progress. The progress would indicated which is the current flow of the InterFranchise migration process - 0.1 would indicate that it is on the first flow, 0.9 on the last, 1 would indicated that the migration was completed. Can be null if the status is unknown.
- newAccountId - string
- The newly-generated accountId for the target account in the target franchise. Available only when the status is complete.
- newFranchise - string
- The target franchise this account was migrated to. Available only when the status is complete.
- links - list
- Hypermedia for this resource. Links to self.
Conditional Hypermedia
Hypermedia fields marked as optional will appear on the basis of the accessing user's permissions.
Examples
Requesting the status of a migration that has been submitted but not started
Request
GET {{APIBaseURL}}/accounts/account123/action/interFranchiseMigration
Response
HTTP/1.1 200 OK { "status": "pending", "progress": 0, "links": [ {"href": "{{APIBaseURL}}/accounts/account123/action/interFranchiseMigration", "rel": "self"} ] }
Requesting the status of a migration that is being processed (10% done)
Request
GET {{APIBaseURL}}/accounts/account123/action/interFranchiseMigration
Response
HTTP/1.1 200 OK { "status": "inprogress", "progress": 0.1, "links": [ {"href": "{{APIBaseURL}}/accounts/account123/action/interFranchiseMigration", "rel": "self"} ] }
Requesting the status of a migration that is being processed (70% done)
Request
GET {{APIBaseURL}}/accounts/account123/action/interFranchiseMigration
Response
HTTP/1.1 200 OK { "status": "inprogress", "progress": 0.7, "links": [ {"href": "{{APIBaseURL}}/accounts/account123/action/interFranchiseMigration", "rel": "self"} ] }
Requesting the status of a migration that is finished
Request
GET {{APIBaseURL}}/accounts/account123/action/interFranchiseMigration
Response
HTTP/1.1 200 OK { "status": "complete", "progress": 1, "newAccountId": "acc853234524", "newFranchise": "domainpeople_us_main", "links": [ {"href": "{{APIBaseURL}}/accounts/account123/action/interFranchiseMigration", "rel": "self"} ] }
Requesting the status of a migration that was never started
Request
GET {{APIBaseURL}}/accounts/account123/action/interFranchiseMigration
Response
HTTP/1.1 200 OK { "status": "unknown", "progress": null, "links": [ {"href": "{{APIBaseURL}}/accounts/account123/action/interFranchiseMigration", "rel": "self"} ] }
Requesting the status of a migration that does not exist
Request
GET {{APIBaseURL}}/accounts/account123/action/interFranchiseMigration
Response
HTTP/1.1 404 Not Found { "itemNotFound" : { "message": "Resource not found", "code": 404, "details": "", "guid": "59e0b3dd-2173-432a-8ff5-60efe16e83bf" } }
See also