Dockingjudge docs

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

[
    {
        "id": 0,
        "username": "string",
        "profile_pic": "string"
    }
]
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "array",
    "items": {
        "$ref": "#/components/schemas/User"
    }
}

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

{
    "id": 0,
    "username": "string",
    "settings": null,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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

{
    "username": "string",
    "password": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "type": "object",
    "description": "Used for incoming login requests.",
    "properties": {
        "username": {
            "type": "string",
            "writeOnly": true
        },
        "password": {
            "type": "string",
            "writeOnly": true
        }
    },
    "required": [
        "password",
        "username"
    ]
}

{
    "username": "string",
    "password": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "type": "object",
    "description": "Used for incoming login requests.",
    "properties": {
        "username": {
            "type": "string",
            "writeOnly": true
        },
        "password": {
            "type": "string",
            "writeOnly": true
        }
    },
    "required": [
        "password",
        "username"
    ]
}

{
    "username": "string",
    "password": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "type": "object",
    "description": "Used for incoming login requests.",
    "properties": {
        "username": {
            "type": "string",
            "writeOnly": true
        },
        "password": {
            "type": "string",
            "writeOnly": true
        }
    },
    "required": [
        "password",
        "username"
    ]
}

Response 200 OK

{
    "username": "string",
    "password": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "description": "Used for incoming login requests.",
    "properties": {
        "username": {
            "type": "string",
            "writeOnly": true
        },
        "password": {
            "type": "string",
            "writeOnly": true
        }
    },
    "required": [
        "password",
        "username"
    ]
}

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

Schema of the response body
{
    "description": "Service alive."
}

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

{
    "id": 0,
    "username": "string",
    "settings": null,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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

{
    "id": 0,
    "username": "string",
    "settings": null,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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"
    ]
}

{
    "id": 0,
    "username": "string",
    "settings": null,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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"
    ]
}

{
    "id": 0,
    "username": "string",
    "settings": null,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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

{
    "id": 0,
    "username": "string",
    "settings": null,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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

{
    "id": 0,
    "username": "string",
    "settings": null,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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
        }
    }
}

{
    "id": 0,
    "username": "string",
    "settings": null,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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
        }
    }
}

{
    "id": 0,
    "username": "string",
    "settings": null,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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

{
    "id": 0,
    "username": "string",
    "settings": null,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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

{
    "id": 0,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "type": "object",
    "description": "Used for incoming user profile picture change requests.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "profile_pic": {
            "type": "string",
            "format": "uri",
            "nullable": true
        }
    },
    "required": [
        "id"
    ]
}

{
    "id": 0,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "type": "object",
    "description": "Used for incoming user profile picture change requests.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "profile_pic": {
            "type": "string",
            "format": "uri",
            "nullable": true
        }
    },
    "required": [
        "id"
    ]
}

Response 200 OK

{
    "id": 0,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "description": "Used for incoming user profile picture change requests.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "profile_pic": {
            "type": "string",
            "format": "uri",
            "nullable": true
        }
    },
    "required": [
        "id"
    ]
}

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

{
    "id": 0,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "type": "object",
    "description": "Used for incoming user profile picture change requests.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "profile_pic": {
            "type": "string",
            "format": "uri",
            "nullable": true
        }
    }
}

{
    "id": 0,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "type": "object",
    "description": "Used for incoming user profile picture change requests.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "profile_pic": {
            "type": "string",
            "format": "uri",
            "nullable": true
        }
    }
}

Response 200 OK

{
    "id": 0,
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "type": "object",
    "description": "Used for incoming user profile picture change requests.",
    "properties": {
        "id": {
            "type": "integer",
            "readOnly": true
        },
        "profile_pic": {
            "type": "string",
            "format": "uri",
            "nullable": true
        }
    },
    "required": [
        "id"
    ]
}

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

{
    "username": "string",
    "password": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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"
    ]
}

{
    "username": "string",
    "password": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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"
    ]
}

{
    "username": "string",
    "password": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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

{
    "username": "string",
    "password": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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

{
    "id": 0,
    "username": "string",
    "profile_pic": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

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
search