Instana

 View Only
  • 1.  Instana REST API using

    Posted Tue July 30, 2024 02:22 AM

    I'm trying to transfer the Instana audit access and action logs to our security application by using REST API.

    Can you please give me the example of the query syntax for receiving the current day logs record?

    In the API docs I don't find any clues .

    Thanks in advance 



    ------------------------------
    Shimon Zaidman
    MATAF
    TEL-AVIV
    ------------------------------


  • 2.  RE: Instana REST API using

    Posted Wed July 31, 2024 05:27 AM

    Hi Shimon,

    I have played with this and there isn't an easy way to do it because the API supports offset, query and pageSize as parameters only. If you call the endpoint without parameters you get 10 records.

    I found a way but is not user friendly, you need to use pageSize and somehow (using the UI) know how many records are within the 24hrs timeframe.

    curl --request GET --url https://yourtenant.instana.io/api/settings/auditlog?pageSize=34 --header "authorization: apiToken $apiToken"
    Another way is using the offset, but we're not sure how many records we need to complete the 24hrs.

    First query:

    curl --request GET --url https://yourtenant.instana.io/api/settings/auditlog --header "authorization: apiToken $apiToken"
    Second query (to N query):
    curl --request GET --url https://yourtenant.instana.io/api/settings/auditlog?offset=11 --header "authorization: apiToken $apiToken"
    curl --request GET --url https://yourtenant.instana.io/api/settings/auditlog?offset=21 --header "authorization: apiToken $apiToken"

    And so on.

    If you want to enhance Instana in some way, you can submit an idea at our IBM Ideas website:
    https://ideas.ibm.com/

    Hope this helps in the time being.



    ------------------------------
    Israel Ochoa
    CSM Architect - Instana NCEE Market
    IBM
    Stockholm
    ------------------------------



  • 3.  RE: Instana REST API using

    Posted Mon August 05, 2024 06:34 AM

    Hello Shimon

    the best way imho to work with the API and understand it, is using Postman. It does help me. However, Isreal is spot on, the API for access log and audit log and not very "elegant".

    To really use it well, you must have external logic controlling the api, e.g deduping and checking timestamps for example. If possible, you could query the API on a continuous basis, like every 5 or 10min.

    Please submit your ideas as Israel suggested!

    Best regards

    Tom



    ------------------------------
    Tom Tammann
    ------------------------------