Orders-orderId-account-products-productId-services-serviceId-attributes:GET
From Hostway API Documentation
GET /orders/{orderId}/account/products/{productId}/services/{serviceId}/attributes
Get the Attributes of a given Service. Not all services will have attributes; depending on the service, this call may return a response code of 405 (Method not supported). If attributes are supported on the service, but have not yet been set, this call will return an empty dictionary in the response body.
Contents |
Request
GET /orders/{orderId}/account/products/{productId}/services/{serviceId}/attributes
Request Parameters
- orderId - string
- The unique order Id. The URI of the order is returned by the POST /orders call.
- productId - string
- UUID specifying the product
- serviceId - string
- UUID specifying the service
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. |
400 Bad Request | No attributes defined for the provided service specification | Trying to get attributes for service with no attributes. |
401 Unauthorized | This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required. | The OwnerId cookie was not specified or is incorrect. |
403 Forbidden | Unauthorized: Attributes failed permission check | The client does not have permissions for this operation. |
404 Not Found | Resource not found | The client is trying to add attribute for non existing order, product or service. |
405 Method Not Allowed | - | The service does not support attributes. |
502 Bad Gateway | - | Unexpected backend response. |
Response Body
Successful responses
Will be a dictionary whose keys/values are specific to the service category of the service. See Service Attributes Structure.
Error responses
400 Bad Request - trying to get the attributes for a service that does not have attributes. { "computeFault": { "guid": "756b755a-84cf-4692-b2c6-70808dc9d00d", "message": "No attributes defined for the provided service specification", "code": 400, "details": "" } }
401 Unauthorized This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
404 Not Found - the order, product or service was not found. { "itemNotFound": { "guid": "e1792d8a-5b0a-43ef-adf5-34a0710c8fc5", "message": "Resource not found", "code": 404, "details": "" } }
502 Bad Gateway - unexpected error from the backend. { "computeFault": { "guid": "8ced5fe7-f6a9-4e8f-8700-cfc9fa15e6ce", "timestamp": "2014-09-10 20:59:50", "code": 502, "errorRefId": "8ced5fe7-f6a9-4e8f-8700-cfc9fa15e6ce" } }
See also