Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

API documentation

Jevgenij Dmitrijev edited this page May 26, 2017 · 3 revisions

Uploading new resource

POST /api/v1/resources

Header params

Key Required Type Description
Hc-Token yes string(255) Token provided by interactivesolutions/honeycomb-apps package

Data params

Key Required Type Example Description
file yes file [file_content] A file you want to upload

Examples

Request

POST /api/v1/resources

Headers

Hc-Token:		3pIUfVeqsZnJhZCPBoBnlJHoc0Ued...

Data

file:		FILE_DATA

Response good

Status Code:		200 OK
{
	"id": "633ae62b-ef4b-4483-99e9-4ec9a4fcb966",
	"url": "http//domain/resources/633ae62b-ef4b-4483-99e9-4ec9a4fcb966"
}

Response bad

Status Code:		400 Bad Request
{
	"success": false,
	"id": "ERROR ID",
	"message": "ERROR MESSAGE"
}

Using uploaded resource

POST /api/v1/resources/{id}/{width}/{height}/{option?}

URL params

Key Required Type Example Description
id yes string(36) 633ae62b-ef4b-4483-99e9-4ec9a4fcb966 Resource ID which you got when were uploading file
width optional int(4) 100 Width of new thumbnail
height optional int(4) 100 Height of new thumbnail
option optional string(3) fit fit - fill the whole area with image content, if this parameter will not be passed thumbnail will be scaled accordingly

Clone this wiki locally