Reset Search
 

 

Article

6533 - How to troubleshoot errors returned by the REST API

« Go Back

Information

 
Last Modified Date12/9/2017 12:52 AM
Synopsis
This article provides the steps to troubleshoot errors returned by the REST API using the curl command.
Problem or Goal
Cause
Solution
When troubleshooting REST API use the curl command similar to below and follow the path from /api to the desired location:

From:

  • curl -k --basic -H "Content-Type: application/json" -H "Accept: application/json" -u admin:password https://10.34.74.70:9070/api/ 2> /dev/null | python -m json.tool
    {
        "children": [
            {
                "href": "/api/af/",
                "name": "af"
            },
            {
                "href": "/api/tm/",
                "name": "tm"
            }
        ]
    }

The next request should be /api/tm or /api/af gather all output as this will be requested from the Support team.

The last request should be the output of the specific location that is having an issue.

To:

  • curl -k --basic -H "Content-Type: application/json" -H "Accept: application/json" -u admin:password https://10.34.74.70:9070/api/tm/3.0/status/local_tm/statistics/nodes/node/10.34.74.90:80 2> /dev/null | python -m json.tool
    {
        "statistics": {
            "bytes_from_node_hi": 19525,
            "bytes_from_node_lo": 19525,
            "bytes_to_node_hi": 1913,
            "bytes_to_node_lo": 1913,
            "current_conn": 0,
            "current_requests": 0,
            "errors": 0,
            "failures": 0,
            "new_conn": 8,
            "pooled_conn": 1,
            "port": 80,
            "response_max": 0,
            "response_mean": 0,
            "response_min": 0,
            "state": "alive",
            "total_conn": 9
        }

The output from beginning to the end will validate the request and why the error might have occurred.

Related Links
Attachment 1 
Created ByCode Deployment

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255