Platform
    cxp orchestration / Reference / REST API

    pet

    Postman Collection
    OpenAPI
    PUT

    Update an existing pet

    write:pets
    ,
    read:pets

    Request

    Request bodyapplication/json application/xml

    Pet object that needs to be added to the store

    id

    integer

    category

    Category

    name

    string

    Required
    photoUrls

    array<string>

    Required
    tags

    array<Tag>

    status

    string

    Responses

    Invalid ID supplied

    PUT/pet
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 curl --request PUT \ --url 'https://petstore.swagger.io/v2/pet' \ --header 'Content-Type: application/json' \ --data '{ "id": 2154, "category": { "id": 2154, "name": "<string>" }, "name": "doggie", "photoUrls": [ "<string>" ], "tags": [ { "id": 2154, "name": "<string>" } ], "status": "available" }'
    POST

    Add a new pet to the store

    write:pets
    ,
    read:pets

    Request

    Request bodyapplication/json application/xml

    Pet object that needs to be added to the store

    id

    integer

    category

    Category

    name

    string

    Required
    photoUrls

    array<string>

    Required
    tags

    array<Tag>

    status

    string

    Responses

    Invalid input

    POST/pet
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 curl --request POST \ --url 'https://petstore.swagger.io/v2/pet' \ --header 'Content-Type: application/json' \ --data '{ "id": 2154, "category": { "id": 2154, "name": "<string>" }, "name": "doggie", "photoUrls": [ "<string>" ], "tags": [ { "id": 2154, "name": "<string>" } ], "status": "available" }'
    GET

    Finds Pets by status

    Multiple status values can be provided with comma separated strings

    write:pets
    ,
    read:pets

    Request

    Query parameters

    status

    array<string>

    Required

    Responses

    successful operation

    application/xml application/json

    array<Pet>

    GET/pet/findByStatus
    1 2 3 curl --request GET \ --url 'https://petstore.swagger.io/v2/pet/findByStatus?status={status}' \ --header 'Accept: application/xml'
    200Response
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [ { "id": 2154, "category": { "id": 2154, "name": "<string>" }, "name": "doggie", "photoUrls": [ "<string>" ], "tags": [ { "id": 2154, "name": "<string>" } ], "status": "available" } ]
    GET

    Finds Pets by tagsDeprecated

    Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.

    write:pets
    ,
    read:pets

    Request

    Query parameters

    tags

    array<string>

    Required

    Responses

    successful operation

    application/xml application/json

    array<Pet>

    GET/pet/findByTags
    1 2 3 curl --request GET \ --url 'https://petstore.swagger.io/v2/pet/findByTags?tags={tags}' \ --header 'Accept: application/xml'
    200Response
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [ { "id": 2154, "category": { "id": 2154, "name": "<string>" }, "name": "doggie", "photoUrls": [ "<string>" ], "tags": [ { "id": 2154, "name": "<string>" } ], "status": "available" } ]
    GET

    Find pet by ID

    Returns a single pet

    Request

    Path parameters

    petId

    integer

    Required

    Responses

    successful operation

    application/xml application/json

    Pet
    GET/pet/{petId}
    1 2 3 curl --request GET \ --url 'https://petstore.swagger.io/v2/pet/{petId}' \ --header 'Accept: application/xml'
    200Response
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { "id": 2154, "category": { "id": 2154, "name": "<string>" }, "name": "doggie", "photoUrls": [ "<string>" ], "tags": [ { "id": 2154, "name": "<string>" } ], "status": "available" }
    POST

    Updates a pet in the store with form data

    write:pets
    ,
    read:pets

    Request

    Path parameters

    petId

    integer

    Required

    Request bodyapplication/x-www-form-urlencoded

    name

    string

    status

    string

    Responses

    Invalid input

    POST/pet/{petId}
    1 2 curl --request POST \ --url 'https://petstore.swagger.io/v2/pet/{petId}'
    DEL

    Deletes a pet

    write:pets
    ,
    read:pets

    Request

    Path parameters

    petId

    integer

    Required

    Header parameters

    api_key

    string

    Responses

    Invalid ID supplied

    DEL/pet/{petId}
    1 2 curl --request DELETE \ --url 'https://petstore.swagger.io/v2/pet/{petId}'
    POST

    uploads an image

    write:pets
    ,
    read:pets

    Request

    Path parameters

    petId

    integer

    Required

    Request bodymultipart/form-data

    additionalMetadata

    string

    file

    string

    Responses

    successful operation

    application/json

    ApiResponse
    POST/pet/{petId}/uploadImage
    1 2 3 curl --request POST \ --url 'https://petstore.swagger.io/v2/pet/{petId}/uploadImage' \ --header 'Accept: application/json'
    200Response
    1 2 3 4 5 { "code": 2154, "type": "<string>", "message": "<string>" }

    Rate this page: