Account Service API 0.1.0
Account Service of Dockingjudge
all
GET /api/v1/accounts/all/
Description
Get all users (filtered).
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
jwtAuth |
header | string | N/A | No | JWT Bearer token |
id |
query | array | No | User ID list |
Response 200 OK
authorize
GET /api/v1/accounts/authorize/
Description
Check for authorization.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
jwtAuth |
header | string | N/A | No | JWT Bearer token |
Response 200 OK
Schema of the response body
{
"type": "object",
"description": "Used for trusted user responses.",
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"settings": {},
"profile_pic": {
"type": "string",
"format": "uri",
"nullable": true
}
},
"required": [
"id",
"username"
]
}
Response 401 Unauthorized
login
POST /api/v1/accounts/login/
Description
Perform log in.
Request body
Response 200 OK
ping
GET /api/v1/accounts/ping/
Description
Ping.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
jwtAuth |
header | string | N/A | No | JWT Bearer token |
Response 200 OK
profile
GET /api/v1/accounts/profile/
Description
Get, update or delete my profile.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
jwtAuth |
header | string | N/A | No | JWT Bearer token |
Response 200 OK
Schema of the response body
{
"type": "object",
"description": "Used for trusted user responses.",
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"settings": {},
"profile_pic": {
"type": "string",
"format": "uri",
"nullable": true
}
},
"required": [
"id",
"username"
]
}
PUT /api/v1/accounts/profile/
Description
Get, update or delete my profile.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
jwtAuth |
header | string | N/A | No | JWT Bearer token |
Request body
Schema of the request body
{
"type": "object",
"description": "Used for trusted user responses.",
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"settings": {},
"profile_pic": {
"type": "string",
"format": "uri",
"nullable": true
}
},
"required": [
"id",
"username"
]
}
Schema of the request body
{
"type": "object",
"description": "Used for trusted user responses.",
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"settings": {},
"profile_pic": {
"type": "string",
"format": "uri",
"nullable": true
}
},
"required": [
"id",
"username"
]
}
Schema of the request body
{
"type": "object",
"description": "Used for trusted user responses.",
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"settings": {},
"profile_pic": {
"type": "string",
"format": "uri",
"nullable": true
}
},
"required": [
"id",
"username"
]
}
Response 200 OK
Schema of the response body
{
"type": "object",
"description": "Used for trusted user responses.",
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"settings": {},
"profile_pic": {
"type": "string",
"format": "uri",
"nullable": true
}
},
"required": [
"id",
"username"
]
}
PATCH /api/v1/accounts/profile/
Description
Get, update or delete my profile.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
jwtAuth |
header | string | N/A | No | JWT Bearer token |
Request body
Schema of the request body
{
"type": "object",
"description": "Used for trusted user responses.",
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"settings": {},
"profile_pic": {
"type": "string",
"format": "uri",
"nullable": true
}
}
}
Schema of the request body
{
"type": "object",
"description": "Used for trusted user responses.",
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"settings": {},
"profile_pic": {
"type": "string",
"format": "uri",
"nullable": true
}
}
}
Schema of the request body
{
"type": "object",
"description": "Used for trusted user responses.",
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"settings": {},
"profile_pic": {
"type": "string",
"format": "uri",
"nullable": true
}
}
}
Response 200 OK
Schema of the response body
{
"type": "object",
"description": "Used for trusted user responses.",
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"settings": {},
"profile_pic": {
"type": "string",
"format": "uri",
"nullable": true
}
},
"required": [
"id",
"username"
]
}
DELETE /api/v1/accounts/profile/
Description
Delete my profile.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
jwtAuth |
header | string | N/A | No | JWT Bearer token |
Response 204 No Content
PUT /api/v1/accounts/profile/pic/
Description
Set my profile picture.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
jwtAuth |
header | string | N/A | No | JWT Bearer token |
Request body
Response 200 OK
PATCH /api/v1/accounts/profile/pic/
Description
Set my profile picture.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
jwtAuth |
header | string | N/A | No | JWT Bearer token |
Request body
Response 200 OK
register
POST /api/v1/accounts/register/
Description
Register a user.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
jwtAuth |
header | string | N/A | No | JWT Bearer token |
Request body
Schema of the request body
{
"type": "object",
"description": "Used for incoming registration requests.",
"properties": {
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"password": {
"type": "string",
"writeOnly": true,
"maxLength": 128
}
},
"required": [
"password",
"username"
]
}
Schema of the request body
{
"type": "object",
"description": "Used for incoming registration requests.",
"properties": {
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"password": {
"type": "string",
"writeOnly": true,
"maxLength": 128
}
},
"required": [
"password",
"username"
]
}
Schema of the request body
{
"type": "object",
"description": "Used for incoming registration requests.",
"properties": {
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"password": {
"type": "string",
"writeOnly": true,
"maxLength": 128
}
},
"required": [
"password",
"username"
]
}
Response 201 Created
Schema of the response body
{
"type": "object",
"description": "Used for incoming registration requests.",
"properties": {
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"password": {
"type": "string",
"writeOnly": true,
"maxLength": 128
}
},
"required": [
"password",
"username"
]
}
user
GET /api/v1/accounts/user/{username}/
Description
Get user's profile by its name.
Input parameters
| Parameter | In | Type | Default | Nullable | Description |
|---|---|---|---|---|---|
jwtAuth |
header | string | N/A | No | JWT Bearer token |
username |
path | string | No |
Response 200 OK
Schema of the response body
{
"type": "object",
"description": "Used for untrusted user responses.",
"properties": {
"id": {
"type": "integer",
"readOnly": true
},
"username": {
"type": "string",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150
},
"profile_pic": {
"type": "string",
"format": "uri",
"nullable": true
}
},
"required": [
"id",
"username"
]
}
Schemas
CustomTokenObtainPair
| Name | Type |
|---|---|
password |
string |
username |
string |
MyProfile
| Name | Type |
|---|---|
id |
integer |
profile_pic |
string(uri)| null |
settings |
|
username |
string |
PatchedMyProfile
| Name | Type |
|---|---|
id |
integer |
profile_pic |
string(uri)| null |
settings |
|
username |
string |
PatchedUserProfilePic
| Name | Type |
|---|---|
id |
integer |
profile_pic |
string(uri)| null |
Registration
| Name | Type |
|---|---|
password |
string |
username |
string |
User
| Name | Type |
|---|---|
id |
integer |
profile_pic |
string(uri)| null |
username |
string |
UserProfilePic
| Name | Type |
|---|---|
id |
integer |
profile_pic |
string(uri)| null |
Security schemes
| Name | Type | Scheme | Description |
|---|---|---|---|
| jwtAuth | http | bearer |