curl --request PATCH \
--url https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/files/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expiresAfter": "<string>",
"public": "<string>",
"shareToken": "<string>",
"metadata": {}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expiresAfter: '<string>',
public: '<string>',
shareToken: '<string>',
metadata: {}
})
};
fetch('https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/files/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/files/{id}"
payload = {
"expiresAfter": "<string>",
"public": "<string>",
"shareToken": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)[
{
"name": "<string>",
"url": "<string>",
"mimetype": "<string>",
"size": 123,
"workspaceId": "<string>",
"path": "<string>",
"id": "<string>",
"expiresAt": "<string>",
"expiresAfter": 123,
"metadata": {},
"public": true,
"shareToken": "<string>",
"orgSlug": "<string>"
}
]{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}Update File
Update file
curl --request PATCH \
--url https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/files/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expiresAfter": "<string>",
"public": "<string>",
"shareToken": "<string>",
"metadata": {}
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expiresAfter: '<string>',
public: '<string>',
shareToken: '<string>',
metadata: {}
})
};
fetch('https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/files/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/files/{id}"
payload = {
"expiresAfter": "<string>",
"public": "<string>",
"shareToken": "<string>",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)[
{
"name": "<string>",
"url": "<string>",
"mimetype": "<string>",
"size": 123,
"workspaceId": "<string>",
"path": "<string>",
"id": "<string>",
"expiresAt": "<string>",
"expiresAfter": 123,
"metadata": {},
"public": true,
"shareToken": "<string>",
"orgSlug": "<string>"
}
]{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
File expiration time in seconds. This is currently a best effort expiration as it will be deleted only upon the next restart after expiration
Set to true to make uploaded file publicly available
If enabled, return a share token that will allow anybody access the file
Response
Success Response
Number of seconds after which the file will be automatically removed. This is currently a best effort expiration as it will be deleted only upon the next restart after expiration date.
Reflects whether the file has public-read ACL at storage provider. True by default
A share token to append as a ?token query parameter to grant read access with given url
Organization slug set at creation time
Was this page helpful?