• pet
    • store
    • user
    Platform
    cxp orchestration / Reference / REST API

    user

    Postman Collection
    OpenAPI
    POST

    Create user

    This can only be done by the logged in user.

    Request

    Request bodyapplication/json

    Created user object

    id

    integer

    username

    string

    firstName

    string

    lastName

    string

    email

    string

    password

    string

    phone

    string

    userStatus

    integer

    Responses

    successful operation

    POST/user
    1 2 3 4 5 6 7 8 9 10 11 12 13 curl --request POST \ --url 'https://petstore.swagger.io/v2/user' \ --header 'Content-Type: application/json' \ --data '{ "id": 2154, "username": "<string>", "firstName": "<string>", "lastName": "<string>", "email": "<string>", "password": "<string>", "phone": "<string>", "userStatus": 11 }'
    POST

    Creates list of users with given input array

    Request

    Request bodyapplication/json

    List of user object

    array<User>

    id

    integer

    username

    string

    firstName

    string

    lastName

    string

    email

    string

    password

    string

    phone

    string

    userStatus

    integer

    Responses

    successful operation

    POST/user/createWithArray
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 curl --request POST \ --url 'https://petstore.swagger.io/v2/user/createWithArray' \ --header 'Content-Type: application/json' \ --data '[ { "id": 2154, "username": "<string>", "firstName": "<string>", "lastName": "<string>", "email": "<string>", "password": "<string>", "phone": "<string>", "userStatus": 11 } ]'
    POST

    Creates list of users with given input array

    Request

    Request bodyapplication/json

    List of user object

    array<User>

    id

    integer

    username

    string

    firstName

    string

    lastName

    string

    email

    string

    password

    string

    phone

    string

    userStatus

    integer

    Responses

    successful operation

    POST/user/createWithList
    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 curl --request POST \ --url 'https://petstore.swagger.io/v2/user/createWithList' \ --header 'Content-Type: application/json' \ --data '[ { "id": 2154, "username": "<string>", "firstName": "<string>", "lastName": "<string>", "email": "<string>", "password": "<string>", "phone": "<string>", "userStatus": 11 } ]'
    GET

    Logs user into the system

    Request

    Query parameters

    username

    string

    Required
    password

    string

    Required

    Responses

    successful operation

    Headers

    X-Rate-Limit

    integer

    X-Expires-After

    string

    application/xml application/json

    string

    GET/user/login
    1 2 3 curl --request GET \ --url 'https://petstore.swagger.io/v2/user/login?username={username}&password={password}' \ --header 'Accept: application/xml'
    200Response
    1 "<string>"
    GET

    Logs out current logged in user session

    Request

    This request has no parameters.

    Responses

    successful operation

    GET/user/logout
    1 2 curl --request GET \ --url 'https://petstore.swagger.io/v2/user/logout'
    GET

    Get user by user name

    Request

    Path parameters

    username

    string

    Required

    Responses

    successful operation

    application/xml application/json

    User
    GET/user/{username}
    1 2 3 curl --request GET \ --url 'https://petstore.swagger.io/v2/user/{username}' \ --header 'Accept: application/xml'
    200Response
    1 2 3 4 5 6 7 8 9 10 { "id": 2154, "username": "<string>", "firstName": "<string>", "lastName": "<string>", "email": "<string>", "password": "<string>", "phone": "<string>", "userStatus": 11 }
    PUT

    Updated user

    This can only be done by the logged in user.

    Request

    Path parameters

    username

    string

    Required

    Request bodyapplication/json

    Updated user object

    id

    integer

    username

    string

    firstName

    string

    lastName

    string

    email

    string

    password

    string

    phone

    string

    userStatus

    integer

    Responses

    Invalid user supplied

    PUT/user/{username}
    1 2 3 4 5 6 7 8 9 10 11 12 13 curl --request PUT \ --url 'https://petstore.swagger.io/v2/user/{username}' \ --header 'Content-Type: application/json' \ --data '{ "id": 2154, "username": "<string>", "firstName": "<string>", "lastName": "<string>", "email": "<string>", "password": "<string>", "phone": "<string>", "userStatus": 11 }'
    DEL

    Delete user

    This can only be done by the logged in user.

    Request

    Path parameters

    username

    string

    Required

    Responses

    Invalid username supplied

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