52bf0279Native room details#
| Property | Value |
|---|---|
| Service | crossfire |
| Operation | room |
| Method | GET |
| Path | /api/rooms/{roomId} |
| Authentication | human |
| Success status | 200 |
| Response data | Unpaginated value |
| Request format | json |
| Maximum request body | 2097152 bytes (service default) |
| Permission codes | room.manage.native |
Listed permission codes are alternatives, not token scopes. The service also checks access to the requested records and rejects stale revisions or controller generations.
Path parameters#
object; fields below; unknown fields rejected
| Field path | Representation and constraints |
|---|---|
roomId | immutable Matrix room ID; maximum 255 UTF-16 units |
Validation#
check.object({ roomId: check.roomId })Referenced definitions:
Query parameters#
custom validation:
roomContext
; see function below
Accepted query parameters: agentId.
Query parameters are URL text. The validation function below specifies their format, defaults and combinations. Pagination applies only to operations that use it.
Additional checks#
The following checks apply in addition to the field limits.
Constraint on value:
export function roomContext(input: unknown): Result<{
agentId?: string;
}> {
const parsed = listQuery(['agentId'])(input);
if (!parsed.ok)
return parsed;
const agentId = parsed.value.get('agentId');
if (agentId === null)
return success({});
const valid = check.identifier(agentId);
return valid.ok ? success({ agentId }) : valid;
}Validation#
query.roomContextReferenced definitions:
Request body#
empty object; unknown fields rejected
Validation#
check.emptyReferenced definitions:
Response data#
object; fields below; unknown fields rejected (
room
)
| Field path | Representation and constraints |
|---|---|
roomId | immutable Matrix room ID; maximum 255 UTF-16 units |
name | string; 1–255 UTF-16 units; well-formed Unicode; no C0/DEL controls |
topic | string; 0–4096 UTF-16 units; well-formed Unicode; no C0/DEL controls |
alias | string; 1–255 UTF-16 units; well-formed Unicode; no C0/DEL controls; JSON null permitted |
authority | object; fields below; unknown fields rejected; constraint: Native creator authority has no finite power level (
roomAuthority
); JSON null permitted |
authority.matrixUserId | well-formed Matrix user ID; maximum 255 UTF-16 units |
authority.powerLevel | exact JSON integer; -9007199254740991…9007199254740991; JSON null permitted |
authority.creator | boolean |
authority.creatorIds | array; 0–100 entries; item: well-formed Matrix user ID; maximum 255 UTF-16 units |
authority.readLevel | exact JSON integer; -9007199254740991…9007199254740991 |
authority.replyLevel | exact JSON integer; -9007199254740991…9007199254740991 |
authority.inviteLevel | exact JSON integer; -9007199254740991…9007199254740991 |
authority.kickLevel | exact JSON integer; -9007199254740991…9007199254740991 |
authority.changePowerLevel | exact JSON integer; -9007199254740991…9007199254740991 |
authority.nativePermissions | array; 0–1000 entries; item: object; fields below; unknown fields rejected |
authority.nativePermissions[].action | string; 1–255 UTF-16 units; well-formed Unicode; no C0/DEL controls |
authority.nativePermissions[].level | exact JSON integer; -9007199254740991…9007199254740991 |
Additional checks#
The following checks apply in addition to the field limits.
Constraint on authority:
authority => authority.creator === (authority.powerLevel === null)Validation#
res.roomReferenced definitions:
Response envelope#
A successful JSON response contains data and meta. Replace the data placeholder below with the response fields described above. Errors contain error instead of data.
{
"data": "<value matching the response-data validator>",
"meta": {
"requestId": "00000000-0000-0000-0000-000000000001"
}
}