Skip to content
Mateusz Donhefner edited this page Jan 18, 2021 · 3 revisions

Photos

Endpoint for handling photos.

Table of Contents

Photos

Add photo

Permission : Only logged users are allowed.

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>
}

Delete photo

Permission : Only logged users are allowed.

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.

Set photo main

Permission : Only logged users are allowed.

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.

Clone this wiki locally