Get File
curl --request GET \
--url https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/files/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, 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": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}{
"error": "ObjectNotFound",
"message": "<string>"
}Prisme.ai Workspaces
Get File
Get a file metadata
GET
/
v2
/
workspaces
/
{workspaceId}
/
files
/
{id}
Get File
curl --request GET \
--url https://api.studio.prisme.ai/v2/workspaces/{workspaceId}/files/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
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}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, 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": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}{
"error": "ObjectNotFound",
"message": "<string>"
}Authorizations
BearerAuthOrgApiKeyAuthBearerAuth & OrgApiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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?