mirror of
https://github.com/oxen-io/session-open-group-server.git
synced 2023-12-13 20:30:35 +01:00
Re-wrap descriptions properly at 100 columns
The initial version came out of swagger edit, which is a crappy text editor.
This commit is contained in:
parent
f4ae24c5ea
commit
886a78b83b
1 changed files with 103 additions and 86 deletions
189
src/api.yaml
189
src/api.yaml
|
@ -2,8 +2,8 @@ openapi: 3.0.1
|
||||||
info:
|
info:
|
||||||
title: Session Open Group Server
|
title: Session Open Group Server
|
||||||
description: >
|
description: >
|
||||||
API documentation for Session open groups. This is the API that [Session](https://getsession.org)
|
API documentation for Session open groups. This is the API that
|
||||||
and related tools use to interface with open groups.
|
[Session](https://getsession.org) and related tools use to interface with open groups.
|
||||||
contact:
|
contact:
|
||||||
name: The Oxen Project
|
name: The Oxen Project
|
||||||
email: team@oxen.io
|
email: team@oxen.io
|
||||||
|
@ -35,7 +35,8 @@ paths:
|
||||||
tags: [Rooms]
|
tags: [Rooms]
|
||||||
summary: "Returns a list of available rooms on the server."
|
summary: "Returns a list of available rooms on the server."
|
||||||
description: >
|
description: >
|
||||||
Rooms to which the user does not have access (e.g. because they are banned) are not included.
|
Rooms to which the user does not have access (e.g. because they are banned) are not
|
||||||
|
included.
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: successful operation
|
description: successful operation
|
||||||
|
@ -59,7 +60,9 @@ paths:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/Room"
|
$ref: "#/components/schemas/Room"
|
||||||
403:
|
403:
|
||||||
description: Forbidden. Returned if the user is banned from the room or otherwise does not have read access to the room.
|
description: >
|
||||||
|
Forbidden. Returned if the user is banned from the room or otherwise does not have read
|
||||||
|
access to the room.
|
||||||
content: {}
|
content: {}
|
||||||
/room/{roomToken}/pollInfo:
|
/room/{roomToken}/pollInfo:
|
||||||
get:
|
get:
|
||||||
|
@ -145,10 +148,10 @@ paths:
|
||||||
files:
|
files:
|
||||||
type: array
|
type: array
|
||||||
description: >
|
description: >
|
||||||
Optional list of file IDs attached to this message. The referenced file IDs must
|
Optional list of file IDs attached to this message. The referenced file IDs
|
||||||
have been recently uploaded and not already referenced by another message.
|
must have been recently uploaded and not already referenced by another message.
|
||||||
Referenced files will have their expiries updated to 15 days, and will be deleted
|
Referenced files will have their expiries updated to 15 days, and will be
|
||||||
if the message is deleted.
|
deleted if the message is deleted.
|
||||||
|
|
||||||
|
|
||||||
If any of the files are already associated with another message then the
|
If any of the files are already associated with another message then the
|
||||||
|
@ -156,8 +159,8 @@ paths:
|
||||||
|
|
||||||
|
|
||||||
When submitting a message *edit* this field must contain the IDs of any newly
|
When submitting a message *edit* this field must contain the IDs of any newly
|
||||||
uploaded files that are part of the edit, existing attachment IDs may be
|
uploaded files that are part of the edit, existing attachment IDs may be omitted
|
||||||
omitted (but including them is not an error).
|
(but including them is not an error).
|
||||||
items:
|
items:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
|
@ -192,8 +195,8 @@ paths:
|
||||||
description: >
|
description: >
|
||||||
A short, English-language string describing the reason the failure occured.
|
A short, English-language string describing the reason the failure occured.
|
||||||
This is for use as a fallback ONLY: clients should prefer to identify failure
|
This is for use as a fallback ONLY: clients should prefer to identify failure
|
||||||
through examining the other fields in the response and only use `reason` as
|
through examining the other fields in the response and only use `reason` as a
|
||||||
a user-facing failure description if no known failure is included (which might
|
user-facing failure description if no known failure is included (which might
|
||||||
happen if the server speaks a new version of the protocol than the client
|
happen if the server speaks a new version of the protocol than the client
|
||||||
understands).
|
understands).
|
||||||
example: "Future horrible failure reason"
|
example: "Future horrible failure reason"
|
||||||
|
@ -271,8 +274,8 @@ paths:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: >
|
description: >
|
||||||
True if the user does not have write permissions to the room, e.g. because the
|
True if the user does not have write permissions to the room, e.g. because the
|
||||||
user has been restricted or room permissions have changed since the message was
|
user has been restricted or room permissions have changed since the message
|
||||||
posted. Omitted when false.
|
was posted. Omitted when false.
|
||||||
notYours:
|
notYours:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: >
|
description: >
|
||||||
|
@ -307,9 +310,9 @@ paths:
|
||||||
tags: [Messages]
|
tags: [Messages]
|
||||||
summary: "Retrieves messages from the room preceding a given id."
|
summary: "Retrieves messages from the room preceding a given id."
|
||||||
description: >
|
description: >
|
||||||
Retrieves messages from the room immediately preceding the given message ID.
|
Retrieves messages from the room immediately preceding the given message ID. This endpoint
|
||||||
This endpoint is intended to be used with `.../recent` to allow a client to retrieve the most
|
is intended to be used with `.../recent` to allow a client to retrieve the most recent
|
||||||
recent messages and then walk backwards through batches of ever-older messages. As with
|
messages and then walk backwards through batches of ever-older messages. As with
|
||||||
`.../recent`, messages are returned in order from most recent to least recent.
|
`.../recent`, messages are returned in order from most recent to least recent.
|
||||||
|
|
||||||
As with `.../recent`, this endpoint does not include deleted messages and always returns the
|
As with `.../recent`, this endpoint does not include deleted messages and always returns the
|
||||||
|
@ -338,11 +341,12 @@ paths:
|
||||||
tags: [Messages]
|
tags: [Messages]
|
||||||
summary: "Retrieves message updates from a room."
|
summary: "Retrieves message updates from a room."
|
||||||
description: >
|
description: >
|
||||||
This endpoint retrieves new, edited, and deleted messages posted to this room since the given
|
This endpoint retrieves new, edited, and deleted messages posted to this room since the
|
||||||
update id. Returns `limit` messages at a time (100 if no limit is given). Returned messages
|
given update id. Returns `limit` messages at a time (100 if no limit is given). Returned
|
||||||
include any new messages, updates to existing messages (i.e. edits), and message deletions
|
messages include any new messages, updates to existing messages (i.e. edits), and message
|
||||||
made to the room since the given update id. Messages are returned in "update" order, that
|
deletions made to the room since the given update id. Messages are returned in "update"
|
||||||
is, in the order in which the change was applied to the room, from oldest the newest.
|
order, that is, in the order in which the change was applied to the room, from oldest the
|
||||||
|
newest.
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/components/parameters/pathRoomToken"
|
- $ref: "#/components/parameters/pathRoomToken"
|
||||||
- $ref: "#/components/parameters/queryMessagesLimit"
|
- $ref: "#/components/parameters/queryMessagesLimit"
|
||||||
|
@ -367,9 +371,9 @@ paths:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
description: >
|
description: >
|
||||||
Indicates the number of additional message updates after the last one returned.
|
Indicates the number of additional message updates after the last one
|
||||||
A positive value indicates that more messages are available (that is: that the
|
returned. A positive value indicates that more messages are available (that
|
||||||
limit was binding).
|
is: that the limit was binding).
|
||||||
messages:
|
messages:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@ -391,7 +395,8 @@ paths:
|
||||||
- name: X-Filename
|
- name: X-Filename
|
||||||
in: header
|
in: header
|
||||||
description: >
|
description: >
|
||||||
Suggested filename of the upload. Typically the basename of the file uploaded from the user.
|
Suggested filename of the upload. Typically the basename of the file uploaded from the
|
||||||
|
user.
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
requestBody:
|
requestBody:
|
||||||
|
@ -443,9 +448,9 @@ paths:
|
||||||
summary: "Uploads a file to a room using a JSON encoded body."
|
summary: "Uploads a file to a room using a JSON encoded body."
|
||||||
description: >
|
description: >
|
||||||
This is less efficient when a binary upload is possible because the body must be passed as
|
This is less efficient when a binary upload is possible because the body must be passed as
|
||||||
base64-encoded data (which is 33% larger). The user must have upload and posting permissions
|
base64-encoded data (which is 33% larger). The user must have upload and posting
|
||||||
for the room. The file will have a default lifetime of 1 hour, but that is extended to 15
|
permissions for the room. The file will have a default lifetime of 1 hour, but that is
|
||||||
days when the containing message referencing the upload is submitted.
|
extended to 15 days when the containing message referencing the upload is submitted.
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/components/parameters/pathRoomToken"
|
- $ref: "#/components/parameters/pathRoomToken"
|
||||||
requestBody:
|
requestBody:
|
||||||
|
@ -490,24 +495,31 @@ paths:
|
||||||
properties:
|
properties:
|
||||||
filename:
|
filename:
|
||||||
type: string
|
type: string
|
||||||
description: The suggested filename of the file. Omitted if the file was uploaded without a filename (e.g. from older clients, or clients that specify an empty filename.)
|
description: >
|
||||||
|
The suggested filename of the file. Omitted if the file was uploaded without a
|
||||||
|
filename (e.g. from older clients, or clients that specify an empty filename.)
|
||||||
size:
|
size:
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
description: "The file size, in bytes. (*Not* the length of the base64-encoded data.)"
|
description: >
|
||||||
|
The file size, in bytes. (*Not* the length of the base64-encoded data.)
|
||||||
uploaded:
|
uploaded:
|
||||||
type: number
|
type: number
|
||||||
format: double
|
format: double
|
||||||
description: "The unix timestamp when the file was uploaded."
|
description: The unix timestamp when the file was uploaded.
|
||||||
expires:
|
expires:
|
||||||
type: number
|
type: number
|
||||||
format: double
|
format: double
|
||||||
nullable: true
|
nullable: true
|
||||||
description: ""
|
description: >
|
||||||
|
The unix timestamp when the file is scheduled to be removed. Will be null if
|
||||||
|
the attachment is permanent, such as for room images or attachments in pinned
|
||||||
|
messages.
|
||||||
403:
|
403:
|
||||||
$ref: "#/paths/~1room~1%7BroomToken%7D/get/responses/403"
|
$ref: "#/paths/~1room~1%7BroomToken%7D/get/responses/403"
|
||||||
404:
|
404:
|
||||||
description: "The referenced file does not exist. (It may have expired, or may be invalid.)"
|
description: >
|
||||||
|
The referenced file does not exist. (It may have expired, or may be invalid.)
|
||||||
|
|
||||||
/room/{roomToken}/file/{fileId}/{filename}:
|
/room/{roomToken}/file/{fileId}/{filename}:
|
||||||
get:
|
get:
|
||||||
|
@ -518,7 +530,7 @@ paths:
|
||||||
binary response body. The filename parameter is ignored and may be empty: it is primarily
|
binary response body. The filename parameter is ignored and may be empty: it is primarily
|
||||||
included to aid in clients that want the request to include a filename, and differentiates
|
included to aid in clients that want the request to include a filename, and differentiates
|
||||||
this as a request retrieving the file itself rather than the file as a JSON response. See
|
this as a request retrieving the file itself rather than the file as a JSON response. See
|
||||||
the version without `/filename` for a JSON-returning version."
|
the version without `/filename` for a JSON-returning version.
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/components/parameters/pathRoomToken"
|
- $ref: "#/components/parameters/pathRoomToken"
|
||||||
- $ref: "#/components/parameters/pathFileId"
|
- $ref: "#/components/parameters/pathFileId"
|
||||||
|
@ -566,7 +578,6 @@ paths:
|
||||||
$ref: "#/paths/~1room~1%7BroomToken%7D~1file~1%7BfileId%7D/get/responses/403"
|
$ref: "#/paths/~1room~1%7BroomToken%7D~1file~1%7BfileId%7D/get/responses/403"
|
||||||
|
|
||||||
|
|
||||||
#/user/{sessionId}/
|
|
||||||
/user/{sessionId}/ban:
|
/user/{sessionId}/ban:
|
||||||
post:
|
post:
|
||||||
tags: [Users]
|
tags: [Users]
|
||||||
|
@ -579,13 +590,13 @@ paths:
|
||||||
users who have never visited the server or room(s).
|
users who have never visited the server or room(s).
|
||||||
|
|
||||||
|
|
||||||
The user's messages are not deleted by this request. In order to ban and delete all messages
|
The user's messages are not deleted by this request. In order to ban and delete all
|
||||||
use the `/sequence` endpoint to bundle a `/user/.../ban` with a `/user/.../deleteMessages`
|
messages use the `/sequence` endpoint to bundle a `/user/.../ban` with a
|
||||||
request.
|
`/user/.../deleteMessages` request.
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: "#/components/parameters/pathSessionId"
|
- $ref: "#/components/parameters/pathSessionId"
|
||||||
requestBody:
|
requestBody:
|
||||||
description: "Details of the ban to apply. To unban a user, specify a negative timeout."
|
description: Details of the ban to apply. To unban a user, specify a negative timeout.
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
|
@ -598,8 +609,8 @@ paths:
|
||||||
$ref: "#/components/schemas/RoomToken"
|
$ref: "#/components/schemas/RoomToken"
|
||||||
minItems: 1
|
minItems: 1
|
||||||
description: >
|
description: >
|
||||||
List of room tokens to which the ban should be applied. The invoking user must be
|
List of room tokens to which the ban should be applied. The invoking user must
|
||||||
a moderator (or admin) of all of the given rooms.
|
be a moderator (or admin) of all of the given rooms.
|
||||||
|
|
||||||
|
|
||||||
Exclusive of `global`.
|
Exclusive of `global`.
|
||||||
|
@ -618,8 +629,8 @@ paths:
|
||||||
example: 86400
|
example: 86400
|
||||||
description: >
|
description: >
|
||||||
How long the ban should apply, in seconds. If there is an existing ban on the
|
How long the ban should apply, in seconds. If there is an existing ban on the
|
||||||
user in the given rooms or globally this updates the existing expiry to the given
|
user in the given rooms or globally this updates the existing expiry to the
|
||||||
value. If omitted or `null` the ban does not expire.
|
given value. If omitted or `null` the ban does not expire.
|
||||||
|
|
||||||
If this value is set to a negative value (`-1` is suggested) then any existing
|
If this value is set to a negative value (`-1` is suggested) then any existing
|
||||||
bans for this user are *removed* from the given rooms/server. Note, however,
|
bans for this user are *removed* from the given rooms/server. Note, however,
|
||||||
|
@ -649,7 +660,10 @@ paths:
|
||||||
description: Ban applied successfully.
|
description: Ban applied successfully.
|
||||||
content: {}
|
content: {}
|
||||||
403:
|
403:
|
||||||
description: "Permission denied. The user attempting to set the ban does not have moderator permissions for one or more of the given rooms (or server moderator permission for a global ban)."
|
description: >
|
||||||
|
Permission denied. The user attempting to set the ban does not have moderator
|
||||||
|
permissions for one or more of the given rooms (or server moderator permission for a
|
||||||
|
global ban).
|
||||||
content: {}
|
content: {}
|
||||||
/user/{sessionId}/permission:
|
/user/{sessionId}/permission:
|
||||||
post:
|
post:
|
||||||
|
@ -687,8 +701,8 @@ paths:
|
||||||
$ref: "#/components/schemas/RoomToken"
|
$ref: "#/components/schemas/RoomToken"
|
||||||
minItems: 1
|
minItems: 1
|
||||||
description: >
|
description: >
|
||||||
List of room tokens to which the permissions should be applied. The invoking user
|
List of room tokens to which the permissions should be applied. The invoking
|
||||||
must be a moderator (or admin) of all of the given rooms.
|
user must be a moderator (or admin) of all of the given rooms.
|
||||||
timeout:
|
timeout:
|
||||||
type: number
|
type: number
|
||||||
format: double
|
format: double
|
||||||
|
@ -704,10 +718,10 @@ paths:
|
||||||
permission will revert to the room's defaults.
|
permission will revert to the room's defaults.
|
||||||
|
|
||||||
|
|
||||||
Using a timeout of -1 clears any given permission/restrictions immediately. Note
|
Using a timeout of -1 clears any given permission/restrictions immediately.
|
||||||
that, in this case, the actual true/false value is ignored. For instance,
|
Note that, in this case, the actual true/false value is ignored. For instance,
|
||||||
`timeout: -1, read: false` and `timeout: -1, read: true` both clear any
|
`timeout: -1, read: false` and `timeout: -1, read: true` both clear any existing
|
||||||
existing user-specific permission for `read`.
|
user-specific permission for `read`.
|
||||||
read:
|
read:
|
||||||
type: boolean
|
type: boolean
|
||||||
nullable: true
|
nullable: true
|
||||||
|
@ -715,8 +729,8 @@ paths:
|
||||||
description: >
|
description: >
|
||||||
If true this grants permission to read the room's messages even if the room
|
If true this grants permission to read the room's messages even if the room
|
||||||
defaults do not allow reading. If false this restricts permission to read the
|
defaults do not allow reading. If false this restricts permission to read the
|
||||||
room's messages even if the room's default allows reading. Specifying this
|
room's messages even if the room's default allows reading. Specifying this as
|
||||||
as null will explicitly delete any user-specific read override (effectively
|
null will explicitly delete any user-specific read override (effectively
|
||||||
returning the user's read permission to the room's default).
|
returning the user's read permission to the room's default).
|
||||||
write:
|
write:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
@ -732,8 +746,8 @@ paths:
|
||||||
nullable: true
|
nullable: true
|
||||||
example: true
|
example: true
|
||||||
description: >
|
description: >
|
||||||
If true this grants permission to upload files to the room for this user, even if
|
If true this grants permission to upload files to the room for this user, even
|
||||||
the room's default permission does not allow uploads. If false the user is
|
if the room's default permission does not allow uploads. If false the user is
|
||||||
restricted from uploading files. Specifying as null will explicitly delete any
|
restricted from uploading files. Specifying as null will explicitly delete any
|
||||||
user-specific override, returning the user's effective permission to the room's
|
user-specific override, returning the user's effective permission to the room's
|
||||||
default.
|
default.
|
||||||
|
@ -771,8 +785,8 @@ paths:
|
||||||
tags: [Users]
|
tags: [Users]
|
||||||
summary: Adds or removes moderator powers.
|
summary: Adds or removes moderator powers.
|
||||||
description: >
|
description: >
|
||||||
Adds or removes moderator or admin permissions to a user for specific rooms, or globally
|
Adds or removes moderator or admin permissions to a user for specific rooms, or globally on
|
||||||
on the server.
|
the server.
|
||||||
|
|
||||||
|
|
||||||
Note that the given session ID does not have to exist: it is possible to grant moderator
|
Note that the given session ID does not have to exist: it is possible to grant moderator
|
||||||
|
@ -793,8 +807,8 @@ paths:
|
||||||
$ref: "#/components/schemas/RoomToken"
|
$ref: "#/components/schemas/RoomToken"
|
||||||
minItems: 1
|
minItems: 1
|
||||||
description: >
|
description: >
|
||||||
List of room tokens to which the moderator status should be applied. The invoking
|
List of room tokens to which the moderator status should be applied. The
|
||||||
user must be an admin of all of the given rooms.
|
invoking user must be an admin of all of the given rooms.
|
||||||
|
|
||||||
|
|
||||||
Exclusive of `global`.
|
Exclusive of `global`.
|
||||||
|
@ -821,10 +835,10 @@ paths:
|
||||||
or administrators.
|
or administrators.
|
||||||
|
|
||||||
|
|
||||||
If false then this user will have their admin permission removed, but will remain
|
If false then this user will have their admin permission removed, but will
|
||||||
a moderator (if they were previously a moderator or admin). To remove both
|
remain a moderator (if they were previously a moderator or admin). To remove
|
||||||
moderator and admin status you can specify simply `moderator: false` rather than
|
both moderator and admin status you can specify simply `moderator: false` rather
|
||||||
needing to specify both values as false.
|
than needing to specify both values as false.
|
||||||
visible:
|
visible:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: >
|
description: >
|
||||||
|
@ -905,9 +919,9 @@ paths:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: >
|
description: >
|
||||||
If true then delete all messages made by this user from all rooms on the server.
|
If true then delete all messages made by this user from all rooms on the server.
|
||||||
The invoking user must be a server-level moderator or admin. In particular, this
|
The invoking user must be a server-level moderator or admin. In particular,
|
||||||
does *not* allow a non-server moderator to delete the user's messages from all
|
this does *not* allow a non-server moderator to delete the user's messages from
|
||||||
rooms they moderate.
|
all rooms they moderate.
|
||||||
|
|
||||||
|
|
||||||
Exclusive of `rooms`.
|
Exclusive of `rooms`.
|
||||||
|
@ -1112,8 +1126,8 @@ components:
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
description: >
|
description: >
|
||||||
Session IDs of the room's public administrators. (Administrators are moderators who also
|
Session IDs of the room's public administrators. (Administrators are moderators who
|
||||||
have permission to add or remove other moderators.)
|
also have permission to add or remove other moderators.)
|
||||||
example:
|
example:
|
||||||
- "050123456776543210012345677654321001234567765432100123456776543210"
|
- "050123456776543210012345677654321001234567765432100123456776543210"
|
||||||
hidden_mods:
|
hidden_mods:
|
||||||
|
@ -1121,8 +1135,8 @@ components:
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
description: >
|
description: >
|
||||||
Session IDs of moderators who are not publicly displayed as moderators of the room. This
|
Session IDs of moderators who are not publicly displayed as moderators of the room.
|
||||||
field is only present if the requestor is a moderator/admin of the room or server.
|
This field is only present if the requestor is a moderator/admin of the room or server.
|
||||||
example:
|
example:
|
||||||
- "0589abcdeffedcba9889abcdeffedcba9889abcdeffedcba9889abcdeffedcba98"
|
- "0589abcdeffedcba9889abcdeffedcba9889abcdeffedcba9889abcdeffedcba98"
|
||||||
hidden_admins:
|
hidden_admins:
|
||||||
|
@ -1130,15 +1144,15 @@ components:
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
description: >
|
description: >
|
||||||
Session IDs of admins who are not publicly displayed as administrators of the room. This
|
Session IDs of admins who are not publicly displayed as administrators of the room.
|
||||||
field is only present if the requestor is a moderator/admin of the room or server.
|
This field is only present if the requestor is a moderator/admin of the room or server.
|
||||||
example:
|
example:
|
||||||
- "050011223344556677001122334455667700112233445566770011223344556677"
|
- "050011223344556677001122334455667700112233445566770011223344556677"
|
||||||
moderator:
|
moderator:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: >
|
description: >
|
||||||
Will be set to true if the requestor is recognized with moderator permissions in the room.
|
Will be set to true if the requestor is recognized with moderator permissions in the
|
||||||
Omitted otherwise.
|
room. Omitted otherwise.
|
||||||
example: true
|
example: true
|
||||||
admin:
|
admin:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
@ -1149,14 +1163,14 @@ components:
|
||||||
read:
|
read:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: >
|
description: >
|
||||||
Whether the user has permission to read messages in the room. (Note that changes to this
|
Whether the user has permission to read messages in the room. (Note that changes to
|
||||||
property do not cause an `info_update` increment.)
|
this property do not cause an `info_update` increment.)
|
||||||
example: true
|
example: true
|
||||||
write:
|
write:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: >
|
description: >
|
||||||
Whether the user has permission to post messages to the room. (Note that changes to this
|
Whether the user has permission to post messages to the room. (Note that changes to
|
||||||
property do not cause an `info_update` increment.)
|
this property do not cause an `info_update` increment.)
|
||||||
example: true
|
example: true
|
||||||
upload:
|
upload:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
@ -1178,8 +1192,8 @@ components:
|
||||||
- type: object
|
- type: object
|
||||||
description: >
|
description: >
|
||||||
The session ID of the user who posted this message. Omitted in contexts where the
|
The session ID of the user who posted this message. Omitted in contexts where the
|
||||||
information isn't available or isn't useful or available, such as in the confirmation
|
information isn't available or isn't useful or available, such as in the
|
||||||
of submitting a post.
|
confirmation of submitting a post.
|
||||||
timestamp:
|
timestamp:
|
||||||
type: number
|
type: number
|
||||||
format: double
|
format: double
|
||||||
|
@ -1202,8 +1216,8 @@ components:
|
||||||
type: string
|
type: string
|
||||||
format: byte
|
format: byte
|
||||||
description: >
|
description: >
|
||||||
The posted message data, encoded in base64. For a deleted message this field is omitted.
|
The posted message data, encoded in base64. For a deleted message this field is
|
||||||
For an edited message, this field contains the latest message value.
|
omitted. For an edited message, this field contains the latest message value.
|
||||||
signature:
|
signature:
|
||||||
type: string
|
type: string
|
||||||
format: byte
|
format: byte
|
||||||
|
@ -1269,9 +1283,9 @@ components:
|
||||||
name: X-SOGS-Timestamp
|
name: X-SOGS-Timestamp
|
||||||
in: header
|
in: header
|
||||||
description: >
|
description: >
|
||||||
Unix timestamp integer (expressed as a string) of the time when the request was initiated (to
|
Unix timestamp integer (expressed as a string) of the time when the request was initiated
|
||||||
help avoid replay attacks). This timestamp must be within ±24 hours of the server's time
|
(to help avoid replay attacks). This timestamp must be within ±24 hours of the server's
|
||||||
when the request is received.
|
time when the request is received.
|
||||||
signature:
|
signature:
|
||||||
type: apiKey
|
type: apiKey
|
||||||
name: X-SOGS-Signature
|
name: X-SOGS-Signature
|
||||||
|
@ -1283,4 +1297,7 @@ components:
|
||||||
`METHOD || PATH || NONCE || TIMESTAMP || SERVER_PUBKEY || BODY`
|
`METHOD || PATH || NONCE || TIMESTAMP || SERVER_PUBKEY || BODY`
|
||||||
|
|
||||||
|
|
||||||
signed using the client's Session ID pubkey, using base64 encoding (with or without padding).
|
signed using the client's Session ID pubkey, using base64 encoding (with or without
|
||||||
|
padding).
|
||||||
|
|
||||||
|
# vim:sw=2:et:tw=100
|
||||||
|
|
Loading…
Reference in a new issue