On this page
Files API
Generated Golden API operations for Files.
Golden 3.0.0 public API reference. Parameters, responses, and schemas for supported customer operations.
5 operations.
GET /api/files
Retrieves all available files.
Operation ID: getFiles
Locates all files and returns. Requires the ADMIN role.
Security: bearerAuth
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
sorting | query | false | string | Sorting criteria. Sorted by name by default enum: [“NAME”, “SIZE”, “CREATED”]; default: “NAME” |
direction | query | false | string | Sorting direction. Ascending by default enum: [“ASC”, “DESC”]; default: “ASC” |
pageNumber | query | false | integer (int32) | Page number. Page 0 by default. default: 0; minimum: 0 |
pageSize | query | false | integer (int32) | Page size, at most 1000. A larger value is a 400, not a clamped page. default: 10; maximum: 1000; exclusiveMinimum: 0 |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful operation | application/json: FileListResponseDto |
400 | Invalid parameters | application/json: BaseResponseDto |
401 | Authentication required | application/json: BaseResponseDto |
403 | Not authorized | application/json: BaseResponseDto |
404 | Resource not found | application/json: BaseResponseDto |
409 | Object is not in the correct state | application/json: BaseResponseDto |
POST /api/files
Uploads a new file.
Operation ID: uploadFile
Receives a stream of binary data and creates a new file with provided metadata. Requires the ADMIN role.
Security: bearerAuth
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
name | query | true | string | File name. Name is important because it determines if the file is compressed (.gz extension) and the mime type (eg. csv or json extension) minLength: 1 |
description | query | false | string | File description |
Request body
| Media type | Required | Schema |
|---|---|---|
multipart/form-data | true | object |
Fields for multipart/form-data:
| Property | Type | Required | Description |
|---|---|---|---|
file | string (binary) | true | Multipart file to be uploaded |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful operation | application/json: FileResponseDto |
400 | Invalid parameters | application/json: BaseResponseDto |
401 | Authentication required | application/json: BaseResponseDto |
403 | Not authorized | application/json: BaseResponseDto |
404 | Resource not found | application/json: BaseResponseDto |
409 | Object is not in the correct state | application/json: BaseResponseDto |
GET /api/files/download/{file}
Retrieves a file by identifier.
Operation ID: downloadFile
Locates a file by identifier and returns the binary content. Requires the ADMIN role.
Security: bearerAuth
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
file | path | true | string | File identifier minLength: 1 |
Responses
| Status | Description | Body |
|---|---|---|
400 | Invalid parameters | application/json: BaseResponseDto |
401 | Authentication required | application/json: BaseResponseDto |
403 | Not authorized | application/json: BaseResponseDto |
404 | Resource not found | application/json: BaseResponseDto |
409 | Object is not in the correct state | application/json: BaseResponseDto |
GET /api/files/{file}
Retrieves one file.
Operation ID: getFile
Locates one file by identifier and returns. Requires the ADMIN role.
Security: bearerAuth
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
file | path | true | string | File identifier minLength: 1 |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful operation | application/json: FileResponseDto |
400 | Invalid parameters | application/json: BaseResponseDto |
401 | Authentication required | application/json: BaseResponseDto |
403 | Not authorized | application/json: BaseResponseDto |
404 | Resource not found | application/json: BaseResponseDto |
409 | Object is not in the correct state | application/json: BaseResponseDto |
DELETE /api/files/{file}
Deletes a file.
Operation ID: deleteFile
Locates a file and deletes it. Requires the ADMIN role.
Security: bearerAuth
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
file | path | true | string | File identifier to be deleted minLength: 1 |
Responses
| Status | Description | Body |
|---|---|---|
200 | Successful operation | application/json: FileResponseDto |
400 | Invalid parameters | application/json: BaseResponseDto |
401 | Authentication required | application/json: BaseResponseDto |
403 | Not authorized | application/json: BaseResponseDto |
404 | Resource not found | application/json: BaseResponseDto |
409 | Object is not in the correct state | application/json: BaseResponseDto |