-
Notifications
You must be signed in to change notification settings - Fork 1
Photos
Mateusz Donhefner edited this page Jan 18, 2021
·
3 revisions
Endpoint for handling photos.
| Command | Method | Route | Description |
|---|---|---|---|
| Add | POST | /{culture}/api/Photos | Adds a new photo. |
Call to this API method will result in the creation of a new photo. The new photo is binary file that comes from form.
The response to this call will return data of newly created photo:
{
"id": <string>,
"url": <string>,
"isMain": <bool>
}
| Command | Method | Route | Description |
|---|---|---|---|
| Delete | DELETE | /{culture}/api/Photos/{id} | Deletes a photo with selected id. |
Call to this API method will result in deleting photo with selected id. The response to this call will return status code 204 if a photo was deleted correctly.
| Command | Method | Route | Description |
|---|---|---|---|
| SetMain | PUT | /{culture}/api/Events/{id}/subscribe | Sets photo with selected id as a main photo. |
Call to this API method will result in setting a photo with selected id as a main user photo. The response to this call will return status code 204 if photo was set correctly as a main photo.