DQM and Experience Optimization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FAQs for DQM

DQM-security

DQM-security

The DQM Security API calls allow you to obtain and renew JWT token that is required to be provided as an Authorization header when interacting with other API calls.

POST authenticate
https://api.crownpeak.net/dqm-security/v1/authenticate
Returns a JWT token that is required to be attached as an Authorization header for all other subsequent API calls. Email and password of a valid DQM user is required in order for a token to be returned.

This token has a 2 hour timeout. It can be renewed using the renew API call.

HEADERS
Content-Type application/json
 
BODY raw

{
  "email": "player.one@crownpeak.com",
  "password": "CorrectHorseBatteryStaple"
}
 
Example Request
curl --location --request POST 'https://api.crownpeak.net/dqm-security/v1/authenticate' \
--header 'Content-Type: application/json' \
--data-raw '{
  "email": "user.name@crownpeak.com",
  "password": "CorrectHorseBatteryStaple"
}'
 Example Response (body)
{
  "email": "user.name@crownpeak.com",
  "givenName": "User",
  "surname": "Name",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}
Example Response (Headers)
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 2143
Content-Type: application/json
Date: Wed, 06 Jun 2018 20:34:56 GMT
Via: 1.1 72f202fb973968c0cfdb028ab6f36fac.cloudfront.net (CloudFront)
X-Amz-Cf-Id: HKHd88EQcx8jIGPMF0ej7O6xPqD44OS6oeOgxw4cqysTV6oc6gygaw==
X-Amzn-Trace-Id: Root=1-5b184570-8d97e85d6e57e1262c38f71d
X-Cache: Miss from cloudfront
x-amz-apigw-id: IE_JjFLTDoEFzYg=
x-amzn-RequestId: 130975b3-69c9-11e8-aa6a-ef38d5c22fe8
 
POST renew
https://api.crownpeak.net/dqm-security/v1/renew
 

Returns a renewed JWT token with a fresh expiry date set.

AUTHORIZATION Bearer Token
 
HEADERS

Authorization
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

Bearer token from DQM-security

 
Example Request
curl --location --request POST 'https://api.crownpeak.net/dqm-security/v1/renew' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' \
--data-raw ''

Example Response (body)

{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

Example Response (Headers)

Connection: keep-alive
Content-Length: 577
Content-Type: application/json
Date: Fri, 08 Jun 2018 12:29:03 GMT
Via: 1.1 87ce1a2818e8b605bc0c86bdab0851bf.cloudfront.net (CloudFront)
X-Amz-Cf-Id: T9vJos7pfnSYOB-c0brQhZpAFm09aT463oJLut1ZWtIvaPnCJsdBYQ==
X-Amzn-Trace-Id: Root=1-5b1a768f-23084201f743b2d64a32645e
X-Cache: Miss from cloudfront
x-amz-apigw-id: IKd2YFMDjoEFoMA=
x-amzn-RequestId: 8746e43d-6b17-11e8-beac-0b880ce08518
Labels (2)