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.
Send Bearer {token}, where {token} is the access_token returned by Request a token.
A unique title for the file. Enter 1 to 32 characters with no blank spaces.
A single-line filename of 1 to 128 characters. Newline characters are not permitted. The name can include a shortened version of the title.
The ID of the file type. Set this to 1 for CSV files.
1The date and time you created the file.
The ID of the portfolio the file is created in.
An extra layer of protection for the file. A user needs this permission to access the file. Set this to either 4345 or 4596.
Returns the status of the file upload request and the fileId.
Sem conteúdo
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
}Returns the status of the file upload request and the fileId.
Sem conteúdo
Atualizado
Isto foi útil?