pyfarm.agent.http.api.base module¶
Base¶
Contains the base resources used for building up the root of the agent’s api.
-
class
pyfarm.agent.http.api.base.
APIResource
[source]¶ Bases:
pyfarm.agent.http.core.resource.Resource
Base class for all api resources
-
isLeaf
= True¶
-
ALLOWED_CONTENT_TYPE
= frozenset(['application/json', None])¶
-
DEFAULT_CONTENT_TYPE
= frozenset(['application/json'])¶
-
ALLOWED_ACCEPT
= frozenset(['*/*', 'application/json', None])¶
-
DEFAULT_ACCEPT
= frozenset(['application/json'])¶
-
-
class
pyfarm.agent.http.api.base.
APIRoot
[source]¶ Bases:
pyfarm.agent.http.api.base.APIResource
-
isLeaf
= False¶
-
-
class
pyfarm.agent.http.api.base.
Versions
[source]¶ Bases:
pyfarm.agent.http.api.base.APIResource
Returns a list of api versions which this agent will support
-
GET
/api/v1/versions/ HTTP/1.1
¶ Request
GET /api/v1/versions/HTTP/1.1 Accept: application/json
Response
HTTP/1.1 200 OK Content-Type: application/json { "versions": [1] }
-
isLeaf
= True¶
-