Target Server logs

Hi,

Is there any way we can check target server log like last update and when it is created and all

0 1 98
1 REPLY 1

There is an audit trail in Apigee.

It does not support a query of "tell me the most recent update for TargetServer X"

Instead the query model is "give me the audited administrative changes between time X and timeY".

And you can filter that resultset to find changes to the targetserver of interest.

It's possible there will be no changes for the target server of interest, found in the timespan you queried (last 10 minuites, last 10 hours, whatever). If that happens, then you can just "back up" the time interval and query again. Repeat until you reach a reasonable time boundary (1 month ago, 3 months ago, whatever) or until you find a change of interest.

The audit trail API is documented here.

An example:

$ curl -q -n $mgmtserver/v1/audits/organizations/$ORG\?startTime=1589492592483\&endTime=1591727883000\&expand=true -H Accept:application/json | jq . | grep -A 4 -B 3 targetservers
    {
      "operation": "UPDATE",
      "request": "'{'host':'example.com','isEnabled':true,'name':'Enterprisetarget','port':8080}'",
      "requestUri": "/v1/organizations/ORGNAME/environments/test/targetservers/Enterprisetarget",
      "responseCode": "200",
      "timeStamp": 1590612694314,
      "user": "someone@google.com"
    },
--
--
    {
      "operation": "UPDATE",
      "request": "'{'host':'example.com','isEnabled':true,'name':'Enterprisetarget','port':8080}'",
      "requestUri": "/v1/organizations/ORGNAME/environments/test/targetservers/Enterprisetarget",
      "responseCode": "200",
      "timeStamp": 1590598090641,
      "user": "someone@google.com"
    },