Documentation
Guides and API reference for uploads, image transforms and video.
npm install @cd2/fileboy-react API https://api.fileboy.io
Documentation menu
Transform presets API reference
The transform presets endpoints, generated from the OpenAPI document you can download for code generators and API clients: openapi.json or openapi.yaml. See every endpoint for the rest of the API.
https://api.fileboy.ioNamed transformations: save a chain of image transforms under a name and use it in URLs as preset:NAME. Editing a preset changes what every URL that uses it returns. Needs your private key.
/transform-presetsList transform presets
Your app's transform presets, by name.
Authorization: public key or signed token
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Fileboy-App | header | string (uuid) | With a personal access token: the id of the app the request is for. Ignored for an app's own keys and scoped keys. |
Responses
200 | All presets.application/json |
401 | No key was sent.application/json |
403 | An error. error is a short code and message says what went wrong.application/json |
/transform-presetsCreate a transform preset
Saves a chain under a name, for image URLs to use as ?transform=preset:NAME. Names are 1 to 64 lower case letters, digits, - and _, starting with a letter or digit, and unique in the app. The chain is written like the transform query parameter and checked with the same limits (400 invalid_transform); it cannot use another preset. An app can have 100 presets.
Authorization: public key or signed token
Parameters
| Name | In | Type | Description |
|---|---|---|---|
X-Fileboy-App | header | string (uuid) | With a personal access token: the id of the app the request is for. Ignored for an app's own keys and scoped keys. |
Request body
application/jsonname * | string | |
transform * | string | |
description | string |
Responses
201 | The new preset, at version 1.application/json |
400 | invalid_preset_name, invalid_transform or validation_error.application/json |
401 | No key was sent.application/json |
403 | Not the private key, or transform_preset_limit_reached.application/json |
409 | transform_preset_exists.application/json |
/transform-presets/{name}Get a transform preset
Authorization: public key or signed token
Parameters
| Name | In | Type | Description |
|---|---|---|---|
name * | path | string | The preset's name. |
X-Fileboy-App | header | string (uuid) | With a personal access token: the id of the app the request is for. Ignored for an app's own keys and scoped keys. |
Responses
200 | The preset.application/json |
400 | An error. error is a short code and message says what went wrong.application/json |
401 | No key was sent.application/json |
403 | An error. error is a short code and message says what went wrong.application/json |
404 | transform_preset_not_found.application/json |
/transform-presets/{name}Change a transform preset
Changes the chain or the description (null removes it). A new chain raises the preset's version and goes live at once: every URL that uses the preset returns the new result. A preset cannot be renamed, because its name is in URLs: create a new one instead.
Authorization: public key or signed token
Parameters
| Name | In | Type | Description |
|---|---|---|---|
name * | path | string | The preset's name. |
X-Fileboy-App | header | string (uuid) | With a personal access token: the id of the app the request is for. Ignored for an app's own keys and scoped keys. |
Request body
application/jsontransform | string | |
description | string | null |
Responses
200 | The preset.application/json |
400 | An error. error is a short code and message says what went wrong.application/json |
401 | No key was sent.application/json |
403 | An error. error is a short code and message says what went wrong.application/json |
404 | An error. error is a short code and message says what went wrong.application/json |
/transform-presets/{name}Delete a transform preset
URLs that use it answer 400 invalid_transform from then on.
Authorization: public key or signed token
Parameters
| Name | In | Type | Description |
|---|---|---|---|
name * | path | string | The preset's name. |
X-Fileboy-App | header | string (uuid) | With a personal access token: the id of the app the request is for. Ignored for an app's own keys and scoped keys. |
Responses
204 | Deleted. |
400 | An error. error is a short code and message says what went wrong.application/json |
401 | No key was sent.application/json |
403 | An error. error is a short code and message says what went wrong.application/json |
404 | An error. error is a short code and message says what went wrong.application/json |