Sites

Note

This help should be accurate and comprehensive. If you see anything missing or that needs to be fixed, see How to Contribute or let us know in the Juice Slack #documentation channel.

The Sites endpoints provide a way to view site details.

Get Site Listing

GET /api/v1/jb/sites/

Get list of sites

Example Request:

GET /api/v1/jb/sites/
Accept: application/json
Authorization: Token 7297b3ebb0e7f7baf5f54d39908dda99f5ea8665

Example Response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "id": 2,
  "domain": "localhost:8000",
  "name": "localhost:8000"
}
Response JSON Array of Objects:
 
  • id (int) – the id of the site
  • domain (string) – the domain name and optionally a port for the site
  • name (string) – the name of the site, which is often the same as the domain
Request Headers:
 
  • Accept – the response content type depends on Accept header
  • Authorization – contains the token to be used for authentication
Response Headers:
 
Status Codes:

Get Details for a Site

GET /api/v1/jb/sites/(int: id)/

Get site details

Example Request:

GET /api/v1/jb/sites/2/
Accept: application/json
Authorization: Token 7297b3ebb0e7f7baf5f54d39908dda99f5ea8665

Example Response:

HTTP/1.1 200 OK
Vary: Accept
Content-Type: text/javascript

{
  "id": 2,
  "domain": "localhost:8000",
  "name": "localhost:8000"
}
Parameters:
  • id (int) – the id of the site
Response JSON Object:
 
  • id (int) – the id of the site
  • domain (string) – the domain name and optionally a port for the site
  • name (string) – the name of the site, which is often the same as the domain
Request Headers:
 
  • Accept – the response content type depends on Accept header
  • Authorization – contains the token to be used for authentication
Response Headers:
 
Status Codes: