Content

APIs to manage files

List content

Get all files in a tenant

SecurityapiKey
Request
path Parameters
enterprise_id
required
string

A UUID string identifying this enterprise.

query Parameters
search
string

Seach by tags, description

limit
integer
Default: 20

Number of results to return per page.

offset
integer
Default: 0

The initial index from which to return the results.

Responses
200

successful operation

401

Authorization information is missing or invalid.

500

Internal server error

get/v0/enterprise/{enterprise_id}/content/
Request samples
Response samples
application/json
{
  • "count": 0,
  • "next": "string",
  • "previous": "string",
  • "results": [
    ]
}

Get content information

Get information about a file

SecurityapiKey
Request
path Parameters
content_id
required
string <uuid>

A UUID string identifying a content instance.

enterprise_id
required
string

A UUID string identifying enterprise.

Responses
200

successful operation

401

Authorization information is missing or invalid.

404

Not Found.

500

Internal server error

get/v0/enterprise/{enterprise_id}/content/{content_id}/
Request samples
Response samples
application/json
{
  • "id": 0,
  • "download_url": "string",
  • "name": "string",
  • "key": "string",
  • "is_dir": false,
  • "kind": "string",
  • "hash": "string",
  • "size": "string",
  • "path": "string",
  • "permissions": "string",
  • "tags": [
    ],
  • "description": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "modified": "2019-08-24T14:15:22Z",
  • "enterprise": "string",
  • "owner": {
    }
}

Delete Content

Delete content.

SecurityapiKey
Request
path Parameters
content_id
required
string <uuid>

A UUID string identifying a content instance.

enterprise_id
required
string

A UUID string identifying enterprise.

Responses
204

The resource was deleted successfully.

401

Authorization information is missing or invalid.

403

Forbidden, no permission to perform this action.

404

Not Found.

500

Internal server error

delete/v0/enterprise/{enterprise_id}/content/{content_id}/
Request samples
Response samples
application/json
{
  • "errors": [
    ],
  • "message": "string",
  • "status": 0
}

Patch a content instance

SecurityapiKey
Request
path Parameters
content_id
required
string <uuid>

A UUID string identifying a content instance.

enterprise_id
required
string

A UUID string identifying enterprise.

Request Body schema: */*
optional
tags
Array of strings (Tags)

Tags for the content

description
string (Description)

Description of the content

Responses
200

successful operation

400

Bad request

401

Authorization information is missing or invalid.

403

Forbidden, no permission to perform this action.

404

Not Found.

415

Unsupported media type.

500

Internal server error

patch/v0/enterprise/{enterprise_id}/content/{content_id}/
Request samples
Response samples
application/json
{
  • "id": 0,
  • "download_url": "string",
  • "name": "string",
  • "key": "string",
  • "is_dir": false,
  • "kind": "string",
  • "hash": "string",
  • "size": "string",
  • "path": "string",
  • "permissions": "string",
  • "tags": [
    ],
  • "description": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "modified": "2019-08-24T14:15:22Z",
  • "enterprise": "string",
  • "owner": {
    }
}

Upload new content

Uploaded content to Esper

SecurityapiKey
Request
path Parameters
enterprise_id
required
string

A UUID string identifying this enterprise.

Request Body schema: multipart/form-data
required
key
required
string <binary>

Valid file to upload

Responses
200

Successful Operation

400

Bad request

401

Authorization information is missing or invalid.

403

Forbidden, no permission to perform this action.

415

Unsupported media type.

500

Internal server error

post/v0/enterprise/{enterprise_id}/content/upload/
Request samples
Response samples
application/json
{
  • "id": 0,
  • "download_url": "string",
  • "name": "string",
  • "key": "string",
  • "is_dir": false,
  • "kind": "string",
  • "hash": "string",
  • "size": "string",
  • "path": "string",
  • "permissions": "string",
  • "tags": [
    ],
  • "description": "string",
  • "created": "2019-08-24T14:15:22Z",
  • "modified": "2019-08-24T14:15:22Z",
  • "enterprise": "string",
  • "owner": {
    }
}

Upload file to Remote File Manager

Upload file through SCAPI server to REMOTE_FILE_MANAGER bucket. Files are automatically deleted after 1 day.

SecurityapiKey
Request
path Parameters
enterprise_id
required
string

A UUID string identifying this enterprise.

Request Body schema: multipart/form-data
required
file
required
string <binary>

The file to upload (max 50MB)

filename
string

Custom filename (optional, defaults to uploaded file name)

content_type
string

MIME type of the file (optional, auto-detected)

Responses
201

File uploaded successfully

400

Bad request

401

Authorization information is missing or invalid.

403

Forbidden, no permission to perform this action.

413

File too large (max 50MB)

500

Internal server error

post/v0/enterprise/{enterprise_id}/content/remote-file/
Request samples
Response samples
application/json
{}

Generate download URL for existing file

Generate a pre-signed download URL for an existing file in REMOTE_FILE_MANAGER bucket

SecurityapiKey
Request
path Parameters
enterprise_id
required
string

A UUID string identifying this enterprise.

Request Body schema: application/json
required
file_key
required
string

The storage key of the file to download

expires_in
integer [ 60 .. 86400 ]
Default: 3600

URL expiration time in seconds (optional, default 3600)

Responses
200

Download URL generated successfully

400

Bad request

401

Authorization information is missing or invalid.

403

Forbidden, no permission to perform this action.

500

Internal server error

post/v0/enterprise/{enterprise_id}/content/remote-file/generate_download_url/
Request samples
application/json
{
  • "file_key": "123/files/document_abc123.pdf",
  • "expires_in": 3600
}
Response samples
application/json
{}