PUT /API/V2/DIAGNOSTICFILE/{DIAGNOSTICJOBID}
Attach a diagnostic file to a diagnostic job initiated by the cloud service.
After a call GET /api/recordingnodetask optional diagnostic request(s) can be returned. The provided {diagnosticjobid} is used with this function to upload an attachment.
Once the last binary chunk is complete, the whole temporary attachment will be stored.
REQUEST FORMAT
PUT
https://api.calln.com/api/v2/diagnosticfile/{diagnosticjobid}
Headers:
Content-Disposition: filename="{filename}"
Content-Encoding: gzip
Content-Type: application/octet-stream
Content-Length: {body length in bytes}
Content-Range: chunk {chunkNumber}/{totalChunks}
Body:
<Binary data>
{filename} the filename of the attachment.
{chunkNumber} is the chunk that is being uploaded.
{totalChunks} is the total amount of chunks. If unknown, it can be set to ‘*’ until the last chunk.
RESULT CODE
| 200 | OK – All of the binary chunk(s) uploaded successfully and the attachment is now stored |
|---|---|
| 206 | Partial Content – More binary chunks are needed to complete upload |
| 400 | Content-Type header is not present |
| 401 | Unauthorized |
| 404 | Diagnostics job id not found |
| 406 | SSL must be used |
| 500 | Server Error |
EXAMPLE REQUEST
PUT https://api.calln.com/api/v2/diagnosticfile/93ee1996c26a407cb5390b42cf0de1dc Headers: Content-Disposition: filename="trace1.pcap" Content-Encoding: gzip Content-Type: application/octet-stream Content-Length: 35784 Content-Range: chunk 15/15 Body: <Binary data> Result;- 200 (OK) Body: <empty>
USING CURL
curl "https://api.calln.com/api/v2/diagnosticfile/{diagnosticjobid}" -H "Authorization: Basic username:password | base64" -X PUT -d 'status':'complete'

