This repository was archived by the owner on Jun 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
API documentation
Jevgenij Dmitrijev edited this page May 26, 2017
·
3 revisions
POST /api/v1/resources
| Key | Required | Type | Description |
|---|---|---|---|
| Hc-Token | yes | string(255) | Token provided by interactivesolutions/honeycomb-apps package |
| Key | Required | Type | Example | Description |
|---|---|---|---|---|
| file | yes | file | [file_content] | A file you want to upload |
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"
}POST /api/v1/resources/{id}/{width}/{height}/{option?}
| 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 |