Skip to main content
POST
/
api
/
files
Upload File Url2
curl --request POST \
  --url https://aiapi.{client}.nx1cloud.com/api/files \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source_url": "<string>",
  "name": "<string>"
}
'
{
  "owner_id": "<string>",
  "name": "<string>",
  "size": 123,
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "bucket_name": "<string>",
  "source_url": "<string>",
  "s3_url": "<string>",
  "access_count": 0,
  "created_at": "2023-11-07T05:31:56Z",
  "accessed_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
source_url
string | null
required

Source URL from which the file will be uploaded.

name
string | null

Name of the uploaded file.

Response

File uploaded successfully.

owner_id
string
required

The logged in user's email ID.

name
string
required

Name of the uploaded file.

size
integer
required

Size of the file in bytes.

id
string<uuid> | null

Unique ID for the file.

bucket_name
string | null

Name of the S3 bucket where the file is stored.

source_url
string | null

URL from which the file was originally uploaded.

s3_url
string | null

S3 URL of the uploaded file.

access_count
integer
default:0

Number of times the file has been accessed.

created_at
string<date-time>

Timestamp when the file was created.

accessed_at
string<date-time> | null

Timestamp when the file was last accessed.