DXP File Storage REST API (2024-10-15T07:30:05Z)

Download OpenAPI specification:Download

File

/api/v2/file/{fileId}

This endpoint will return file info for a specific file.

Authorizations:
DXPAuthDXPSession
path Parameters
fileId
required
string

Responses

Response samples

Content type
application/json
{
  • "download": "string",
  • "access": "private",
  • "size": 0,
  • "virusScan": "quarantined",
  • "source": "string",
  • "contentType": "string",
  • "fileId": "string",
  • "updatedAt": "string"
}

/api/v2/file/{fileId}

This endpoint will delete a file.

Authorizations:
DXPAuthDXPSession
path Parameters
fileId
required
string

Responses

Response samples

Content type
application/json
{
  • "pollingUrl": "string",
  • "requestId": "string"
}

/api/v2/file/{fileId}

This endpoint accepts file data, metadata, or both, to update an existing file.

Authorizations:
DXPAuthDXPSession
path Parameters
fileId
required
string
Request Body schema: application/json
required
access
string
Enum: "private" "public"

The access level of the file.

data
string

The base64 encoded data of the file.

uploadType
string
Default: "direct"
Enum: "direct" "resumable"
source
string

The source of the file or directory. This is the key within File Store. For example, /my_folder/my_file.txt or /my_folder/.

Responses

Request samples

Content type
application/json
{
  • "access": "private",
  • "data": "string",
  • "uploadType": "direct",
  • "source": "string"
}

Response samples

Content type
application/json
{
  • "download": "string",
  • "access": "private",
  • "size": 0,
  • "virusScan": "quarantined",
  • "source": "string",
  • "contentType": "string",
  • "fileId": "string",
  • "updatedAt": "string"
}

/api/v2/file/{fileId}/extract

This endpoint will extract the contents of a compressed file into a directory.

Authorizations:
DXPAuthDXPSession
path Parameters
fileId
required
string
Request Body schema: application/json
required
access
required
string
Enum: "private" "public"

The access level of the file.

target
required
string

The target directory to extract the files to. Note: the target directory must be empty.

Responses

Request samples

Content type
application/json
{
  • "access": "private",
  • "target": "string"
}

Response samples

Content type
application/json
{
  • "pollingUrl": "string",
  • "requestId": "string"
}

/api/v2/file/{fileId}/download

This endpoint will return the actual file as a download attachment.

Authorizations:
DXPAuthDXPSession
path Parameters
fileId
required
string

Responses

/api/v2/status/{requestId}

This endpoint will return the status of a request.

Authorizations:
DXPAuthDXPSession
path Parameters
requestId
required
string

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "requestId": "string",
  • "status": "PENDING"
}

/api/v2/file

This endpoint will return file info.

Authorizations:
DXPAuthDXPSession
query Parameters
source
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

/api/v2/file

This endpoint will create a file.

Authorizations:
DXPAuthDXPSession
Request Body schema: application/json
required
access
required
string
Enum: "private" "public"

The access level of the file.

data
required
string

The base64 encoded data of the file.

uploadType
string
Default: "direct"
Enum: "direct" "resumable"
source
required
string

The source of the file or directory. This is the key within File Store. For example, /my_folder/my_file.txt or /my_folder/.

Responses

Request samples

Content type
application/json
{
  • "access": "private",
  • "data": "string",
  • "uploadType": "direct",
  • "source": "string"
}

Response samples

Content type
application/json
{
  • "download": "string",
  • "access": "private",
  • "size": 0,
  • "virusScan": "quarantined",
  • "source": "string",
  • "contentType": "string",
  • "fileId": "string",
  • "updatedAt": "string"
}

Directory

/api/v2/directory

This method will return a list of directories.

Authorizations:
DXPAuthDXPSession
query Parameters
source
required
string

Responses

Response samples

Content type
application/json
[
  • {
    }
]

/api/v2/directory

This endpoint will create a directory.

Authorizations:
DXPAuthDXPSession
Request Body schema: application/json
required
access
string
Enum: "private" "public"

The access level of the file.

source
required
string

The source of the file or directory. This is the key within File Store. For example, /my_folder/my_file.txt or /my_folder/.

Responses

Request samples

Content type
application/json
{
  • "access": "private",
  • "source": "string"
}

Response samples

Content type
application/json
{
  • "access": "private",
  • "directories": [
    ],
  • "files": [
    ],
  • "directoryId": "string",
  • "source": "string",
  • "updatedAt": "string"
}

/api/v2/status/{requestId}

This endpoint will return the status of a request.

Authorizations:
DXPAuthDXPSession
path Parameters
requestId
required
string

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "requestId": "string",
  • "status": "PENDING"
}

/api/v2/directory/{directoryId}

This endpoint will return a directory, with direct descendants.

Authorizations:
DXPAuthDXPSession
path Parameters
directoryId
required
string

Responses

Response samples

Content type
application/json
{
  • "access": "private",
  • "directories": [
    ],
  • "files": [
    ],
  • "directoryId": "string",
  • "source": "string",
  • "updatedAt": "string"
}

/api/v2/directory/{directoryId}

This endpoint will remove a directory and its contents.

Authorizations:
DXPAuthDXPSession
path Parameters
directoryId
required
string

Responses

Response samples

Content type
application/json
{
  • "pollingUrl": "string",
  • "requestId": "string"
}

/api/v2/directory/{directoryId}

This method will accept info for a directory and update an existing directory.

Authorizations:
DXPAuthDXPSession
path Parameters
directoryId
required
string
Request Body schema: application/json
required
access
string
Enum: "private" "public"

The access level of the file.

cascadeAccess
boolean

If true, all files and directories within the directory will have their access level updated to the new access level.

source
string

The source of the file or directory. This is the key within File Store. For example, /my_folder/my_file.txt or /my_folder/.

Responses

Request samples

Content type
application/json
{
  • "access": "private",
  • "cascadeAccess": true,
  • "source": "string"
}

Response samples

Content type
application/json
{
  • "pollingUrl": "string",
  • "requestId": "string"
}

Status

/api/v2/status/{requestId}

This endpoint will return the status of a request.

Authorizations:
DXPAuthDXPSession
path Parameters
requestId
required
string

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "requestId": "string",
  • "status": "PENDING"
}