POST call to create and white list domains using V3 API call, fails with 403 Forbidden error

POST call to create and white list domains using V3 API call, fails with 403 Forbidden error

book

Article ID: KB0081026

calendar_today

Updated On:

Products Versions
TIBCO Cloud API Management -

Description

 

Domains cannot created using V3 API call in the 'active' state, as Mashery has to approve any domain proposed for whitelisting. V3 API POST call without specifying the status, or by specifying 'waiting' will work.

 

Issue/Introduction

POST call to create and white list domains using V3 API call, fails with 403 Forbidden error.

Resolution

POST call to create and white list domains using V3 API call, fails with 403 Forbidden error:

Domains cannot created using V3 API call in the 'active' state, as Mashery support/ops has to approve any domain proposed for whitelisting. V3 API POST call without specifying the status, or by specifying 'waiting' will work.

POST call with status ‘waiting’ should work:

curl -k 'https://api.mashery.com/v3/rest/domains' -H "Authorization: Bearer xxxxxxxxxx” -H "Content-Type:application/json" -X POST -d '{"status”:”waiting”,”domain":"www.test2234.com"}'

POST call with status ‘active’ will fail with 403:

curl -k 'https://api.mashery.com/v3/rest/domains' -H "Authorization: Bearer xxxxxxxxxx” -H "Content-Type:application/json" POST -d '{"status":"active","domain":"www.test1235.com"}'