diff options
author | 2022-05-15 08:52:46 -0400 | |
---|---|---|
committer | 2022-05-15 14:52:46 +0200 | |
commit | 6e947ff2662d0b9fc475c5b21e9f1cfb0bb308a0 (patch) | |
tree | 9138d4e7a988e883b7734431034c055776f255f6 /docs/api | |
parent | [documentation] Nlnet application (#572) (diff) | |
download | gotosocial-6e947ff2662d0b9fc475c5b21e9f1cfb0bb308a0.tar.xz |
[feature] Media cleanup endpoint (#560)
Adds an admin endpoint to trigger a remote media cleanup.
Fixed #348
Signed-off-by: Sashanoraa <sasha@noraa.gay>
Diffstat (limited to 'docs/api')
-rw-r--r-- | docs/api/swagger.yaml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index 4c78baff9..7bfb96a35 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -2574,6 +2574,38 @@ paths: summary: View domain block with the given ID. tags: - admin + /api/v1/admin/media_cleanup: + post: + consumes: + - application/json + - application/xml + - application/x-www-form-urlencoded + operationId: mediaCleanup + parameters: + - description: |- + Number of days of remote media to keep. Native values will be treated as 0. + If value is not specified, the value of media-remote-cache-days in the server config will be used. + format: int64 + in: query + name: remote_cache_days + type: integer + x-go-name: RemoteCacheDays + produces: + - application/json + responses: + "200": + description: Echos the number of days requested. The cleanup is performed + asynchronously after the request completes. + "400": + description: bad request + "403": + description: forbidden + security: + - OAuth2 Bearer: + - admin + summary: Clean up remote media older than the specified number of days. + tags: + - admin /api/v1/apps: post: consumes: |