PartnerAccounts-partnerAccountId-attributes:GET

From Hostway API Documentation
(Difference between revisions)
Jump to: navigation, search
m (1 revision: Release 86)
m (1 revision: Release 109)
 
(One intermediate revision by one user not shown)
Line 59: Line 59:
 
:; value - ''string''
 
:; value - ''string''
 
:: Value of the attribute
 
:: Value of the attribute
 +
 +
: NOTE: The "partner_account_id" attribute will not be returned in this list.
  
 
:;  links - ''list''
 
:;  links - ''list''
Line 65: Line 67:
 
; links - ''list''
 
; links - ''list''
 
: [[Hypermedia]] for this resource. Links to self.
 
: [[Hypermedia]] for this resource. Links to self.
 
  
 
== Examples ==
 
== Examples ==

Latest revision as of 12:12, 24 July 2015

[edit] GET /partnerAccounts/{partnerAccountId}/attributes

Get attributes list.

Contents

[edit] Request

GET /partnerAccounts/{partnerAccountId}/attributes

[edit] Parameters

partnerAccountId - string
The Id of the partner account.

[edit] URI Parameters

None.

[edit] Request Headers

Authorization - HTTP Authorization header [1]
The Authentication credentials of the client application.
Content-Type
application/json

[edit] Response

[edit] Status Code

200 OK
Success.
401 Unauthorized
The supplied credentials are invalid or do not provide permissions for this operation.
403 Forbidden
Forbidden access to a user not authorized for such access.
404 Not Found
The partner account Id or attribute were not found.
415 Unsupported Media Type
The Content-Type header was not specified or the specified type is not supported. Use application/json.

[edit] Response Body

{
  "list": [
    "name": "{name}",
    "value": "{value}",
    "links" : [{"href": "https://api.hostway.com/partnerAccounts/{partnerAccountId}/attributes/{name}", "rel": "related"}]
  ],
  "links": [
    {"href": "https://api.hostway.com/partnerAccounts/{partnerAccountId}/attributes", "rel": "self"}
  ]
}
 

[edit] Parameters

list - list
A collection of dictionaries containing information about specific attribute
name - string
Descriptive name of the attribute
value - string
Value of the attribute
NOTE: The "partner_account_id" attribute will not be returned in this list.
links - list
Hypermedia for this product resource. Links to the attribute.
links - list
Hypermedia for this resource. Links to self.

[edit] Examples

[edit] Sending unauthorized request

Request

GET /partnerAccounts/partner-account-id/attributes
 

Response

401 Unauthorized
 

[edit] Sending request without setting Content-Type

Request

GET /partnerAccounts/partner-account-id/attributes
Authorization: Basic base64_encode(username:password)
 

Response

415 Unsupported Media Type
 

[edit] Getting list of attributes of not existing partner

Request

GET /partnerAccounts/not-existing-partner-account-id/attributes
Authorization: Basic base64_encode(username:password)
Content-Type: application/json
 

Response

404 Not Found
 

[edit] Success scenario

Request

GET /partnerAccounts/partner-account-id/attributes
Authorization: Basic base64_encode(username:password)
Content-Type: application/json
 

Response

200 OK

{
    "list": [
        {
            "name": "test_attribute", 
            "value": "123", 
            "links": [{"href": "{{APIBaseURL}}/partnerAccounts/partner-account-id/attributes/test_attribute/", "rel": "related"}]
        }
    ],
    "links": [
        {
            "href": "{{APIBaseURL}}/partnerAccounts/partner-account-id/attributes/",
            "rel": "self"
        }
    ]
}
 

[edit] See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox