hootr

The Hootr Developer Hub

Welcome to the Hootr developer hub. You'll find comprehensive guides and documentation to help you start working with Hootr as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Suggest Edits

post

Post a new hoot to the site

 
posthttps://hootr.co/api/hoot
curl --request POST \
  --url https://hootr.co/api/hoot
var request = require("request");

var options = { method: 'POST', url: 'https://hootr.co/api/hoot' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://hootr.co/api/hoot")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://hootr.co/api/hoot");

xhr.send(data);
import requests

url = "https://hootr.co/api/hoot"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

_id
string

The identifier for the hoot

post
string
required

The under-140-character content you want to hoot

replyto
string

Optional username that you're replying to

Response

Successful response

Suggest Edits

/timeline

 
Suggest Edits

get

Get a list of all tweets in reverse chronological order

 
gethttps://hootr.co/api/timeline
curl --request GET \
  --url https://hootr.co/api/timeline
var request = require("request");

var options = { method: 'GET', url: 'https://hootr.co/api/timeline' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://hootr.co/api/timeline")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://hootr.co/api/timeline");

xhr.send(data);
import requests

url = "https://hootr.co/api/timeline"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

successful operation

Suggest Edits

/timeline/{username}

 
Suggest Edits

get

Get a list of all tweets from a user

 
gethttps://hootr.co/api/timeline/username
curl --request GET \
  --url https://hootr.co/api/timeline/username
var request = require("request");

var options = { method: 'GET',
  url: 'https://hootr.co/api/timeline/username' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://hootr.co/api/timeline/username")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://hootr.co/api/timeline/username");

xhr.send(data);
import requests

url = "https://hootr.co/api/timeline/username"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

username
string
required

The username you want to see hoots for

Response

successful operation

Suggest Edits

/hoot/{id}

 
Suggest Edits

get

Get a specific hoot

 
gethttps://hootr.co/api/hoot/id
curl --request GET \
  --url https://hootr.co/api/hoot/id
var request = require("request");

var options = { method: 'GET',
  url: 'https://hootr.co/api/hoot/id' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://hootr.co/api/hoot/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://hootr.co/api/hoot/id");

xhr.send(data);
import requests

url = "https://hootr.co/api/hoot/id"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The id of the hoot you want

Response

successful operation

_idstring

The identifier for the hoot

poststring

The under-140-character content you want to hoot

replytostring

Optional username that you're replying to

Suggest Edits

/hoot/{id}/favorite

 
Suggest Edits

post

Favorite a hoot

 
posthttps://hootr.co/api/hoot/id/favorite
curl --request POST \
  --url https://hootr.co/api/hoot/id/favorite
var request = require("request");

var options = { method: 'POST',
  url: 'https://hootr.co/api/hoot/id/favorite' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("https://hootr.co/api/hoot/id/favorite")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://hootr.co/api/hoot/id/favorite");

xhr.send(data);
import requests

url = "https://hootr.co/api/hoot/id/favorite"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

id
string
required

The id of the hoot you want

Body Params

favorited
boolean
required

Should we add or remove a favorite?

Response

successful operation

_idstring

The identifier for the hoot

poststring

The under-140-character content you want to hoot

replytostring

Optional username that you're replying to

Suggest Edits

/test/:input

 

Header Auth

 Authentication is required for this endpoint.
gethttps://hootr.co/a
No code samples available
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

something
object
 
something.searchAreaWkt
string
something.startDate
string
something.endDate
string
something.filters
string
key
json
 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

$.get('http://yoursite.com/test/' + id, function(data) {
    console.log(data);
});

Header Auth

 Authentication is required for this endpoint.
posthttps://hootr.co/api/hoot/category/add
asdfasdfsafdsadf
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

category
string
required

Query Params

device
string
limit
int32

Body Params

text
string

Headers

User-Angent
string
Meta
string
 
Suggest Edits

/test/:Thing

 

Header Auth

 Authentication is required for this endpoint.
gethttps://hootr.co/Stuff
No code samples available
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

thing
string
required
 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

$.get('http://yoursite.com/test/' + id, function(data) {
    console.log(data);
});
 

Header Auth

 Authentication is required for this endpoint.
gethttps://hootr.co
No code samples available
A binary file was returned

You couldn't be authenticated

Try the API to see results
 

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

$.get('http://yoursite.com/test/' + id, function(data) {
    console.log(data);
});
Suggest Edits

Add a new pet to the store

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttp://petstore.swagger.io/v2/pet
curl --request POST \
  --url http://petstore.swagger.io/v2/pet
var request = require("request");

var options = { method: 'POST', url: 'http://petstore.swagger.io/v2/pet' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/pet")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://petstore.swagger.io/v2/pet");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/pet"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

Try the API to see results

Body Params

id
int64
category
object
 
category.id
int64
category.name
string
name
string
required
photoUrls
array of strings
required
tags
array of objects
id
name
status
string

pet status in the store

Response

Invalid input

Suggest Edits

Update an existing pet

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
puthttp://petstore.swagger.io/v2/pet
curl --request PUT \
  --url http://petstore.swagger.io/v2/pet
var request = require("request");

var options = { method: 'PUT', url: 'http://petstore.swagger.io/v2/pet' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/pet")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "http://petstore.swagger.io/v2/pet");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/pet"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

Try the API to see results

Body Params

id
int64
category
object
 
category.id
int64
category.name
string
name
string
required
photoUrls
array of strings
required
tags
array of objects
id
name
status
string

pet status in the store

Response

Invalid ID supplied

Pet not found

Validation exception

Suggest Edits

Finds Pets by status

Multiple status values can be provided with comma separated strings

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttp://petstore.swagger.io/v2/pet/findByStatus
curl --request GET \
  --url 'http://petstore.swagger.io/v2/pet/findByStatus?status=status'
var request = require("request");

var options = { method: 'GET',
  url: 'http://petstore.swagger.io/v2/pet/findByStatus',
  qs: { status: 'status' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/pet/findByStatus?status=status")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://petstore.swagger.io/v2/pet/findByStatus?status=status");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/pet/findByStatus"

querystring = {"status":"status"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

Try the API to see results

Query Params

status
array of strings
required

Status values that need to be considered for filter

Response

successful operation

Invalid status value

Suggest Edits

Finds Pets by tags

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

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
gethttp://petstore.swagger.io/v2/pet/findByTags
curl --request GET \
  --url 'http://petstore.swagger.io/v2/pet/findByTags?tags=tags'
var request = require("request");

var options = { method: 'GET',
  url: 'http://petstore.swagger.io/v2/pet/findByTags',
  qs: { tags: 'tags' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/pet/findByTags?tags=tags")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://petstore.swagger.io/v2/pet/findByTags?tags=tags");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/pet/findByTags"

querystring = {"tags":"tags"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

Try the API to see results

Query Params

tags
array of strings
required

Tags to filter by

Response

successful operation

Invalid tag value

Suggest Edits

Find pet by ID

Returns a single pet

 

Header Auth

 Authentication is required for this endpoint.
gethttp://petstore.swagger.io/v2/pet/petId
curl --request GET \
  --url http://petstore.swagger.io/v2/pet/petId
var request = require("request");

var options = { method: 'GET',
  url: 'http://petstore.swagger.io/v2/pet/petId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/pet/petId")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://petstore.swagger.io/v2/pet/petId");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/pet/petId"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

petId
int64
required

ID of pet to return

Response

successful operation

idinteger
categoryobject
category.idinteger
category.namestring
namestring
photoUrlsarray
tagsarray
statusstring

pet status in the store

Invalid ID supplied

Pet not found

Suggest Edits

Updates a pet in the store with form data

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttp://petstore.swagger.io/v2/pet/petId
curl --request POST \
  --url http://petstore.swagger.io/v2/pet/petId
var request = require("request");

var options = { method: 'POST',
  url: 'http://petstore.swagger.io/v2/pet/petId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/pet/petId")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://petstore.swagger.io/v2/pet/petId");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/pet/petId"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

Try the API to see results

Path Params

petId
int64
required

ID of pet that needs to be updated

Form Data

name
string

Updated name of the pet

status
string

Updated status of the pet

Response

Invalid input

Suggest Edits

Deletes a pet

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
deletehttp://petstore.swagger.io/v2/pet/petId
curl --request DELETE \
  --url http://petstore.swagger.io/v2/pet/petId
var request = require("request");

var options = { method: 'DELETE',
  url: 'http://petstore.swagger.io/v2/pet/petId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/pet/petId")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "http://petstore.swagger.io/v2/pet/petId");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/pet/petId"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

Try the API to see results

Path Params

petId
int64
required

Pet id to delete

Headers

api_key
string

Response

Invalid ID supplied

Pet not found

Suggest Edits

uploads an image

 

OAuth2 Auth

Bearer
 Authentication is required for this endpoint.
posthttp://petstore.swagger.io/v2/pet/petId/uploadImage
curl --request POST \
  --url http://petstore.swagger.io/v2/pet/petId/uploadImage
var request = require("request");

var options = { method: 'POST',
  url: 'http://petstore.swagger.io/v2/pet/petId/uploadImage' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/pet/petId/uploadImage")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://petstore.swagger.io/v2/pet/petId/uploadImage");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/pet/petId/uploadImage"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

Your OAuth2 token is incorrect or has expired

Try the API to see results

Path Params

petId
int64
required

ID of pet to update

Form Data

additionalMetadata
string

Additional data to pass to server

file
file

file to upload

Response

successful operation

codeinteger
typestring
messagestring
Suggest Edits

Returns pet inventories by status

Returns a map of status codes to quantities

 

Header Auth

 Authentication is required for this endpoint.
gethttp://petstore.swagger.io/v2/store/inventory
curl --request GET \
  --url http://petstore.swagger.io/v2/store/inventory
var request = require("request");

var options = { method: 'GET',
  url: 'http://petstore.swagger.io/v2/store/inventory' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/store/inventory")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://petstore.swagger.io/v2/store/inventory");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/store/inventory"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

successful operation

Suggest Edits

Place an order for a pet

 
posthttp://petstore.swagger.io/v2/store/order
curl --request POST \
  --url http://petstore.swagger.io/v2/store/order
var request = require("request");

var options = { method: 'POST',
  url: 'http://petstore.swagger.io/v2/store/order' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/store/order")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://petstore.swagger.io/v2/store/order");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/store/order"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

id
int64
petId
int64
quantity
int32
shipDate
date-time
status
string

Order Status

complete
boolean

Response

successful operation

idinteger
petIdinteger
quantityinteger
shipDatestring
statusstring

Order Status

completeboolean

Invalid Order

Suggest Edits

Find purchase order by ID

For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions

 
gethttp://petstore.swagger.io/v2/store/order/orderId
curl --request GET \
  --url http://petstore.swagger.io/v2/store/order/orderId
var request = require("request");

var options = { method: 'GET',
  url: 'http://petstore.swagger.io/v2/store/order/orderId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/store/order/orderId")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://petstore.swagger.io/v2/store/order/orderId");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/store/order/orderId"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

orderId
int64
required

ID of pet that needs to be fetched

Response

successful operation

idinteger
petIdinteger
quantityinteger
shipDatestring
statusstring

Order Status

completeboolean

Invalid ID supplied

Order not found

Suggest Edits

Delete purchase order by ID

For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors

 
deletehttp://petstore.swagger.io/v2/store/order/orderId
curl --request DELETE \
  --url http://petstore.swagger.io/v2/store/order/orderId
var request = require("request");

var options = { method: 'DELETE',
  url: 'http://petstore.swagger.io/v2/store/order/orderId' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/store/order/orderId")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "http://petstore.swagger.io/v2/store/order/orderId");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/store/order/orderId"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

orderId
int64
required

ID of the order that needs to be deleted

Response

Invalid ID supplied

Order not found

Suggest Edits

Create user

This can only be done by the logged in user.

 
posthttp://petstore.swagger.io/v2/user
curl --request POST \
  --url http://petstore.swagger.io/v2/user
var request = require("request");

var options = { method: 'POST', url: 'http://petstore.swagger.io/v2/user' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/user")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://petstore.swagger.io/v2/user");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/user"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Body Params

id
int64
username
string
firstName
string
lastName
string
email
string
password
string
phone
string
userStatus
int32

User Status

Response

successful operation

Suggest Edits

Creates list of users with given input array

 
posthttp://petstore.swagger.io/v2/user/createWithArray
curl --request POST \
  --url http://petstore.swagger.io/v2/user/createWithArray
var request = require("request");

var options = { method: 'POST',
  url: 'http://petstore.swagger.io/v2/user/createWithArray' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/user/createWithArray")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://petstore.swagger.io/v2/user/createWithArray");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/user/createWithArray"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

successful operation

Suggest Edits

Creates list of users with given input array

 
posthttp://petstore.swagger.io/v2/user/createWithList
curl --request POST \
  --url http://petstore.swagger.io/v2/user/createWithList
var request = require("request");

var options = { method: 'POST',
  url: 'http://petstore.swagger.io/v2/user/createWithList' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/user/createWithList")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://petstore.swagger.io/v2/user/createWithList");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/user/createWithList"

response = requests.request("POST", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

successful operation

Suggest Edits

Logs user into the system

 
gethttp://petstore.swagger.io/v2/user/login
curl --request GET \
  --url 'http://petstore.swagger.io/v2/user/login?username=username&password=password'
var request = require("request");

var options = { method: 'GET',
  url: 'http://petstore.swagger.io/v2/user/login',
  qs: 
   { username: 'username',
     password: 'password' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/user/login?username=username&password=password")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://petstore.swagger.io/v2/user/login?username=username&password=password");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/user/login"

querystring = {"username":"username","password":"password"}

response = requests.request("GET", url, params=querystring)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Query Params

username
string
required

The user name for login

password
string
required

The password for login in clear text

Response

successful operation

Invalid username/password supplied

Suggest Edits

Logs out current logged in user session

 
gethttp://petstore.swagger.io/v2/user/logout
curl --request GET \
  --url http://petstore.swagger.io/v2/user/logout
var request = require("request");

var options = { method: 'GET',
  url: 'http://petstore.swagger.io/v2/user/logout' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/user/logout")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://petstore.swagger.io/v2/user/logout");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/user/logout"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Response

successful operation

Suggest Edits

Get user by user name

 
gethttp://petstore.swagger.io/v2/user/username
curl --request GET \
  --url http://petstore.swagger.io/v2/user/username
var request = require("request");

var options = { method: 'GET',
  url: 'http://petstore.swagger.io/v2/user/username' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/user/username")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://petstore.swagger.io/v2/user/username");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/user/username"

response = requests.request("GET", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

username
string
required

The name that needs to be fetched. Use user1 for testing.

Response

successful operation

idinteger
usernamestring
firstNamestring
lastNamestring
emailstring
passwordstring
phonestring
userStatusinteger

User Status

Invalid username supplied

User not found

Suggest Edits

Updated user

This can only be done by the logged in user.

 
puthttp://petstore.swagger.io/v2/user/username
curl --request PUT \
  --url http://petstore.swagger.io/v2/user/username
var request = require("request");

var options = { method: 'PUT',
  url: 'http://petstore.swagger.io/v2/user/username' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/user/username")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "http://petstore.swagger.io/v2/user/username");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/user/username"

response = requests.request("PUT", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

username
string
required

name that need to be updated

Body Params

id
int64
username
string
firstName
string
lastName
string
email
string
password
string
phone
string
userStatus
int32

User Status

Response

Invalid user supplied

User not found

Suggest Edits

Delete user

This can only be done by the logged in user.

 
deletehttp://petstore.swagger.io/v2/user/username
curl --request DELETE \
  --url http://petstore.swagger.io/v2/user/username
var request = require("request");

var options = { method: 'DELETE',
  url: 'http://petstore.swagger.io/v2/user/username' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
require 'uri'
require 'net/http'

url = URI("http://petstore.swagger.io/v2/user/username")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
var data = JSON.stringify(false);

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "http://petstore.swagger.io/v2/user/username");

xhr.send(data);
import requests

url = "http://petstore.swagger.io/v2/user/username"

response = requests.request("DELETE", url)

print(response.text)
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

username
string
required

The name that needs to be deleted

Response

Invalid username supplied

User not found