You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api.yaml
+68-65Lines changed: 68 additions & 65 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ tags:
24
24
description: Endpoint for submitting a batch of requests at once.
25
25
- name: Users
26
26
description: Management of users and user-related info.
27
-
- name: Onion:
27
+
- name: Onion
28
28
description: Submitting an onion request
29
29
security:
30
30
- pubkey: []
@@ -438,7 +438,7 @@ paths:
438
438
schema:
439
439
type: object
440
440
403:
441
-
description: permission denied: the calling user does not have room admin permission
441
+
description: "permission denied: the calling user does not have room admin permission"
442
442
404:
443
443
description: >
444
444
The given post was not found in this room or is ineligible for pinning (e.g. a whisper,
@@ -465,7 +465,7 @@ paths:
465
465
schema:
466
466
type: object
467
467
403:
468
-
description: permission denied: the calling user does not have room admin permission
468
+
description: "permission denied: the calling user does not have room admin permission"
469
469
470
470
/room/{roomToken}/unpin/all:
471
471
post:
@@ -480,13 +480,13 @@ paths:
480
480
- $ref: "#/components/parameters/pathRoomToken"
481
481
responses:
482
482
200:
483
-
description: successful operation: the room now has no pinned messages.
483
+
description: "successful operation: the room now has no pinned messages."
484
484
content:
485
485
application/json:
486
486
schema:
487
487
type: object
488
488
403:
489
-
description: permission denied: the calling user does not have room admin permission
489
+
description: "permission denied: the calling user does not have room admin permission"
490
490
491
491
/room/{roomToken}/file:
492
492
post:
@@ -1163,7 +1163,7 @@ paths:
1163
1163
format: byte
1164
1164
bytes:
1165
1165
description: "Optional binary body, as raw octets. Exclusive of `b64` and `json`. Not recommended when using json unless the data happens to be mostly safe ascii"
1166
-
trype: string
1166
+
type: string
1167
1167
format: binary
1168
1168
responses:
1169
1169
200:
@@ -1231,48 +1231,51 @@ paths:
1231
1231
schema:
1232
1232
type: object
1233
1233
required: [endpoint, method, headers]
1234
-
properties:
1235
-
method:
1236
-
type: string
1237
-
description: "The request method type as a string, i.e. `GET`, `POST`, `PUT`, `DELETE`."
1238
-
endpoint:
1239
-
type: string
1240
-
description: >
1241
-
The request path, e.g. `/room/123/messages/since/45678`. This name should be
1242
-
the full path beginning with a `/`; methods without a leading / are
1243
-
interpreted as legacy endpoints for older versions of Session and should not
1244
-
be used.
1245
-
headers:
1246
-
type: object
1247
-
description: >
1248
-
HTTP headers for the request; should usually include the pubkey, nonce,
1249
-
timestamp, and signature headers (`X-SOGS-Pubkey`, etc.), and sometimes a
1250
-
`Content-Type` header (the latter, if omitted, defaults to `application/json`
1251
-
if using `body`, and `application/octet-stream` if using `body_binary`).
1252
-
body:
1253
-
description: >
1254
-
Request body of the onion request. This is typically used for text-based
1255
-
values (such as JSON requests). Exclusive of `body_binary`. Not accepted for
1256
-
`GET` requests.
1257
-
type: string
1258
-
body_binary:
1259
-
description: >
1260
-
Request body for a onion request to a binary endpoint, with the body encoded
1261
-
in base64. Exclusive of `body`. Not accepted for `GET` requests.
1262
-
1263
-
The endpoint will be called with the *decoded* byte value as its body, thus
1264
-
allowing you to POST to endpoints that require binary data (such as file
1265
-
uploads). Note that when using the Content-Type header defaults to
1266
-
`application/octet-stream`.
1267
-
1268
-
Note that when including a signature in the `X-SOGS-Signature` header, the
1269
-
signature must use the decoded byte value of the body, *not* the encoded
1270
-
base64 value.
1271
-
1272
-
This is somewhat wasteful because of the overhead of base64-encoding, but is a
1273
-
limitation of onion requests.
1274
-
type: string
1275
-
format: byte
1234
+
properties:
1235
+
method:
1236
+
type: string
1237
+
description: "The request method type as a string, i.e. `GET`, `POST`, `PUT`, `DELETE`."
1238
+
endpoint:
1239
+
type: string
1240
+
description: >
1241
+
The request path, e.g. `/room/123/messages/since/45678`. This name should be
1242
+
the full path beginning with a `/`; methods without a leading / are
1243
+
interpreted as legacy endpoints for older versions of Session and should not
1244
+
be used.
1245
+
headers:
1246
+
type: object
1247
+
description: >
1248
+
HTTP headers for the request; should usually include the pubkey, nonce,
1249
+
timestamp, and signature headers (`X-SOGS-Pubkey`, etc.), and sometimes a
1250
+
`Content-Type` header (the latter, if omitted, defaults to `application/json`
1251
+
if using `body`, and `application/octet-stream` if using `body_binary`).
1252
+
body:
1253
+
description: >
1254
+
Request body of the onion request. This is typically used for text-based
1255
+
values (such as JSON requests). Exclusive of `body_binary`. Not accepted for
1256
+
`GET` requests.
1257
+
type: string
1258
+
body_binary:
1259
+
description: >
1260
+
Request body for a onion request to a binary endpoint, with the body encoded
1261
+
in base64. Exclusive of `body`. Not accepted for `GET` requests.
1262
+
1263
+
1264
+
The endpoint will be called with the *decoded* byte value as its body, thus
1265
+
allowing you to POST to endpoints that require binary data (such as file
1266
+
uploads). Note that when using the Content-Type header defaults to
1267
+
`application/octet-stream`.
1268
+
1269
+
1270
+
Note that when including a signature in the `X-SOGS-Signature` header, the
1271
+
signature must use the decoded byte value of the body, *not* the encoded
1272
+
base64 value.
1273
+
1274
+
1275
+
This is somewhat wasteful because of the overhead of base64-encoding, but is a
1276
+
limitation of onion requests.
1277
+
type: string
1278
+
format: byte
1276
1279
responses:
1277
1280
200:
1278
1281
description: >
@@ -1360,23 +1363,23 @@ components:
1360
1363
pinned_messages:
1361
1364
type: array
1362
1365
items:
1363
-
type: object
1364
-
properties:
1365
-
id:
1366
-
type: integer
1367
-
format: int64
1368
-
description: The numeric message id.
1369
-
pinned_at:
1370
-
type: number
1371
-
format: double
1372
-
description: >
1373
-
Unix timestamp of when the message was pinned.
1374
-
pinned_by:
1375
-
allOf:
1376
-
- $ref: "#/components/schemas/SessionID"
1377
-
- type: object
1378
-
description: >
1379
-
The session ID of the moderator who pinned this message.
1366
+
type: object
1367
+
properties:
1368
+
id:
1369
+
type: integer
1370
+
format: int64
1371
+
description: The numeric message id.
1372
+
pinned_at:
1373
+
type: number
1374
+
format: double
1375
+
description: >
1376
+
Unix timestamp of when the message was pinned.
1377
+
pinned_by:
1378
+
allOf:
1379
+
- $ref: "#/components/schemas/SessionID"
1380
+
- type: object
1381
+
description: >
1382
+
The session ID of the moderator who pinned this message.
1380
1383
description: >
1381
1384
This room's pinned messages, in order of when they were pinned. Omitted entirely if
0 commit comments