what is the response structure for Get debug session transaction IDs ?

I create a debug session for one of my proxies in my org :

http ://management:8080/v1/organizations/<org>/environments/<env>/apis/<api name>/revisions/2/debugsessions/test/data

with session=test

timeout=300

Run 5 api proxy requests

then run

http ://management:8080/v1/o/ORG/e/ENV/apis/API/revisions/REVNUM/debugsessions/test/data

I get a [] response back.

Shouldn't it return transaction id's of the above 5 api proxy requests ?

Solved Solved
2 1 260
1 ACCEPTED SOLUTION

Hi @Venkataraghavan

I think you might want re-check the API docs on that debugsession object.

To create the debugsession, use something like this:

curl -X POST \
  -i -n \
  -H content-type:application/x-www-url-form-encoded \
  'https ://api.enterprise.apigee.com/v1/o/ORG/e/ENVIRONMENT/apis/APINAME/revisions/REVISION_NUMBER/debugsessions?session=dino1234&timeout=300'

Then you can list the currently-active debug sessions like this:

curl -X GET \
  -i -n \
  https ://api.enterprise.apigee.com/v1/o/ORG/e/ENVIRONMENT/apis/APINAME/revisions/REVISION_NUMBER/debugsessions

The result looks like this:

[ "dino1234" ]

You can retrieve transaction IDs in a named debug session like so:

curl -X GET \
  -i -n \
  https ://api.enterprise.apigee.com/v1/o/ORG/e/ENV/apis/APINAME/revisions/REVISION_NUMBER/debugsessions/SESSIONNAME/data

In this case SESSIONNAME would be replaced with dino1234. The list of transaction ids will look like so:

[ "8430e7c9-5f2f-4e28-8c69-33bdb5725c00__129", "8430e7c9-5f2f-4e28-8c69-33bdb5725c00__130", "8430e7c9-5f2f-4e28-8c69-33bdb5725c00__133", "8430e7c9-5f2f-4e28-8c69-33bdb5725c00__132", "e41bc4a3-e1a4-4f5c-9908-439f65c02f1c__115", "e41bc4a3-e1a4-4f5c-9908-439f65c02f1c__114", "e41bc4a3-e1a4-4f5c-9908-439f65c02f1c__112", "e41bc4a3-e1a4-4f5c-9908-439f65c02f1c__109" ]

And then retrieve transaction data from an ID like this:

curl -X GET \
  -i -n \
  https ://api.enterprise.apigee.com/v1/o/ORG/e/ENV/apis/APINAME/revisions/REVISION_NUMBER/debugsessions/SESSIONNAME/data/TRANSACTION_ID

And the resulting data is quite verbose, and looks something like this at the start:

{
  "completed" : true,
  "point" : [ {
    "id" : "Paused",
    "results" : [ ]
  }, {
    "id" : "Resumed",
    "results" : [ ]
  }, {
    "id" : "StateChange",
    "results" : [ {
      "ActionResult" : "DebugInfo",
      "properties" : {
        "property" : [ {
          "name" : "To",
          "value" : "REQ_HEADERS_PARSED"
        }, {
          "name" : "From",
          "value" : "REQ_START"
        } ]
      },
      "timestamp" : "08-09-15 14:44:03:825"
    }, {
      "ActionResult" : "RequestMessage",
      "headers" : [ {
        "name" : "Accept",
        "value" : "application/json"
      }, {
        "name" : "apikey",
        "value" : "yFO7hGWdRFABC2rlSNXkpAXH5HAOecg"
      }, {
        "name" : "Connection",
        "value" : "keep-alive"
      }, {
        "name" : "content-length",
        "value" : "0"
      }, {
        "name" : "host",
        "value" : "ORG-ENV.apigee.net"
      } ....
   ....
 ....

View solution in original post

1 REPLY 1

Hi @Venkataraghavan

I think you might want re-check the API docs on that debugsession object.

To create the debugsession, use something like this:

curl -X POST \
  -i -n \
  -H content-type:application/x-www-url-form-encoded \
  'https ://api.enterprise.apigee.com/v1/o/ORG/e/ENVIRONMENT/apis/APINAME/revisions/REVISION_NUMBER/debugsessions?session=dino1234&timeout=300'

Then you can list the currently-active debug sessions like this:

curl -X GET \
  -i -n \
  https ://api.enterprise.apigee.com/v1/o/ORG/e/ENVIRONMENT/apis/APINAME/revisions/REVISION_NUMBER/debugsessions

The result looks like this:

[ "dino1234" ]

You can retrieve transaction IDs in a named debug session like so:

curl -X GET \
  -i -n \
  https ://api.enterprise.apigee.com/v1/o/ORG/e/ENV/apis/APINAME/revisions/REVISION_NUMBER/debugsessions/SESSIONNAME/data

In this case SESSIONNAME would be replaced with dino1234. The list of transaction ids will look like so:

[ "8430e7c9-5f2f-4e28-8c69-33bdb5725c00__129", "8430e7c9-5f2f-4e28-8c69-33bdb5725c00__130", "8430e7c9-5f2f-4e28-8c69-33bdb5725c00__133", "8430e7c9-5f2f-4e28-8c69-33bdb5725c00__132", "e41bc4a3-e1a4-4f5c-9908-439f65c02f1c__115", "e41bc4a3-e1a4-4f5c-9908-439f65c02f1c__114", "e41bc4a3-e1a4-4f5c-9908-439f65c02f1c__112", "e41bc4a3-e1a4-4f5c-9908-439f65c02f1c__109" ]

And then retrieve transaction data from an ID like this:

curl -X GET \
  -i -n \
  https ://api.enterprise.apigee.com/v1/o/ORG/e/ENV/apis/APINAME/revisions/REVISION_NUMBER/debugsessions/SESSIONNAME/data/TRANSACTION_ID

And the resulting data is quite verbose, and looks something like this at the start:

{
  "completed" : true,
  "point" : [ {
    "id" : "Paused",
    "results" : [ ]
  }, {
    "id" : "Resumed",
    "results" : [ ]
  }, {
    "id" : "StateChange",
    "results" : [ {
      "ActionResult" : "DebugInfo",
      "properties" : {
        "property" : [ {
          "name" : "To",
          "value" : "REQ_HEADERS_PARSED"
        }, {
          "name" : "From",
          "value" : "REQ_START"
        } ]
      },
      "timestamp" : "08-09-15 14:44:03:825"
    }, {
      "ActionResult" : "RequestMessage",
      "headers" : [ {
        "name" : "Accept",
        "value" : "application/json"
      }, {
        "name" : "apikey",
        "value" : "yFO7hGWdRFABC2rlSNXkpAXH5HAOecg"
      }, {
        "name" : "Connection",
        "value" : "keep-alive"
      }, {
        "name" : "content-length",
        "value" : "0"
      }, {
        "name" : "host",
        "value" : "ORG-ENV.apigee.net"
      } ....
   ....
 ....