From 441e04db5ab54c2dbc8544d85f7b290a02d57348 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Fri, 17 Nov 2023 10:02:57 +0100 Subject: [PATCH 1/2] Update admin API user media doc Mention null values and add an example for a common encrypted media response. Signed-off-by: Michael Weimann --- changelog.d/16654.doc | 1 + docs/admin_api/user_admin_api.md | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 changelog.d/16654.doc diff --git a/changelog.d/16654.doc b/changelog.d/16654.doc new file mode 100644 index 000000000000..61019e03678a --- /dev/null +++ b/changelog.d/16654.doc @@ -0,0 +1 @@ +Provide an example for a common encrypted media response from the admin user media API and mention possible null values. diff --git a/docs/admin_api/user_admin_api.md b/docs/admin_api/user_admin_api.md index 66089c634b93..b9d7f1a76583 100644 --- a/docs/admin_api/user_admin_api.md +++ b/docs/admin_api/user_admin_api.md @@ -618,6 +618,16 @@ A response body like the following is returned: "quarantined_by": null, "safe_from_quarantine": false, "upload_name": "test2.png" + }, + { + "created_ts": 300400, + "last_access_ts": 300700, + "media_id": "BzYNLRUgGHphBkdKGbzXwbjX", + "media_length": 1337, + "media_type": "application/octet-stream", + "quarantined_by": null, + "safe_from_quarantine": false, + "upload_name": null } ], "next_token": 3, @@ -679,16 +689,17 @@ The following fields are returned in the JSON response body: - `media` - An array of objects, each containing information about a media. Media objects contain the following fields: - `created_ts` - integer - Timestamp when the content was uploaded in ms. - - `last_access_ts` - integer - Timestamp when the content was last accessed in ms. + - `last_access_ts` - integer or null - Timestamp when the content was last accessed in ms. + Null if there was no access, yet. - `media_id` - string - The id used to refer to the media. Details about the format are documented under [media repository](../media_repository.md). - `media_length` - integer - Length of the media in bytes. - `media_type` - string - The MIME-type of the media. - - `quarantined_by` - string - The user ID that initiated the quarantine request - for this media. + - `quarantined_by` - string or null - The user ID that initiated the quarantine request + for this media. Null if not quarantined. - `safe_from_quarantine` - bool - Status if this media is safe from quarantining. - - `upload_name` - string - The name the media was uploaded with. + - `upload_name` - string or null - The name the media was uploaded with. Null if unavailable. - `next_token`: integer - Indication for pagination. See above. - `total` - integer - Total number of media. From 0bbf34bbeec8a012bf77e9fd717b9b98b3063355 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Fri, 17 Nov 2023 08:36:56 -0500 Subject: [PATCH 2/2] Clarify upload_name. --- docs/admin_api/user_admin_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/admin_api/user_admin_api.md b/docs/admin_api/user_admin_api.md index b9d7f1a76583..e8e492d0951c 100644 --- a/docs/admin_api/user_admin_api.md +++ b/docs/admin_api/user_admin_api.md @@ -699,7 +699,7 @@ The following fields are returned in the JSON response body: - `quarantined_by` - string or null - The user ID that initiated the quarantine request for this media. Null if not quarantined. - `safe_from_quarantine` - bool - Status if this media is safe from quarantining. - - `upload_name` - string or null - The name the media was uploaded with. Null if unavailable. + - `upload_name` - string or null - The name the media was uploaded with. Null if not provided during upload. - `next_token`: integer - Indication for pagination. See above. - `total` - integer - Total number of media.