Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #17

Open
wants to merge 1 commit into
base: v7
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 36 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,56 @@ Home page: <https://github.com/Hypertopic/Steatite>

The name of "Steatite" once was a French acronym for "*Serveur de traitement, d'émission et d'archivage de textes, images et épures*". Steatite is now an image processing service.

### Get the attributes related to an uploaded picture
### Get an optimized picture

API: */item/{corpus}/{hash}*
API: `/optimized/{hash}`

> Example: https://rzi0pem2eh.execute-api.eu-west-3.amazonaws.com/PE22-230522/item/Misc/edb559800ae39b4c9c09c9e975b4736947049543
Example: https://vogwuoualf.execute-api.eu-west-3.amazonaws.com/Steatite/optimized/b852cfdb04a89b0e7483a6d6d6b3315675cb4aa8

![b852cfdb04a89b0e7483a6d6d6b3315675cb4aa8](https://user-images.githubusercontent.com/45626870/175082351-8d980d2f-7be9-4306-8bd4-b67a692f757a.jpeg)


### Get a JPEG thumbnail (efficiently)

API: `/thumbnail/{hash}`

Example: https://vogwuoualf.execute-api.eu-west-3.amazonaws.com/Steatite/optimized/b852cfdb04a89b0e7483a6d6d6b3315675cb4aa8![b852cfdb04a89b0e7483a6d6d6b3315675cb4aa8]

![b852cfdb04a89b0e7483a6d6d6b3315675cb4aa8 (1)](https://user-images.githubusercontent.com/45626870/175082581-ecdd6aeb-319d-4927-a365-bc73d5f64a94.jpeg)

### Get attributes related to a picture in JSON

URI: `/item/{corpus}/{hash}`

In addition to the name of the item, and its related URIs,
you will get the shooting date if it is present in the EXIF metadata of the picture file.

For example, if you request the following URI:
https://vogwuoualf.execute-api.eu-west-3.amazonaws.com/Steatite/item/Test/b852cfdb04a89b0e7483a6d6d6b3315675cb4aa8

The response will be:

```
```yaml
{
"rows": [
{
"key": [
"Misc",
"edb559800ae39b4c9c09c9e975b4736947049543"
"Test",
"b852cfdb04a89b0e7483a6d6d6b3315675cb4aa8"
],
"value": {
"hash": "edb559800ae39b4c9c09c9e975b4736947049543",
"created": "2022-05-30",
"thumbnail": "https://pe22-test.s3.eu-west-3.amazonaws.com/Thumbnail/flute_logo.png",
"optimized": "https://pe22-test.s3.eu-west-3.amazonaws.com/Optimized/flute_logo.jpeg",
"name": "flute_logo.png",
"corpus": "Misc",
"resource": "https://pe22-test.s3.eu-west-3.amazonaws.com/Misc/flute_logo.png"
"created": "2020-02-05",
"baseUrlAWS": "https://steatitebucket.s3.eu-west-3.amazonaws.com/",
"name": "2000_18-25_0021_LET_R_A.jpg",
"corpus": "Test",
"response": "https://steatitebucket.s3.eu-west-3.amazonaws.com/Test/2000_18-25_0021_LET_R_A.jpg",
"optimized": "https://vogwuoualf.execute-api.eu-west-3.amazonaws.com/Steatite/optimized/b852cfdb04a89b0e7483a6d6d6b3315675cb4aa8",
"thumbnail": "https://vogwuoualf.execute-api.eu-west-3.amazonaws.com/Steatite/thumbnail/b852cfdb04a89b0e7483a6d6d6b3315675cb4aa8"
}
}
]
}
```

This part of the API is compliant with the [Hypertopic protocol](https://github.com/Hypertopic/Protocol/#item-1).