Table of Contents

API : Network Device Model : Upload picture

Introduction

This request is used to upload a picture of the device model. Supported formats are PNG and JPG. The image should be square.

The upload must be performed as a multipart/form-data post request.

Request

URL https://api.telecomx.dk/network/device/model/MODEL_ID/picture
Method POST
Access level RESELLER_ADMIN or ADMIN.
Params MODEL_ID Id of the network device model to upload the picture for.
Body file Binary image data

Request example

https://api.telecomx.dk/network/device/model/1234567890ABCDEF1234578/picture

Response

Json object
success Boolean True on success.

Example

{
  success: true,
  picture: '123456789012345678901234'
}

Errors

Error code Message Description
400 bad_request Id not found in request URI
404 not_found Network device model not found
404 file The file was missing or invalid
422 file Filetype must be PNG or JPG
403 access_denied Insufficient access level
500 internal_error <unspecified>