Single group¶
-
GET /api/v1/groups/:id
Retrieve the info of a certain group.
Request parameters¶
- id (int) - The group’s ID.
Example request¶
curl -i http://example.com/api/v1/groups/1 \
-H 'If-None-Match: 820727be5a235d089af4ad66ffeae017'
Request headers¶
- If-None-Match:
Send a conditional request checking the
ETag
header.
Example response¶
HTTP/1.1 200 OK
Date: Tue, 28 Aug 2018 09:35:27 GMT
Server: WSGIServer/0.2 CPython/3.7.0
Content-Type: application/json
ETag: "37fef7866db8e2a0020d2a4ea519fa75"
X-Frame-Options: SAMEORIGIN
Content-Length: 284
{
"id": 1,
"name": "Group",
"description": "An example group",
"website": "https://example.com",
"discord": "https://discord.me/examplegroup",
"twitter": "ExampleGroup",
"logo": "https://example.com/media/groups/1/logo.png",
"members": [
{
"id": 1,
"name": "John Doe",
"roles": ["Leader"],
"twitter": "JohnDoe_1234",
"discord": "John Doe#1234"
},
],
"series": [
{
"slug": "some-manga",
"title": "Some manga",
"aliases": ["Some mango"]
}
]
}
Response headers¶
- Date: The date of the request.
- Server: Information regarding the server.
- Content-Type: The content type of the response. (always application/json)
- ETag: The version identifier of the resource. Useful for caching responses.
- X-Frame-Options: Sent by Django’s clickjacking middleware.
- Content-Length: The size of the response body in bytes.
Response body¶
The response body is a JSON object which contains the following:
id (int) - The ID of the group.
name (string) - The name of the group.
description (string) - The group’s description.
website (string) - The group’s website.
discord (string) - The group’s Discord server.
twitter (string) - The group’s Twitter username.
logo (string) - The group’s logo.
members (array of object) - The group’s members. Each object contains the following:
- id (int) - The ID of the member.
- name (string) - The name of the member.
- roles (array of string) - The roles of the member.
- twitter (string) - The member’s Twitter username.
- discord (string) - The member’s Discord username and discriminator.
series (array of object) - The group’s series. Each object contains the following:
- slug (slug) - The slug of the series.
- title (string) - The title of the series.
- aliases (array of string) - Other names for the series.
Status Codes¶
- 200 OK - No error.
- 304 Not Modified - The request was conditional and the content hasn’t been modified.
- 404 Not Found - The requested group doesn’t exist.
- 400 Bad Request - The id parameter was invalid.