Instana

 View Only
  • 1.  Create release marker through API

    Posted Mon April 17, 2023 09:25 AM

    Hi all,

    I'm trying to create a release marker through the Instana API (POST /api/releases). The creation itself is succesful, because I can retrieve it via a GET /api/releases
    But in the GUI, the release is not visible. The start time of the release is in the selected time range and I'm looking at the correct scope. 

    I'm working on an Instana on premise (UI: 1.245.584 & Backend 3.245.259-0)

    Does anyone has an idea how to solve this? Or what the possible reason is?

    Kind regards,
    Jurgen



    ------------------------------
    Jurgen Roels
    ------------------------------


  • 2.  RE: Create release marker through API

    Posted Tue April 18, 2023 06:51 AM

    Did you associate it with the correct application(s)?  Can you show us the syntax that you used.   You can replace the hostname and API token with fake information.



    ------------------------------
    Ben Stern
    Executive IT Specialist / Monitoring and Analytics Best Practices and Technical Evangelist
    IBM
    Durham NC
    919-224-1593
    ------------------------------



  • 3.  RE: Create release marker through API

    Posted Tue April 18, 2023 07:04 AM

    The curl that I used is:

    curl --location '<url>/api/releases' \
    --header 'Authorization: apiToken <token>' \
    --header 'Content-Type: application/json' \
    --data '{
        "name""v2",
        "start"1681729554,
        "applications": [
          {
            "name""Trv-nginx-test-instana" 
          }
        ]    }

    It exists on the backend, since I can retrieve it through the GET releases API. This also shows that the application is linked to the correct ID:
    {
        "id""d4tMdcgXRI69QywMfH-Vyg",
        "name""v2",
        "start"1681729554,
        "lastUpdated"1681729575147,
        "applications": [
            {
                "id""NAZonP_4QbWWCiHk6_2GnA",
                "name""Trv-nginx-test-instana"
            }
        ]     }

    But in the UI, I cannot find this release on the 17th of April:



    ------------------------------
    Jurgen Roels
    ------------------------------



  • 4.  RE: Create release marker through API
    Best Answer

    Posted Wed April 19, 2023 01:02 PM

    Apparently the "start" field didn't have the milliseconds.

    Did you generate it with date +%s ?. This command issues the epoch in seconds. You should add 000, like "start": 1681729554000

    Hope it help you.



    ------------------------------
    Luis Sanchez
    luis@impulseit.com
    Chile
    ------------------------------



  • 5.  RE: Create release marker through API

    Posted Thu April 20, 2023 02:06 AM

    Hi Luis,

    Indeed, the milliseconds were missing.

    Thanks for the feedback!



    ------------------------------
    Kind regards,
    Jurgen Roels
    Brussels, Belgium
    ------------------------------