api:employee:picture-download
Table of Contents
API : Employee Download Picture
Introduction
This request is used to download/get/show a picture of the employee.
The picture is a PNG at 300×300 pixels.
Request
| URL | https://api.telecomx.dk/employee/EMPLOYEE_ID/picture | |
|---|---|---|
| Method | GET | |
| Access level | MANAGER or OWNER if user belongs to the customer of the employee. RESELLER if customer belongs to the reseller and employee belongs to the customer. ADMIN. |
|
| Params | EMPLOYEE_ID | Id of employee to download picture for |
Request example
https://api.telecomx.dk/employee/1234567890ABCDEF1234578/picture
Response
Binary image data: PNG at 300×300 pixels.
Example
N/A
Direct picture access
The picture can also be served directly from the image service like this:
| URL | https://image.telecomx.dk/<PICTURE_ID>.<FORMAT>?token=<token>&width=<width>&height=<height>&colors=<colors>&quality=<quality> | |
|---|---|---|
| Method | GET | |
| Access level | MANAGER or OWNER if user belongs to the customer of the employee. RESELLER if customer belongs to the reseller and employee belongs to the customer. ADMIN. |
|
| Params | PICTURE_ID | Id of the picture to show (not employee id) |
| FORMAT | Format to service picture in: png, jpeg | |
| Args | token | Token of a logged in employee with access to the customer |
| width | [Optional] Width of picture, omit to use width of original image |
|
| height | [Optional] Height of picture, omit to use height of original image |
|
| colors | [Optional] If format is png, this set the max. number of colors to use 2-16Mill. |
|
| quality | [Optioanl] If format is jpeg, this sets the image quality 1-100. |
|
Errors
| Error code | Message | Description |
|---|---|---|
| 400 | bad_request | Id not found in request URI |
| 404 | not_found | Employee not found |
| 404 | picture | Picture not found |
| 500 | internal_error | File not found in database |
| 500 | internal_error | <unspecified> |
api/employee/picture-download.txt · Last modified: 2019/04/16 11:41 by Per Møller