100 lines
2.5 KiB
JSON
100 lines
2.5 KiB
JSON
{
|
|
"/api/v1/me/": {
|
|
"get": {
|
|
"description": "Gets the user object corresponding to the agent making the request, or returns a 401 error if the user is unauthenticated.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"$ref": "#/components/schemas/UserResponseSchema"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "The current user"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
}
|
|
},
|
|
"summary": "Get the user object",
|
|
"tags": [
|
|
"Current User"
|
|
]
|
|
},
|
|
"put": {
|
|
"description": "Updates the current user's first name, last name, or password.",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CurrentUserPutSchema"
|
|
}
|
|
}
|
|
},
|
|
"required": true
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"$ref": "#/components/schemas/UserResponseSchema"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "User updated successfully"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/400"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
}
|
|
},
|
|
"summary": "Update the current user",
|
|
"tags": [
|
|
"Current User"
|
|
]
|
|
}
|
|
},
|
|
"/api/v1/me/roles/": {
|
|
"get": {
|
|
"description": "Gets the user roles corresponding to the agent making the request, or returns a 401 error if the user is unauthenticated.",
|
|
"responses": {
|
|
"200": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"result": {
|
|
"$ref": "#/components/schemas/UserResponseSchema"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"description": "The current user"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/401"
|
|
}
|
|
},
|
|
"summary": "Get the user roles",
|
|
"tags": [
|
|
"Current User"
|
|
]
|
|
}
|
|
}
|
|
}\n |