api:pbx:sipphonemodels:uploadpicture
Table of Contents
API : PBX : SIP phone model Upload Picture
Introduction
This request is used to upload a picture of the SIP phone model. Supported formats are PNG and JPG.
The picture will be stored as a 200×200 pixels PNG, if the uploaded picture does not conform to this size, it will be scaled and cropped to fit the size.
The upload must be performed as a multipart/form-data post request.
Request
| URL | https://api.telecomx.dk/pbx/sipphonemodels/SIPPHONEMODEL_ID/picture | |
|---|---|---|
| Method | POST | |
| Access level | ADMIN | |
| Params | SIPPHONEMODEL_ID | Id of the SIP phone model to upload the picture for |
| Body | file | Binary image data |
Request example
https://api.telecomx.dk/pbx/sipphonemodel/1234567890ABCDEF1234578/picture
Response
| Json object | ||
|---|---|---|
| success | Boolean | True on success. |
Example
{ success: true, picture: '1234578901245678901234' }
Errors
| Error code | Message | Description |
|---|---|---|
| 400 | bad_request | Id not found in request URI |
| 404 | not_found | Employee not found |
| 404 | file | The file was missing or invalid |
| 403 | access_denied | Insufficient access level |
| 422 | file | Filetype must be PNG or JPG |
| 500 | internal_error | Failed to scale/crop image |
| 500 | internal_error | <unspecified> |
api/pbx/sipphonemodels/uploadpicture.txt · Last modified: 2015/10/08 07:41 by Per Møller