Files

Upload file

post

Uploads a new file to the specified directory. Requires authentication.

Header parameters
Client-IDstringRequiredExample: id_UGacp3OrGbGt78bpwzmhkB42cfhTL0US2dPMTbVb1E
Client-SecretstringRequiredExample: sk_1e9KhX0ZReeT6Avugl8cA2rBvKdD2z05LB9VrA4q3hY
Body
filestring · binaryRequired
directory_idstringOptional

The ID of the directory to upload the file to. If not provided, the file will be uploaded to the root directory.

Example: 682aa5a96ef58914bf648be7
passphrasestringOptional

If provided, the file upload will be encrypted with this passphrase. Must be at least 8 characters long, include 1 uppercase letter, 1 number, and 1 special character (!@#$%^&*()_+). Encrypted files are limited to 50MB.

Example: Passphrase123!
Responses
201
File uploaded successfully. Returns the uploaded file details.
post
POST /api/clients/v1/files HTTP/1.1
Host: uat.koneksi.co.kr
Client-ID: text
Client-Secret: text
Content-Type: multipart/form-data
Accept: */*
Content-Length: 89

{
  "file": "binary",
  "directory_id": "682aa5a96ef58914bf648be7",
  "passphrase": "Passphrase123!"
}

No content

Download file

get

Downloads a file by its ID. Requires authentication. For encrypted files, use stream=false and provide the Passphrase header.

Path parameters
file_idstringRequired

The ID of the file to download.

Example: 682c304bbf71b6b7ac80dc97
Query parameters
streambooleanOptional

Set to false to download encrypted files. Defaults to true for streaming.

Example: false
Header parameters
Client-IDstringRequiredExample: id_UGacp3OrGbGt78bpwzmhkB42cfhTL0US2dPMTbVb1E
Client-SecretstringRequiredExample: sk_1e9KhX0ZReeT6Avugl8cA2rBvKdD2z05LB9VrA4q3hY
PassphrasestringOptional

Passphrase to decrypt the file if it was uploaded with encryption.

Example: Password123!
Responses
200
File downloaded successfully. Returns the downloaded file.
get
GET /api/clients/v1/files/{file_id}/download HTTP/1.1
Host: uat.koneksi.co.kr
Client-ID: text
Client-Secret: text
Accept: */*

No content

Read file

get

Retrieves details of a specific file by its ID. Requires authentication.

Path parameters
file_idstringRequired

The ID of the file to retrieve.

Example: 682c304bbf71b6b7ac80dc97
Query parameters
include_chunksbooleanOptional

Set to true to include the IPFS chunks in the response. Defaults to false if not provided.

Default: false
Header parameters
Client-IDstringRequiredExample: id_UGacp3OrGbGt78bpwzmhkB42cfhTL0US2dPMTbVb1E
Client-SecretstringRequiredExample: sk_1e9KhX0ZReeT6Avugl8cA2rBvKdD2z05LB9VrA4q3hY
Responses
200
File details retrieved successfully.
get
GET /api/clients/v1/files/{file_id} HTTP/1.1
Host: uat.koneksi.co.kr
Client-ID: text
Client-Secret: text
Accept: */*

No content

Update file

put

Updates the name or parent directory of a specified file. Requires authentication.

Path parameters
file_idstringRequired

The ID of the file to update.

Example: 682c304bbf71b6b7ac80dc97
Header parameters
Client-IDstringRequiredExample: id_UGacp3OrGbGt78bpwzmhkB42cfhTL0US2dPMTbVb1E
Client-SecretstringRequiredExample: sk_1e9KhX0ZReeT6Avugl8cA2rBvKdD2z05LB9VrA4q3hY
Body
directory_idstringOptional

The target directory ID to move this file to.

Example: 682c86bec39bd0d59b3d6567
namestringOptional

The new name for the file.

Example: Profile.jpg
Responses
200
File updated successfully. Returns the updated file details.
put
PUT /api/clients/v1/files/{file_id} HTTP/1.1
Host: uat.koneksi.co.kr
Client-ID: text
Client-Secret: text
Content-Type: application/json
Accept: */*
Content-Length: 64

{
  "directory_id": "682c86bec39bd0d59b3d6567",
  "name": "Profile.jpg"
}

No content

Delete file

delete

Deletes a file by its ID. Requires authentication.

Path parameters
file_idstringRequired

The ID of the file to delete.

Example: 682c304bbf71b6b7ac80dc97
Header parameters
Client-IDstringRequiredExample: id_UGacp3OrGbGt78bpwzmhkB42cfhTL0US2dPMTbVb1E
Client-SecretstringRequiredExample: sk_1e9KhX0ZReeT6Avugl8cA2rBvKdD2z05LB9VrA4q3hY
Responses
201
File deleted successfully. Returns a success message.
delete
DELETE /api/clients/v1/files/{file_id} HTTP/1.1
Host: uat.koneksi.co.kr
Client-ID: text
Client-Secret: text
Accept: */*

No content

Generate temporary token

post

Generates a temporary token with a specified duration for downloading a file. Requires a valid Bearer token for authentication.

Path parameters
file_idstringRequired

The ID of the file to generate a link for.

Example: 682c304bbf71b6b7ac80dc97
Header parameters
Client-IDstringRequiredExample: id_UGacp3OrGbGt78bpwzmhkB42cfhTL0US2dPMTbVb1E
Client-SecretstringRequiredExample: sk_1e9KhX0ZReeT6Avugl8cA2rBvKdD2z05LB9VrA4q3hY
Body
durationintegerRequired

Duration of the link validity in seconds.

Example: 3600
Responses
200
Successfully generated a temporary token.
post
POST /api/clients/v1/files/{file_id}/generate-link HTTP/1.1
Host: uat.koneksi.co.kr
Client-ID: text
Client-Secret: text
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "duration": 3600
}

No content

Share file

post

Shares a file with specified access settings. Requires authentication. Request body is optional unless access is 'password' (requires password) or 'email' (requires emails).

Path parameters
filestringRequired

The ID of the file to share.

Example: 6853e14d78e8cc3e4c66fb
Query parameters
accessstring · enumRequired

The access level for the shared file (public, private, password, email).

Example: passwordPossible values:
Header parameters
Client-IDstringRequiredExample: id_UGacp3OrGbGt78bpwzmhkB42cfhTL0US2dPMTbVb1E
Client-SecretstringRequiredExample: sk_1e9KhX0ZReeT6Avugl8cA2rBvKdD2z05LB9VrA4q3hY
Body
passwordstringOptional

Password required for 'password' access. Must be at least 8 characters long, include 1 uppercase letter, 1 number, and 1 special character (!@#$%^&*()_+). Required if access is 'password'.

Example: Password123!
emailsstring[]Optional

List of email addresses for 'email' access. Required if access is 'email'. The email must have an account in Koneksi.

Example: ["alex@ardata.tech","paulinquit@gmail.com"]
Responses
200
File shared successfully.
post
POST /api/clients/v1/files/{file}/share HTTP/1.1
Host: uat.koneksi.co.kr
Client-ID: text
Client-Secret: text
Content-Type: application/json
Accept: */*
Content-Length: 80

{
  "password": "Password123!",
  "emails": [
    "alex@ardata.tech",
    "paulinquit@gmail.com"
  ]
}

No content