Use this API to manage secure files for a project.

List all secure files for a project

GET /api/v4/projects/{id}/secure_files

Lists all secure files for a specified project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project owned by the authenticated user
page
Query
IntegerCurrent page number
Default: 1
Example: 1
per_page
Query
IntegerNumber of items per page
Default: 20
Example: 20

Responses

CodeDescriptionSchema
200OKAPIEntitiesCiSecureFile
400Bad Request—
404Not Found—

Create a secure file

POST /api/v4/projects/{id}/secure_files

Creates a secure file in a specified project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project owned by the authenticated user

Request body (multipart/form-data)

PropertyTypeDescription
file
Required
String (binary)The secure file being uploaded
name
Required
StringThe name of the file being uploaded. The filename must be unique within the project

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesCiSecureFile
400400 Bad Request—
404Not Found—

Retrieve details of a secure file

GET /api/v4/projects/{id}/secure_files/{secure_file_id}

Retrieves details of a specified secure file in a project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project owned by the authenticated user
secure_file_id
Path, required
IntegerThe ID of a secure file

Responses

CodeDescriptionSchema
200OKAPIEntitiesCiSecureFile
400Bad Request—
404404 Not found—

Delete a secure file

DELETE /api/v4/projects/{id}/secure_files/{secure_file_id}

Deletes a specified secure file from a project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project owned by the authenticated user
secure_file_id
Path, required
IntegerThe ID of a secure file

Responses

CodeDescriptionSchema
204Resource deleted—
400Bad Request—
404404 Not found—

Download a secure file

GET /api/v4/projects/{id}/secure_files/{secure_file_id}/download

Downloads the contents of a specified secure file in a project.

Parameters

NameTypeDescription
id
Path, required
String or integerThe ID or URL-encoded path of the project owned by the authenticated user
secure_file_id
Path, required
IntegerThe ID of a secure file

Responses

CodeDescriptionSchema
200OKString (binary) (application/octet-stream)
400Bad Request—
404404 Not found—

Schemas

Objects returned by the operations above and objects nested in their request bodies.

APIEntitiesCiSecureFile

PropertyTypeDescription
checksumStringExample: 16630b189ab34b2e3504f4758e1054d2e478deda510b2b08cc0ef38d12e80aac
checksum_algorithmStringExample: sha256
created_atString (date-time)Example: 2022-02-22T22:22:22.222Z
expires_atString (date-time)Example: 2023-09-21T14:55:59.000Z
file_extensionStringExample: jks
idInteger (int64)Example: 123
metadataObjectExample: {"id":"75949910542696343243264405377658443914"}
nameStringExample: upload-keystore.jks