From 0c98d1644cd1b92954879084236b2f13af9d5ec9 Mon Sep 17 00:00:00 2001 From: asonix Date: Fri, 7 Jul 2023 13:44:21 -0500 Subject: [PATCH] Add healthz to readme, add error case for set_not_found --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index af4ff14..d5f1512 100644 --- a/README.md +++ b/README.md @@ -391,11 +391,15 @@ pict-rs offers the following endpoints: GET /image/process.jpg?src=asdf.png&thumbnail=256&blur=3.0 ``` which would create a 256x256px JPEG thumbnail and blur it -- `GET /image/process_backgrounded.{ext}?src={file}&...` queue transformations to be applied to a given file. This accepts the same arguments as the `process.{ext}` endpoint, but does not wait for the processing to complete. +- `GET /image/process_backgrounded.{ext}?src={file}&...` queue transformations to be applied to a + given file. This accepts the same arguments as the `process.{ext}` endpoint, but does not wait + for the processing to complete. - `GET /image/details/process.{ext}?src={file}&...` for getting the details of a processed image. The returned JSON is the same format as listed for the full-resolution details endpoint. - `DELETE /image/delete/{delete_token}/{file}` or `GET /image/delete/{delete_token}/{file}` to delete a file, where `delete_token` and `file` are from the `/image` endpoint's JSON +- `GET /healthz` Check the health of the pict-rs server. This will check that the `sled` embedded + database is functional and that the configured store is accessible The following endpoints are protected by an API key via the `X-Api-Token` header, and are disabled @@ -446,6 +450,14 @@ A secure API key can be generated by any password generator. } ``` + In the event pict-rs can't find the provided alias, it will return a 400 Bad Request with the + following json: + ```json + { + "msg": "No hash associated with provided alias" + } + ``` + Additionally, all endpoints support setting deadlines, after which the request will cease processing. To enable deadlines for your requests, you can set the `X-Request-Deadline` header to an i128 value representing the number of nanoseconds since the UNIX Epoch. A simple way to calculate