Orders-orderId-account-user:GET
From Hostway API Documentation
Revision as of 07:51, 15 September 2014 by Mike.robski (Talk | contribs)
GET /orders/{orderId}/account/user
Get details of the account user for the given order. A user with auto-generated information is created by default when the account is created. The user password is excluded from the response.
Contents |
Request
GET /orders/{orderId}/account/user
Request Parameters
- orderId - string
- The unique order Id. The URI of the order is returned by the POST /orders call.
URI Parameters
None.
Request Headers
- Cookie
- A cookie named OwnerId to identify the client (for most browser clients, the browser will do this automatically, depending on the browser configuration). The value of the cookie would come from the response to the create order request in the Set-Cookie response header.
Response
Status Code
Status Code | Error Message | Description |
---|---|---|
200 OK | - | The operation was successfully completed. |
404 Not Found | Resource not found | The specified order does not exist. |
An account was not set for the order. | ||
- | No user data found for the account. | |
502 Bad Gateway | - | Failed retrieving user data. |
Response Body
{ "userName": "{userName}", "links": [ {"href": "https://api.hostway.com/orders/{order_id}/account/user/", "rel": "self"} ] }
Parameters
- userName - string
- The username of the account login credentials.
- links - list
- Hypermedia for this resource. Links to self.
Example
Success
Request
GET /orders/{orderId}/account/user Cookie: OwnerId={owner_id}; Path=/
Response
200 OK Content-Type : application/json; charset=UTF-8 { "userName": "accountUser1", "links": [{ "href": "https://api.hostway.com/orders/0000014854c737a28b6dffbe007f000000010001/account/user/", "rel": "self" }] }
Order does not exist
Request
GET /orders/{non-existent_orderId}/account/user Cookie: OwnerId={owner_id}; Path=/
Response
404 Not found Content-Type : application/json; charset=UTF-8 { "itemNotFound": { "guid": "b0b38b3e-b693-4021-8116-b59f7ec3fea7", "message": "Resource not found", "code": 404, "details": "" } }
Account has not been set
Request
GET /orders/{orderId}/account/user Cookie: OwnerId={owner_id}; Path=/
Response
404 Not found Content-Type : application/json; charset=UTF-8 { "itemNotFound": { "guid": "0c0c1f50-8d80-4423-b501-0a3cc5f070af", "message": "", "code": 404, "details": "" } }
See also