===== Sites ===== .. include:: ../../complete.rst The Sites endpoints provide a way to view site details. Get Site Listing ---------------- .. http:get:: /api/v1/jb/sites/ Get list of sites **Example Request**: .. code:: GET /api/v1/jb/sites/ Accept: application/json Authorization: Token 7297b3ebb0e7f7baf5f54d39908dda99f5ea8665 **Example Response**: .. code:: HTTP/1.1 200 OK Vary: Accept Content-Type: text/javascript { "id": 2, "domain": "localhost:8000", "name": "localhost:8000" } :>jsonarr int id: the id of the site :>jsonarr string domain: the domain name and optionally a port for the site :>jsonarr string name: the name of the site, which is often the same as the domain :reqheader Accept: the response content type depends on ``Accept`` header :reqheader Authorization: contains the token to be used for authentication :resheader Content-Type: this depends on ``Accept`` header of request :statuscode 200: OK :statuscode 403: Authentication Failed :statuscode 404: Client with the supplied ID not found Get Details for a Site ---------------------- .. http:get:: /api/v1/jb/sites/(int:id)/ Get site details **Example Request**: .. code:: GET /api/v1/jb/sites/2/ Accept: application/json Authorization: Token 7297b3ebb0e7f7baf5f54d39908dda99f5ea8665 **Example Response**: .. code:: HTTP/1.1 200 OK Vary: Accept Content-Type: text/javascript { "id": 2, "domain": "localhost:8000", "name": "localhost:8000" } :param int id: the id of the site :>json int id: the id of the site :>json string domain: the domain name and optionally a port for the site :>json string name: the name of the site, which is often the same as the domain :reqheader Accept: the response content type depends on ``Accept`` header :reqheader Authorization: contains the token to be used for authentication :resheader Content-Type: this depends on ``Accept`` header of request :statuscode 200: OK :statuscode 403: Authentication Failed :statuscode 404: Client with the supplied ID not found