For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create File

Create a new file record with the details you specify. The response contains the status of the file upload request and the fileId.

Give the file a unique title, name, and path. Generate a timestamp and reuse it across all three so that each run is unique.

post
Autorizações
AuthorizationstringObrigatório

Send Bearer {token}, where {token} is the access_token returned by Request a token.

Corpo
titlestring · mín: 1 · máx: 32Obrigatório

A unique title for the file. Enter 1 to 32 characters with no blank spaces.

namestring · mín: 1 · máx: 128Obrigatório

A single-line filename of 1 to 128 characters. Newline characters are not permitted. The name can include a shortened version of the title.

fileTypeIdstringObrigatório

The ID of the file type. Set this to 1 for CSV files.

Example: 1
fileDatestringObrigatório

The date and time you created the file.

portfolioIdstringObrigatório

The ID of the portfolio the file is created in.

permissionIdnumber · enumObrigatório

An extra layer of protection for the file. A user needs this permission to access the file. Set this to either 4345 or 4596.

Valores possíveis:
Respostas
200

Returns the status of the file upload request and the fileId.

Sem conteúdo

post/api/v2/file
POST /api/v2/file HTTP/1.1
Host: files.api.example.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 383

{
  "title": "Bulk-{{timestamp}}",
  "name": "bulk-{{timestamp}}.csv",
  "fileConfigurationData": {
    "fileStore": "anynetiot-sftp-service-storage-{{env}}",
    "filePath": "PORTFOLIO/{{portfolioId}}/in/Job/{{timestamp.substr(0,4)}}/{{timestamp.substr(5,2)}}/{{timestamp.substr(8,2)}}/job-{{timestamp}}.csv"
  },
  "fileTypeId": "1",
  "fileDate": "{{timestamp}}",
  "portfolioId": "{{portfolioId}}",
  "permissionId": 4596
}
200

Returns the status of the file upload request and the fileId.

Sem conteúdo

Atualizado

Isto foi útil?