Capture Agent Logs
Logs
Use the Logs endpoints to generate and retrieve Agent log files. Cloud Agent log files are stored and returned by Solution. On-Premise Agent logs are all stored in a single log file. If you request a log file for an On-Premise Agent, the entire log file is returned, not just the portion for the selected Solution. Refer to Agents for endpoints that return only On-Premise Agent logs.
Endpoints— Use the links in the Endpoints section below to access the TIBCO Scribe® Swagger page and try out the API against your Organization.
Fields For Logs Endpoints — Review the field definition table below the list of Endpoints for detailed field level information.
Considerations
In some cases there are special considerations or use cases for specific endpoints that you should know about before you use the endpoint.
POST /v1/orgs/{orgId}/agents/{agentId}/logs
- This call sends a request to the On-Premise Agent to zip the log files and send them to the cloud for the specified On-Premise Agent and returns a Log ID in the response. Use the Log ID with the GET /v1/orgs/{orgId}/agents/{agentId}/logs/{logId} call. The call builds a Request URL that can be used in a browser to initiate the download of the log file.
Depending on the size and number of log files, it may take a few minutes to build the zip file. Therefore you may want to build in a delay between the two calls.
If you are using the TIBCO Scribe® API Swagger page, using the GET /v1/orgs/{orgId}/agents/{agentId}/logs/{logId} call returns a binary file. To retrieve the ZIP file you need to build the Request URL manually and paste it into your browser.
To build the Request URL, use the POST logs call in Swagger. Copy the Request URL generated by that call and append a slash (/) and the value of the logId provided in the Response Body.
Example: https://sbapi.scribesoft.com:443/v1/orgs/1185/agents/8b79cc6a-41f9-42c1-b9e2-58f55ef6a857/logs/d6aecb83-4939-47f5-833e-5a10701a9a13
Where the:
- Response URL is https://sbapi.scribesoft.com:443/v1/orgs/1185/agents/8b79cc6a-41f9-42c1-b9e2-58f55ef6a857/logs
- logId is d6aecb83-4939-47f5-833e-5a10701a9a13.
Paste the URL in your browser and, depending on your browser settings, you are prompted to download the ZIP file or it downloads automatically.
GET /v1/orgs/{orgId}/agents/{agentId}/logs/{logId}
- Use the Log Id returned by the POST /v1/orgs/{orgId}/agents/{agentId}/logs call to request a specific set of On-Premise Agent log files. The request returns a zip file containing the logs. If the message "The Agent Logs are not available." is returned, retry later using the same Log ID.
Once the Log file has been retrieved the Log ID cannot be reused. To retrieve Agent logs a second time, use the POST logs call again to generate a new request and Log ID.
The IP address used for the GET logId call must match the IP address used for the POST logs call.
Popup or Ad Blockers may prevent the zip file from being downloaded depending on the browser's settings.
POST /v1/orgs/{orgId}/solutions/{solutionId}/logs
- This call sends a request to the Agent to zip the log files and send them to the cloud for the specified Solution and returns a Log ID in the response. Use the Log ID with the GET /v1/orgs/{orgId}/solutions/{solutionId}/logs/{logId} call. The call builds a Request URL that can be used in a browser to initiate the download of the log file.
Depending on the size of the log file, it may take a few minutes to build the zip file. Therefore you may want to build in a delay between the two calls.
If you are using the TIBCO Scribe® API Swagger page, using the GET /v1/orgs/{orgId}/solutions/{solutionId}/logs/{logId} call returns a binary file. To retrieve the ZIP file you need to build the Request URL manually and paste it into your browser.
To build the Request URL, use the POST logs call in Swagger. Copy the Request URL generated by that call and append a slash (/) and the value of the logId provided in the Response Body.
Example: https://sbapi.scribesoft.com:443/v1/orgs/1185/solutions/dc74cce1-4e37-4a58-864f-2df6f301affa/logs/d6aecb83-4939-47f5-833e-5a10701a9a13
Where the:
- Response URL is https://sbapi.scribesoft.com:443/v1/orgs/1185/solutions/dc74cce1-4e37-4a58-864f-2df6f301affa/logs
- logId is d6aecb83-4939-47f5-833e-5a10701a9a13.
Paste the URL in your browser and, depending on your browser settings, you are prompted to download the ZIP file or it downloads automatically to your default downloads location.
GET /v1/orgs/{orgId}/solutions/{solutionId}/logs/{logId}
- Use the Log Id returned by the POST /v1/orgs/{orgId}/solutions/{solutionId}/logs call to request an Agent log file for a specific Solution. The request returns a zip file containing the logs. If the message "The Agent Logs are not available." is returned, retry later using the same Log ID.
Once the Log file has been retrieved the Log ID cannot be reused. To retrieve an Agent log a second time, use the POST logs call again to generate a new request and Log ID.
For the On-Premise Agent information for all Solutions associated with that Agent is included in the log file.
The IP address used for the GET logId call must match the IP address used for the POST logs call.
Popup or Ad Blockers may prevent the zip file from being downloaded depending on the browser's settings.
Endpoints
Return Agent Logs
Capture Agent Logs by Solution
Return Agent Logs by Solution
Fields For Logs Endpoints
The list of fields defined in this table is comprehensive across all Logs endpoints. See Endpoints for a list of Logs endpoints with links to the associated Swagger page.
Name |
Description |
Endpoints |
---|---|---|
Parameters |
||
agentId query string |
ID of the Agent. Required |
|
orgId query integer |
Unique ID for each Organization. Required |
All |
logId response string |
The logId from a given request can only be used once to retrieve a zip file of Agent logs. To retrieve the Agent logs again, use the POST logs call to generate another request and new logId. |
|
solutionId path string |
GUID/UUID of the Solution. Required |
|
Response |
||
logId response string |
ID of the On-Premise Agent log file returned by the POST /v1/orgs/{orgId}/agents/{agentId}/logs call. Use the GET /v1/orgs/{orgId}/agents/{agentId}/logs/{logId} call to retrieve the On-Premise Agent log file. ID of the Agent log file returned by the POST /v1/orgs/{orgId}/solutions/{solutionId}/logs call. Use the GET /v1/orgs/{orgId}/solutions/{solutionId}/logs/{logId} call to retrieve the log file. |
|
See