User Tools

Site Tools


api:tools:human-tasks:upload-image

API : Tools : Human Task : Upload Image

Introduction

This request is used to upload an image which is used by the editor for the description. Supported formats are PNG, JPG, GIF, TIFF.

The upload API requires that the task has been created in advance before adding images to it.

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

Request

URL https://api.telecomx.dk/tools/humantask/TASK_ID/image
Method POST
Access level RESELLER_ADMIN or ADMIN.
Params TASK_ID Id of the task the image belongs to
Body picture Binary image data

Request example

n/a

Response

Json object
url String URL to serve the image from

Example

{
  "url": "https://image.telecomx.dk/12345678901234567890ABCD.png?token=token_for_current_user"
}

Errors

Error code Message Description
400 bad_request Task id not found in request URI
404 id Task not found
404 picture The file was missing or invalid
422 picture Filetype must be PNG or JPG
403 access_denied Insufficient access level
500 internal_error <unspecified>
api/tools/human-tasks/upload-image.txt · Last modified: by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki