Generate a support bundle using the SPS REST API.
Previously, generating a support bundle for SPS was possible only from the SPS Web Interface, at Basic Settings > Troubleshooting > Create support bundle. Using the /support-bundle endpoint, administrators can start support bundle generation jobs and download a snapshot of the current state of the specified SPS appliance. To troubleshoot multiple SPS appliances, you must generate the support bundle for each appliance.
NOTE: A support bundle is automatically deleted after 24 hours. If the issue with your SPS appliance persists, you must download a new support bundle.
URL
https://<IP-address-of-SPS>/api/troubleshooting/support-bundle |
Cookies
| Cookie name | Description | Required | Values |
|---|---|---|---|
| session_id | Contains the authentication token of the user | Required |
The value of the session ID cookie received from the REST server in the authentication response, for example, a1f71d030e657634730b9e887cb59a5e56162860. For more information on authentication, see Authenticate to the SPS REST API. NOTE: This session ID refers to the connection between the REST client and the SPS REST API. It is not related to the sessions that SPS records (and which also have a session ID, but in a different format). |
HTTP operations
HTTP operations with the /support-bundle endpoint include:
|
HTTP method |
URL |
Description |
Notes |
|---|---|---|---|
|
POST |
/api/troubleshooting/support-bundle |
Start generating a SPS support bundle |
|
|
POST |
Start a SPS support bundle generation job while an another job is in progress |
||
|
GET |
Retrieve the status of all generated SPS support bundles |
||
|
GET |
/api/troubleshooting/support-bundle/<the-key-of-the-generated-support-bundle-job> |
Retrieve the status of a single generated SPS support bundle |
|
|
GET |
/api/troubleshooting/support-bundle/<the-key-of-the-generated-support-bundle-job>/download |
Download a SPS support bundle |
|
|
DELETE |
/api/troubleshooting/support-bundle/<the-key-of-the-generated-support-bundle-job> |
Remove a SPS support bundle |
You can cancel a SPS support bundle generation job while it is in progress. |
Sample request
The following command starts the generation of a SPS support bundle.
curl -X POST -b "${COOKIE_PATH}" https://<IP-address-of-SPS>/api/troubleshooting/support-bundle |
Sample response
The following is a sample response received if the request was successful.
{ |
"items": [ |
{ |
"body": { |
"error": null, |
"file_name": null, |
"info": null, |
"start_time": null, |
"status": "queued" |
}, |
"key": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", |
"meta": { |
"href": "/api/troubleshooting/support-bundle/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", |
"parent": "/api/troubleshooting" |
} |
} |
], |
"meta": { |
"href": "/api/troubleshooting/support-bundle", |
"parent": "/api/troubleshooting" |
} |
} |
Elements of the response message body include:
|
Type |
Description |
Notes | |
|---|---|---|---|
|
error |
string | null |
Describes the nature of the error during SPS support bundle job generation. |
For example, "Timeout expired while waiting for creation of support-bundle." |
|
info |
string | null |
||
|
file_name |
string | null |
The name of the SPS support bundle file. |
|
|
start_time |
string (date-time) |
The starting point of the SPS support bundle generation job. |
YYYY-MM-DDThh:mm:ss+hh:mm is used as the date-time format. For example, 2022-03-30T12:00:01+00:00. |
|
status |
enum |
The status of the SPS support bundle generation jobs. |
Possible values:
|
|
key |
string |
The unique key generated by SPS to identify the support bundle job. |
For more information on the meta object, see Message format.
Sample request
The following command retrieves the status of all generated SPS support bundles.
curl -X GET -b "${COOKIE_PATH}" https://<IP-address-of-SPS>/api/troubleshooting/support-bundle |
Sample response
The following is a sample response received if the request was successful.
{ |
"items": [ |
{ |
"body" : { |
"error": null, |
"info" : null, |
"file_name" : null, |
"start_time": "2022-03-30T12:00:01+00:00", |
"status" : "in-progress" |
}, |
"key": "22222222-2222-2222-2222-222222222222", |
"meta": { |
"href": "/api/troubleshooting/support-bundle/22222222-2222-2222-2222-222222222222", |
"parent": "/api/troubleshooting" |
} |
}, |
{ |
"body" : { |
"error": "Timeout expired while waiting for creation of support-bundle.", |
"info" : null, |
"file_name" : null, |
"start_time": "2022-03-30T12:00:01+00:00", |
"status": "failed" |
}, |
"key" : "33333333-3333-3333-3333-333333333333", |
"meta" : { |
"href" : "/api/troubleshooting/support-bundle/33333333-3333-3333-3333-333333333333", |
"parent": "/api/troubleshooting" |
} |
}, |
{ |
"body" : { |
"error": null, |
"info" : null, |
"file_name" : "44444444-4444-4444-4444-444444444444-debug_info.zip", |
"start_time": "2022-03-30T12:00:01+00:00", |
"status": "finished" |
}, |
"key" : "44444444-4444-4444-4444-444444444444", |
"meta" : { |
"href" : "/api/troubleshooting/support-bundle/44444444-4444-4444-4444-444444444444", |
"parent": "/api/troubleshooting" |
} |
}, |
{ |
"body" : { |
"error": null, |
"info" : null, |
"file_name" : null, |
"start_time": null, |
"status": "queued" |
}, |
"key" : "11111111-1111-1111-1111-111111111111", |
"meta" : { |
"href" : "/api/troubleshooting/support-bundle/11111111-1111-1111-1111-111111111111", |
"parent": "/api/troubleshooting" |
} |
} |
], |
"meta": { |
"href": "/api/troubleshooting/support-bundle", |
"parent": "/api/troubleshooting" |
} |
} |
For parameter descriptions, see Element.
Sample request
The following command attempts to download a SPS support bundle from a failed generation job.
curl -X GET -b "${COOKIE_PATH}" https://<IP-address-of-SPS>/api/troubleshooting/support-bundle/<the-key-of-the-generated-support-bundle-job>/download |
Sample response
The following is a sample response received if the request was successful.
{ |
"error": { |
"details": { |
"mount_point": "/troubleshooting/support-bundle", |
"resource": "44444444-4444-4444-4444-444444444444/download" |
}, |
"message": "Resource was not found", |
"type": "ResourceNotFound" |
}, |
"meta": { |
"href": "/api/troubleshooting/support-bundle/44444444-4444-4444-4444-444444444444/download", |
"parent": "/api/troubleshooting/support-bundle/44444444-4444-4444-4444-444444444444" |
} |
} |
Elements of the response message body include:
|
Element |
Type |
Description |
Notes |
|---|---|---|---|
|
details |
object |
||
|
details.mount_point |
string |
The reference URL of the endpoint at which the error has occurred. |
|
|
details_resource |
The reference URL of the resource which could not be downloaded. |
||
|
message |
string |
The content of the error message. |
|
|
type |
string |
The type of the error message. |
For more information on the meta object, see Message format.
Sample request
The following command removes the information on a finished SPS support bundle generation job.
curl -X DELETE -b "${COOKIE_PATH}" https://<IP-address-of-SPS>/api/troubleshooting/support-bundle/<the-key-of-the-generated-support-bundle-job> |
An example of the request message body:
{ |
"error": null, |
"info" : null, |
"file_name" : "22222222-2222-2222-2222-222222222222-debug_info.zip" |
} |
Sample response
The response status of the deletion is a standard HTTP 200 OK.
HTTP response codes
For more information and a list of standard HTTP response codes, see Application level error codes.