PetStore API Overview

This is a classic PetStore API, designed here to showcase a pretty standard set of RESTful capabilities, but with some rather sophisticated goings on under the covers. If you have an admin license for this API you'll see quite a bit more, and be able to do quite a bit more than the rest of us mere mortals.

The API is secured using a simple AppId/Secret combination supplied in an http header. For details on how to set that up you can visit our online docs page.

The fundamental objects this API deals with are pets. The JSON representation for a pet is easiest seen as an example:


{
    "category": {
        "id": 200,
        "name": "Dog"
    },
    "name": "Fido",
    "photoUrls": [
    ],
    "tags": [
        {
            "id": 102,
            "name": "mammal"
        },
        {
            "id": 103,
            "name": "dog"
        }
    ],
    "status": "available",
    "id": "102"
}
        

The API includes methods for managing the Pet data, if you are an admin you'll see information on these methods below. Users are welcome to search the PetStore by tags, and view Pets by Id.

Find Pet By Id

This operation takes a petId as a URL Path parameter and returns the matching pet object (see below).

Parameters

Parameter: petId (String)

The API is secured using a simple AppId/Secret combination supplied in an http header. For details on how to set that up you can visit our online docs page.

The fundamental objects this API deals with are pets. The JSON representation for a pet is shown above.

Curl

curl -H "Authorization: Atmosphere realm=http://atmosphere,atmosphere_app_id=<AppId>,atmosphere_signature_method=NONE;" -H "Accept: application/json" http://demo.soa.local:9901/pet/<petId>

Alternative version of test client

Find Pet By Tag

This operation takes a list of one or more tags as a comma seperated query parameter (or multiple query params) and returns a set of matching pet objects (see below).

Parameters

Parameter: tags (Query Param)

The API is secured using a simple AppId/Secret combination supplied in an http header. For details on how to set that up you can visit our online docs page.

Curl

curl -H "Authorization: Atmosphere realm=http://atmosphere,atmosphere_app_id=<AppId>,atmosphere_signature_method=NONE;" -H "Accept: application/json" http://demo.soa.local:9901/findPetByTags?tags=<tag1>,<tag2>

Add Pet

This operation takes a Pet Object as a POST Body and returns the pet object with an Id (if not specified) and an href.

Parameters

Parameter:  body (Pet Object)

The API is secured using a simple AppId/Secret combination supplied in an http header. For details on how to set that up you can visit our online docs page.

The fundamental objects this API deals with are pets. The JSON representation for a pet is shown above.

Curl

curl -X POST --data "<Your Pet Object JSON String>" -H "Authorization: Atmosphere realm=http://atmosphere,atmosphere_app_id=<AppId>,atmosphere_signature_method=NONE;" -H "Accept: application/json" -H "Content-Type: application/json" http://demo.soa.local:9901/pet/<petId>

Update Pet

This operation takes a Pet Object as a PUT Body with a path param with the petId of the pet to be updated and returns the updated pet object. See below for a description of a Pet Object.

Parameters

Parameter: PetId (path)
Parameter: Pet Object (object)

The API is secured using a simple AppId/Secret combination supplied in an http header. For details on how to set that up you can visit our online docs page.

Curl

curl -X PUT --data "<Your Pet Object JSON String>" -H "Authorization: Atmosphere realm=http://atmosphere,atmosphere_app_id=<AppId>,atmosphere_signature_method=NONE;" -H "Accept: application/json" -H "Content-Type: application/json" http://demo.soa.local:9901/pet/<petId>

Delete Pet

This operation takes a petId as a URL Path parameter and returns 200 if the object is successfully removed.

Parameters

Parameter: PetId (path)

The API is secured using a simple AppId/Secret combination supplied in an http header. For details on how to set that up you can visit our online docs page.

Curl

curl -X DELETE -H "Authorization: Atmosphere ree,atmosphere_app_id=<AppId>,atmosphere_signature_method=NONE;" -H "Accept: application/json" http://demo.soa.local:9901/pet/<petId>