Teams¶
Resource | Operation | Description |
---|---|---|
GET | GET /v1/teams | Return the list of teams. |
GET /v1/teams/(team_id)/export/grafana | Export the QoS into Grafana. | |
GET /v1/teams/(team_id)/grants | Return the grants of a team. | |
GET /v1/teams/(team_id) | Return a specific team. | |
PUT | PUT /v1/teams/(team_id)/grants | Change the grants of a team. |
-
GET
/v1/teams
¶ Return the list of teams.
Example request:
GET /teams HTTP/1.1 Host: example.com Accept: application/json
Example response:
HTTP/1.1 200 OK { 'teams': [{ 'createdAt': '2019-01-15T10:24:35Z', 'id': '5b513051-74b4-4eea-9739-5c5053c3d37c', 'name': 'My team', 'updatedAt': '2019-01-15T10:24:35Z' }] }
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – list of teams
-
GET
/v1/teams/
(team_id)/export/grafana
¶ Export the QoS into Grafana.
Example request:
GET /teams/76b96ead-a7ed-447b-8fa6-26b57bc571e5/export/grafana HTTP/1.1 Host: example.com Accept: application/json
Example response:
HTTP/1.1 200 OK { "metas": { "url": "https://warp-endpoint.local", "token": "foobar" }, "grafana_template": { // Grafana JSON format // See: https://grafana.com/docs/reference/export_import/ } }
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – the JSON to import in Grafana
-
GET
/v1/teams/
(team_id)/grants
¶ Return the grants of a team.
Example request:
GET /teams/76b96ead-a7ed-447b-8fa6-26b57bc571e5/grants HTTP/1.1 Host: example.com Accept: application/json
Example response:
HTTP/1.1 200 OK [ { 'role': 'member', 'user': 'john' } ]
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – the grants
-
PUT
/v1/teams/
(team_id)/grants
¶ Change the grants of a team.
Example request:
PUT /teams/76b96ead-a7ed-447b-8fa6-26b57bc571e5/grants HTTP/1.1 Host: example.com Accept: application/json { 'grants': [{ 'user': 'foo', 'role': 'member' }] }
Example response:
HTTP/1.1 200 OK [ { 'role': 'member', 'user': 'john' } ]
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – the grants
-
GET
/v1/teams/
(team_id)¶ Return a specific team.
Example request:
GET /teams/76b96ead-a7ed-447b-8fa6-26b57bc571e5 HTTP/1.1 Host: example.com Accept: application/json
Example response:
HTTP/1.1 200 OK { 'createdAt': '2019-01-15T11:44:23Z', 'id': '76b96ead-a7ed-447b-8fa6-26b57bc571e5', 'name': 'My team', 'updatedAt': '2019-01-15T11:44:23Z' }
Response Headers: - Content-Type – application/json
Status Codes: - 200 OK – the team