Access token - API representation
The Access token resource represents an access token in Shardimage.
Resource Representation
Access token resource
{
"id": string,
"type": string,
"expiry": unsigned int,
"limit": unsigned int,
"extra": object,
"createdAt": unsigned int
}
Property name | Value | Description | Notes |
---|---|---|---|
id |
string |
ID of the access token | read only |
type |
string |
Type of the access token | Supports only “imageUrl” and “upload” types |
expiry |
unsigned int |
Time of expiration | |
limit |
unsigned int |
Usage limitation | |
extra |
object / null |
Additional extras for the access token | |
createdAt |
unsigned int |
Creation time of the access token |
Access token extra resource
Depending on the type of access token, we distinguish two varieties of access token extras.
Image url access token extra
{
"cloudId": string,
"secret": string,
"authentication": {
string username: string password,
}
}
Property name | Value | Description | Notes |
---|---|---|---|
cloudId |
string |
Cloud restriction for the access token | Optional. Please note that, if cloudId is not restricted, then an unauthorized person can use the token to serve images from other clouds. |
secret |
string |
Additional secret signature to the token | Not optional |
authentication |
object / null |
Data of HTTP authentication. The key is the username and the value is the password. | Optional |
Upload access token extra
{
"notificationUrls": array,
"addTags": array,
"transformationPrefix": string,
"cloudId": string,
"format": string,
"projection": string,
"transformation": string,
"transformationPostfix": string,
"publicId": string,
"tags": array
}
Property name | Value | Description | Notes |
---|---|---|---|
notificationUrls |
array |
Send notification request to given url if upload finished | Optional |
tags |
array |
This will overwrite the tags you set up during upload | Optional |
addTags |
array |
Adding extra tags without overwriting them | Optional |
transformation |
string |
This will overwrite the transformations you set up during upload | Optional |
transformationPrefix |
string |
Add transformation prefix to transformation | Optional |
transformationPostfix |
string |
Add transformation postfix to transformation | Optional |
cloudId |
string |
Cloud restriction for the access token | Optional. Please note that, if the cloudId is not restricted, the token can upload images to any cloud. If somebody else gets the token, it can cause unauthorized usage and generate cost to the owner of the token. |
format |
string |
Setting up format for the image | Optional |
projection |
string |
Projections for the uploaded image | Optional |
publicId |
string |
This will overwrite the public ID you set up during upload | Optional |
Methods
Available methods for Access tokens resources are as follows: