Upload an image as a named resource (values name it resource:<name>)
PUT
/v1/resources/{name}
const url = 'https://example.com/v1/resources/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'image/png'}, body: 'binary'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/v1/resources/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: image/png' \ --data binaryAuthorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”name
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”A PNG, JPEG, SVG or TIFF image.
string format: binary
string format: binary
Responses
Section titled “Responses”The answer.
Media typeapplication/json
object
name
required
string
sha256
required
string
size
required
integer
format
required
string
width
required
integer
height
required
integer
updatedAt
required
string
updatedBy
required
string
Example generated
{ "name": "example", "sha256": "example", "size": 1, "format": "example", "width": 1, "height": 1, "updatedAt": "example", "updatedBy": "example"}No key, or not a valid one.
Media typeapplication/json
object
code
required
string
message
required
string
requestId
string
Example
{ "code": "field-unknown"}The key lacks the scope, or its tenant is suspended or deleted.
Media typeapplication/json
object
code
required
string
message
required
string
requestId
string
Example
{ "code": "field-unknown"}