Admin API to finish a compatibility session
This commit is contained in:
@@ -342,6 +342,98 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/admin/v1/compat-sessions/{id}/finish": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"compat-session"
|
||||
],
|
||||
"summary": "Finish a compatibility session",
|
||||
"description": "Calling this endpoint will finish the compatibility session, preventing any further use. A job will be scheduled to sync the user's devices with the homeserver.",
|
||||
"operationId": "finishCompatSession",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"title": "The ID of the resource",
|
||||
"$ref": "#/components/schemas/ULID"
|
||||
},
|
||||
"style": "simple"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Compatibility session was finished",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SingleResponse_for_CompatSession"
|
||||
},
|
||||
"example": {
|
||||
"data": {
|
||||
"type": "compat-session",
|
||||
"id": "02081040G2081040G2081040G2",
|
||||
"attributes": {
|
||||
"user_id": "01040G2081040G2081040G2081",
|
||||
"device_id": "FFGGHHIIJJ",
|
||||
"user_session_id": "0J289144GJ289144GJ289144GJ",
|
||||
"redirect_uri": null,
|
||||
"created_at": "1970-01-01T00:00:00Z",
|
||||
"user_agent": "Mozilla/5.0",
|
||||
"last_active_at": "1970-01-01T00:00:00Z",
|
||||
"last_active_ip": "1.2.3.4",
|
||||
"finished_at": "1970-01-01T00:00:00Z",
|
||||
"human_name": null
|
||||
},
|
||||
"links": {
|
||||
"self": "/api/admin/v1/compat-sessions/02081040G2081040G2081040G2"
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
"self": "/api/admin/v1/compat-sessions/02081040G2081040G2081040G2/finish"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Session is already finished",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
},
|
||||
"example": {
|
||||
"errors": [
|
||||
{
|
||||
"title": "Compatibility session with ID 00000000000000000000000000 is already finished"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Compatibility session was not found",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
},
|
||||
"example": {
|
||||
"errors": [
|
||||
{
|
||||
"title": "Compatibility session with ID 00000000000000000000000000 not found"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/admin/v1/oauth2-sessions": {
|
||||
"get": {
|
||||
"tags": [
|
||||
|
||||
Reference in New Issue
Block a user