summaryrefslogtreecommitdiffstats
path: root/doc/api
diff options
context:
space:
mode:
authorSimon Schuster <git@rationality.eu>2020-10-06 22:50:11 +0200
committerFlorian Pritz <bluewind@xinu.at>2020-10-07 14:02:48 +0200
commit4bdbb005a9b214d5355d4f2036d510f898bc8a87 (patch)
tree46cf3c0643189e28b530aafb5a9a68d1913d6e40 /doc/api
parent60d497ff685a581cf63b4840af372d8613bd3f81 (diff)
API: Add `minimum-id-length` post parameter
This parameter controls the generated id for files (file/upload) and multipastes (file/create_multipaste). The post parameter has to be a positive integer value >= 2. Changes by Florian Pritz: - minor style and typo fixes - NEWS entry - check expected error reply content in tests Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'doc/api')
-rw-r--r--doc/api/file.md47
1 files changed, 28 insertions, 19 deletions
diff --git a/doc/api/file.md b/doc/api/file.md
index 7d95274a3..ceb9aa27f 100644
--- a/doc/api/file.md
+++ b/doc/api/file.md
@@ -58,14 +58,16 @@ Required access level: `basic`
Upload a new file.
-| POST field | Type | Comment |
-| ---------- | ---- | ------- |
-| file[`<index>`] | File | Required. Arbitrary index. |
+| POST field | Type | Comment |
+| ---------- | ---- | ------- |
+| file[`<index>`] | File | Required. Arbitrary index. |
+| minimum-id-length | Int | Optional. Values >= 2 only |
-| error_id | Message | Note |
-| -------- | ------- | ---- |
-| file/no-file | No file was uploaded or unknown error occurred | |
-| file/upload-verify | Failed to verify uploaded file(s) | This error provides additional detail |
+| error_id | Message | Note |
+| -------- | ------- | ---- |
+| file/no-file | No file was uploaded or unknown error occurred | |
+| file/bad-minimum-id-length | Invalid value passsed to bad-minimum-id-length | |
+| file/upload-verify | Failed to verify uploaded file(s) | This error provides additional detail |
```javascript
// Success response
@@ -101,6 +103,10 @@ Example:
}
```
+| Version | Change |
+| ------- | ------ |
+| NEXT | Add parameter ''minimum-id-length'' to control the length of generated content id |
+
## file/history
Return the currently available files/multipastes.
@@ -253,15 +259,17 @@ Required access level: `basic`
Create a new multipaste.
-| POST field | Type | Comment |
-| ---------- | ---- | ------- |
-| ids[`<index>`] | upload-id | Required. Arbitrary index. This only accepts IDs of files, not other multipastes. |
+| POST field | Type | Comment |
+| ---------- | ---- | ------- |
+| ids[`<index>`] | upload-id | Required. Arbitrary index. This only accepts IDs of files, not other multipastes. |
+| minimum-id-length | Int | Optional. Values >= 2 only |
-| error_id | Message | Note |
-| -------- | ------- | ---- |
-| file/create_multipaste/no-ids | No IDs specified | |
-| file/create_multipaste/duplicate-id | Duplicate IDs are not supported | |
-| file/create_multipaste/verify-failed | Failed to verify ID(s) | This error provides additional detail |
+| error_id | Message | Note |
+| -------- | ------- | ---- |
+| file/bad-minimum-id-length | Invalid value passsed to bad-minimum-id-length | |
+| file/create_multipaste/no-ids | No IDs specified | |
+| file/create_multipaste/duplicate-id | Duplicate IDs are not supported | |
+| file/create_multipaste/verify-failed | Failed to verify ID(s) | This error provides additional detail |
```javascript
// Success response
@@ -292,7 +300,8 @@ Example:
}
```
-| Version | Change |
-| ------- | ------ |
-| 1.1.0 | Add url key to response |
-| 1.3.0 | Change required access level from ''apikey'' to ''basic'' |
+| Version | Change |
+| ------- | ------ |
+| 1.1.0 | Add url key to response |
+| 1.3.0 | Change required access level from ''apikey'' to ''basic'' |
+| NEXT | Add paramter ''minimum-id-length'' to control the length of generated content id |