PUT /API/DIAGNOSTICFILE/{DIAGNOSTICJOBID}
Attach a diagnostic file to a diagnostic job initiated by the cloud service.
After a call /api/ping optional diagnostic request(s) can be returned. The provided {diagnosticjobid} is used with this function.
Once the last binary chunk is complete, the whole file will be stored.
EXAMPLE REQUEST
Example;- PUT https://api.calln.com/api/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>
{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 |
---|---|
400 | Content-Type header is not present Content-Type header only currently valid value is ‘application/octet-stream’ Content-Range header is not present Content-Range header should start with ‘chunk’ Content-Range header should be in the format ‘chunk {chunkNumber}/{totalChunks}’ Content-Range header should be in the format ‘chunk {chunkNumber}/{totalChunks}’ Invalid Content-Range header value for {chunkNumber} Content-Range header value for {chunkNumber} must be 1 or more Content-Range header value for {totalChunks} was already previously set to |
401 | Unauthorized |
404 | Diagnostics job id not found |
406 | SSL must be used |
500 | Server Error |
EXAMPLE REQUEST
Example;- PUT https://api.calln.com/api/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: {'status':'complete'}
USING CURL
curl "https://api.calln.com/api/diagnosticfile/{diagnosticjobid}" -H "Authorization: Basic username:password | base64" -X PUT -d 'status':'complete'