Girish Ingle
Girish Ingle

Reputation: 130

How to Create Bluemix Secure Gateway from rest api

I am following this doc for reference. I am able to get information for secure gateway, which is already created. But when I am trying to create a new secure gateway from the REST API, it is asking for authentication. I have tried to provide the authentication information two ways:

Note: I am using postman for this operation

Postman details:

url: https://sgmanager.au-syd.bluemix.net/v1/[email protected]&space_id=Equxxxxx

enter image description here

It is also saying "Invalid org_id", but the org_id is valid.

Upvotes: 0

Views: 121

Answers (1)

Galen Keene
Galen Keene

Reputation: 303

To create a gateway via the SG API, your request will need the query parameters ord_id and space_id (the guids, not the friendly names). The authorization header will be Basic <your_base64_encoded_username:password> or Bearer <bluemix_token>. For example:

curl "https://sgmanager.au-syd.bluemix.net/v1/sgconfig?org_id=myOrgGuid&space_id=mySpaceGuid" -H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=" -d '{"desc":"My Gateway"}'

Upvotes: 1

Related Questions