... {toc} h1. Resources h2. Retrieve APIFeatures List Returns list of all api features. || Url | .../v1/apiFeatures || || Sample | [http://api.spreadshirt.net/api/v1/apiFeatures] || || Type | LIST || || Method | GET || || Special Status Codes | || || APIKey | true || || SessionId | false || *Response Representation:* {code} <apiFeatures ...> ... </apiFeatures> {code} See [APIFeature Representation|#APIFeature] h2. Retrieve APIFeature Entity || Url | .../v1/apiFeatures/\{apiFeatureId\} || || Sample | [http://api.spreadshirt.net/api/v1/apiFeatures/1] || || Type | ENTITY || || Method | GET || || Special Status Codes | || || APIKey | true || || SessionId | false || *Response Representation:* {code} <apiFeature ...> ... </apiFeature> {code} See [APIFeature Representation|#APIFeature] h2. Retrieve APIKeys List Returns list of all api keys. || Url | .../v1/apiKeys || || Sample | [http://api.spreadshirt.net/api/v1/apiKeys] || || Type | LIST || || Method | GET || || Special Status Codes | || || APIKey | true (API mgmt feature required) || || SessionId | false || || Query | *\+userId:(xxx)* || *Response Representation:* {code} <apiKeys ...> ... </apiKeys> {code} See [APIKey Representation|#APIKey] h2. Retrieve APIKey Entity || Url | .../v1/apiKeys/\{apiKeyId\} || || Sample | [http://api.spreadshirt.net/api/v1/apiKeys/1] || || Type | ENTITY || || Method | GET || || Special Status Codes | || || APIKey | true (API mgmt feature required) || || SessionId | false || *Response Representation:* {code} <apiKey ...> ... </apiKey> {code} See [APIKey Representation|#APIKey] h2. Create APIKey Entity || Url | .../v1/apiKeys || || Sample | [http://api.spreadshirt.net/api/v1/apiKeys] || || Type | ENTITY || || Method | POST || || Special Status Codes | || || APIKey | true (API mgmt feature required) || || SessionId | false || *Request Representation:* {code} <apiKey ...> ... </apiKey> {code} See [APIKey Representation|#APIKey] *Response:* {code} Location: ... {code} h2. Update APIKey Entity || Url | .../v1/apiKeys/\{apiKeyId\} || || Sample | [http://api.spreadshirt.net/api/v1/apiKeys/1] || || Type | ENTITY || || Method | PUT || || Special Status Codes | || || APIKey | true (API mgmt feature required) || || SessionId | false || *Request Representation:* {code} <apiKey ...> ... </apiKey> {code} See [APIKey Representation|#APIKey] h2. Delete APIKey Entity || Url | .../v1/apiKeys/\{apiKeyId\} || || Sample | [http://api.spreadshirt.net/api/v1/apiKeys/1] || || Type | ENTITY || || Method | DELETE || || Special Status Codes | || || APIKey | true (API mgmt feature required) || || SessionId | false || h2. Retrieve User APIKeys List Returns list of all api keys for user. || Url | .../v1/users/\{userId\}/apiKeys || || Sample | [http://api.spreadshirt.net/api/v1/users/40000/apiKeys] || || Type | LIST || || Method | GET || || Special Status Codes | || || APIKey | true || || SessionId | true || \*Response Representation:\* {code} <apiKeys ...> ... </apiKeys> {code} See [APIKey Representation|#APIKey] h2. Retrieve User APIKey Entity || Url | .../v1/users/\{userId\}/apiKeys/\{apiKeyId\} || || Sample | [http://api.spreadshirt.net/api/v1/users/40000/apiKeys/1] || || Type | ENTITY || || Method | GET || || Special Status Codes | || || APIKey | true || || SessionId | true || *Response Representation:* {code} <apiKey ...> ... </apiKey> {code} See [APIKey Representation|#APIKey] h1. Representations
|
h2. APIFeature
|
|| Field || Description || | apiFeature | Representation of a platform api feature. | | apiFeature/name | Name of the api feature, e.g. product creation. | | apiFeature/description | Description of the api feature. |
|
Example:
|
... {code} <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <apiFeature xmlns="http://api.spreadshirt.net" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:8080/api/v1/apiFeatures/1" id="1"> <name>Product Creation</name> <description>Create products.</description> </apiFeature> {code}
|
h2. APIKey
|
|| Field || Description || | apiKey | Representation of a platform api key. | | apiKey/description | Description of the api key. | | apiKey/user | User the api key was issued for. | | apiKey/key | The key. | | apiKey/secret | The secret. | | apiKey/callLimit | The maximum number of allowed calles per day per resource. | | apiKey/apiFeatures | The assigned api features that define what the user can do with the api key, e.g. create products, upload designs or create baskets. | | apiKey/state | The state of the api key. | | apiKey/created | The date of the api key creation. | | apiKey/modified | The date of the last api key modification. |
|
Example:
|
... {code} <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <apiKey xmlns="http://api.spreadshirt.net" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost:8080/api/v1/apiKeys/xxx" id="xxx"> <description>This is the api key for xxx</description> <user xlink:href="http://localhost:8080/api/v1/users/40000" id="40000"/> <key>xxx</key> <secret>xxx</secret> <callLimit>5000</callLimit> <apiFeatures> <apiFeature xlink:href="http://localhost:8080/api/v1/apiFeatures/1" id="1"/> <apiFeature xlink:href="http://localhost:8080/api/v1/apiFeatures/3" id="3"/> <apiFeature xlink:href="http://localhost:8080/api/v1/apiFeatures/5" id="5"/> </apiFeatures> <state>ACTIVATED</state> <created>2010-09-17T16:09:07+02:00</created> <modified>2012-02-11T16:14:52+01:00</modified> </apiKey> {code}
|