Troubleshoot

post

/v1/admin/log_diag/diagDumpOperations

This API helps user to create, download or delete diagnostics packages.

Request

There are no request parameters for this operation.

Back to Top

Response

200 Response

Result OK

401 Response

Unauthorized - Request lacks valid authentication credentials.

403 Response

This request requires the client credentials to have administrator privileges.

405 Response

Invalid request method
Back to Top

Examples

Example of Accessing the API with cURL

The following example shows how to create, download or delete diagnostics packages by submitting a POST request on the REST resource using cURL. If the request requires a timestamp, use the timestamp from the response of the /login API. For more information about cURL, see Use cURL.

curl -X POST \
    -b cookies.txt \
    -d@request.json \
    --header "Content-Type: application/json" \
    "https://$IPADDR/v1/admin/log_diag/diagDumpOperations"

The following shows an example of the contents of the request.json file sent as the request body.

{
  "diagnostics": {
    "operation":"create",
    "filename":"diagtest123.tar.gz"
    },
  "timestamp":<timestamp>
}

Example of the Response Headers

The following shows an example of the response headers.

HTTP/1.1 200 OK
Date: Thu, 10 Dec 2020 18:49:21 GMT
Server: Apache/2.4.6 () OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.40
X-UA-Compatible: IE=Edge,chrome=1
Content-Length: 39
Content-Type: application/json; charset=ISO-8859-1

Example of the Response Body

The following example shows the contents of the response body in JSON format.

{
  "status":"success",
  "data":"Successfully created Diagnostics File diagtest123.tar.gz"
}
Back to Top