cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Postman issue while calling Dynatrace API

alberto-jesus_d
Newcomer

Hi,

I got an error using Postman, I hope you handled it before and know how to solve it. The thing is that I'm trying to connect the latest version of Postman (8.0.4) using Dynatrace GitHub Collections (https://github.com/sergiohinojosa/dynatrace-api-postman-collections) to Dynatrace API. I have created env variables to resolve the DT tenant and API-Token. The problem comes when I run the request, I am getting the message "Unsupported web browser ":



It guess it's an issue with embedded Web browser from Postman. The Authorization method that I'm using is API Key:


Did you find this issue before?

Thanks in advance.

Alberto.

7 REPLIES 7

Radoslaw_Szulgo
Inactive

I guess you need to update how you authenticate with the token. It should look rather like this:


Senior Product Manager,
Dynatrace Managed expert

sergio_hinojosa
Dynatrace Advocate
Dynatrace Advocate

Hi Alberto,

I have not tried with the new Postman version but it should work (suppouse). Unless the collections are not compatible anymore. The collections are being generated from our API spec. I have not updated them for a while now, so you might not have a lot of endpoints (I'll add it to my todo list).

Can you post the request from the log console of postman? with the info (except the tenant and token of course)?

As a side note: Regarding passing the Token, both methods are accepted. You can pass it as a Header or a Query parameter. Recommended is always as a header parameter. The collection has it as query since sometimes is needed to access Dynatrace behind reverse-proxyy. A reverse-proxy normally strips down the header, and the query won't be stripped down. On the down side, a query parameter might be stored on the audit log of the webserver, so something to keep in mind.
https://www.dynatrace.com/support/help/dynatrace-api/basics/dynatrace-api-authentication/?http-heade...





sergio_hinojosa
Dynatrace Advocate
Dynatrace Advocate

@Alberto D. I just updated my postman and the collections are compatible with the version 8.0.4. By taking a closer look at your request I notice that the parameters are not setted. Try again by either unselecting them or setting a value. THe genration of the collection generates not only the endpoints but some documentation and the parameters.

here is explained very shortly:

Quick intro on how to use the generated params and path variables

Best regards
Sergio

Hi Sergio,

I have run an End-Point without parameters and I'm getting the same error:

{tenant}}/api/v2/networkZones

Console output:


Search messages

GET https://XX.live.dynatrace.com//api/v2/networkZones

200

131 ms

GET //api/v2/networkZones HTTP/1.1

Authorization: Api Token XX

User-Agent: PostmanRuntime/7.26.10

Accept: */*

Cache-Control: no-cache

Postman-Token: bc48b599-7eb6-417e-8e82-d255e2fda29e

Host: XX.live.dynatrace.com

Accept-Encoding: gzip, deflate, br

Connection: keep-alive

Cookie: SRV=server3; apmsessionid=node0pbm1gf4wpdxqhf24tr629gyu214288.node0

HTTP/1.1 200 OK

date: Thu, 04 Feb 2021 12:31:29 GMT

traffic-source: UNKNOWN

x-frame-options: SAMEORIGIN

frame-options: SAMEORIGIN

x-xss-protection: 1; mode=block

set-cookie: apmsessionid=node0pttlcad653dk1y2579le4xqex214296.node0; Path=/; HttpOnly; SameSite=Lax; Secure

expires: Thu, 04 Feb 2021 12:31:29 GMT

pragma: no-cache

cache-control: max-age=0, no-cache, no-store, must-revalidate

x-content-type-options: nosniff

content-security-policy: default-src 'self' 'nonce-v0gyOpPqRr6lQJLo8fpaTQ==' data: ;script-src 'self' https://static.woopra.com https://www.woopra.com/ https://d2ki1uyufn7sj9.cloudfront.net https://d2lm0p9xttk9v1.cloudfront.net https://d3847ft59mjvb2.cloudfront.net/ https://app.intercom.io https://widget.intercom.io https://js.intercomcdn.com https://js-cdn.dynatracelabs.com 'unsafe-inline' 'unsafe-eval';object-src 'self' 'nonce-v0gyOpPqRr6lQJLo8fpaTQ==' https://assets.dynatrace.com;style-src 'self' 'unsafe-inline' https://d2ki1uyufn7sj9.cloudfront.net https://d2lm0p9xttk9v1.cloudfront.net;font-src 'self' 'nonce-v0gyOpPqRr6lQJLo8fpaTQ==' https://d2ki1uyufn7sj9.cloudfront.net https://d2lm0p9xttk9v1.cloudfront.net https://js.intercomcdn.com;img-src 'self' 'nonce-v0gyOpPqRr6lQJLo8fpaTQ==' data: https://d2ki1uyufn7sj9.cloudfront.net https://d2lm0p9xttk9v1.cloudfront.net https://ruxit-synth-screencap-dev.s3.amazonaws.com https://ruxit-synth-screencap-sprint.s3.amazonaws.com https://ruxit-synth-screencap.s3.amazonaws.com data: https://js.intercomcdn.com https://static.intercomassets.com https://downloads.intercomcdn.com https://uploads.intercomusercontent.com https://gifs.intercomcdn.com https://video-messages.intercomcdn.com https://messenger-apps.intercom.io https://dynatrace-9a8769f7accc.intercom-attachments-5.com https://dynatrace-9a8769f7accc.intercom-attachments-6.com https://dynatrace-9a8769f7accc.intercom-attachments-9.com https://dt-cdn.net https://dynatrace.asknice.ly https://assets.survicate.com https://dynatrace-9a8769f7accc.intercom-attachments-1.com https://app.intercom.com;media-src 'self' 'nonce-v0gyOpPqRr6lQJLo8fpaTQ==' https://js.intercomcdn.com;frame-src 'self' 'nonce-v0gyOpPqRr6lQJLo8fpaTQ==' https://sso.dynatrace.com https://d2ki1uyufn7sj9.cloudfront.net https://d2lm0p9xttk9v1.cloudfront.net https://www.youtube.com https://fast.wistia.net https://share.intercom.io https://intercom-sheets.com https://player.vimeo.com https://www.intercom-reporting.com https://play.vidyard.com https://assets.dynatrace.com;connect-src 'self' 'nonce-v0gyOpPqRr6lQJLo8fpaTQ==' https://d2ki1uyufn7sj9.cloudfront.net https://d2lm0p9xttk9v1.cloudfront.net https://api.segment.io https://trello.com/1/ https://api.intercom.io https://api-iam.intercom.io https://api-ping.intercom.io https://nexus-websocket-a.intercom.io https://nexus-websocket-b.intercom.io https://nexus-long-poller-a.intercom.io https://nexus-long-poller-b.intercom.io wss://nexus-websocket-a.intercom.io wss://nexus-websocket-b.intercom.io https://uploads.intercomcdn.com https://uploads.intercomusercontent.com https://assets.dynatrace.com https://account.dynatrace.com;child-src 'self' blob:;worker-src 'self' blob:;frame-ancestors 'self' ;base-uri 'self' ;form-action 'self' https://dynatrace.asknice.ly https://api-iam.intercom.io https://intercom.help; report-uri /reportCPSViolations

content-type: text/html;charset=utf-8

vary: Accept-Encoding, User-Agent

content-encoding: gzip

transfer-encoding: chunked

strict-transport-security: max-age=31536000;includeSubDomains

The console only showsresponse bodies smaller than 10 KB inline. To view the complete body, inspect it by clicking Open.


The authorization method is based on Header and API-key and API-Token is correctly set:



The thing is that I am still getting the same error:


<!DOCTYPE html>

<html>

<head>

<meta name="robots" content="noindex" />


<title>Unsupported web browser - Dynatrace</title>


<style>

html {

height: 100%;

}


I guess it could be an issue with User Agent (User-Agent: PostmanRuntime/7.26.10). I don't know what I am missing...


Thanks.


Alberto.


alberto-jesus_d
Newcomer

I got the issue. That was my request, it was wrong, I just updated tenant variable.

https://XX.live.dynatrace.com//api/v2/networkZones 

Erasing extra / it works properly (https://XX.live.dynatrace.com/api/v2/networkZones )

Thanks!!

 

Alberto.

 

Great! wish you lots of fun and automation with our API !

nakb
Guide

Hi,

 

I am getting failed to resolve tenant 10 error, any idea how to resolve.

Featured Posts