Querying the Log Collection Path
Function
This API is used to query the log collection path of a specified ICAgent. This API applies only to the query of log collection paths on the Log > Path Configuration page of the Application Operations Management (AOM) console.
URI
GET /v2/{project_id}/log-paths
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain a project ID, see Obtaining the Account Tenant ID, Log Group ID, and Log Stream ID. Minimum: 32 Maximum: 32 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
No |
String |
The ICAgent of which the log collection paths you want to query. When querying the paths of multiple ICAgents, separate the ICAgent IDs with commas (,). Default value: Obtain the log collection paths of all ICAgents. Minimum length: 0 characters. Maximum length: 35,999 characters. Minimum: 0 Maximum: 35999 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token obtained from IAM. Default value: None. Minimum length: 1000 characters. Maximum length: 2000 characters. Minimum: 1000 Maximum: 2000 |
Content-Type |
Yes |
String |
Set this parameter to application/json;charset=utf8. Default value: None. Minimum length: 29 characters. Maximum length: 29 characters. Minimum: 29 Maximum: 29 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Status code. |
errorMessage |
String |
Description of the response for calling the API. |
result |
Array of AgentConfInfo objects |
ICAgent collection path information array. |
Parameter |
Type |
Description |
---|---|---|
agent_id |
String |
The unique ID of ICAgent. Minimum length: 36 characters. Maximum length: 36 characters. Minimum: 36 Maximum: 36 |
log_paths |
Array of strings |
List of log collection paths. Minimum length: 0 characters. Maximum length: 20 characters. Minimum: 0 Maximum: 20 |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Status code. |
errorMessage |
String |
Description of the response for calling the API. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Status code. |
errorMessage |
String |
Description of the response for calling the API. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Status code. |
errorMessage |
String |
Description of the response for calling the API. |
Status code: 503
Parameter |
Type |
Description |
---|---|---|
errorCode |
String |
Status code. |
errorMessage |
String |
Description of the response for calling the API. |
Example Requests
GET https://{endpoint}/v2/${project_id}/log-paths?id=86072d0f-1580-4bbe-a467-66cf61767f80,79e86731- b22b-4207-ae1b-8de882ea3711
Example Responses
Status code: 200
The request is successful. Log collection paths obtained.
{ "errorCode": "SVCSTG.ALS.200.200", "errorMessage": "Query agent info success." "result": [ { "agent_id": "c44fd66b-4bf5-4424-8c13-a2bfc927f51c", "log_paths": [ "/log/trace.log" ] }, { "agent_id": "c44fd66b-4bf5-4424-8c13-a2bfc927f51d", "log_paths": [ "/log/trace.log" ] } ] }
Status code: 401
The authentication information is incorrect or invalid.
{ "errorCode" : "SVCSTG.ALS.403.105", "errorMessage" : "Project id is invalid." }
Status Codes
Status Code |
Description |
---|---|
200 |
The request is successful. Log collection paths obtained. |
400 |
BadRequest. Invalid request. Modify the request based on the description in error_msg before a retry. |
401 |
The authentication information is incorrect or invalid. |
500 |
Internal server error. |
503 |
ServiceUnavailable. The requested service is unavailable. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot