Secure Gateway

Live

Secure Gateway

+ Day(s) remaining in the trial

Overview

The Secure Gateway Service brings Hybrid Integration capability to your Bluemix environment. It provides secure connectivity from Bluemix to other applications and data sources running on-premise or in other clouds. A remote client is provided to enable secure connectivity.

Security

Keys

Pick a key to use with this API. Make sure you are logged in with your IBM id for your keys to be populated in the dropdown below. By selecting a key, it will be pre-filled for each endpoint in the Documentation section that can be used with the built-in testing. If you want to change which key to use for a particular endpoint, you can do so at the endpoint in the Documentation section.
You can manage your API keys in the <MyAPIs> section. API keys authenticate you to your subscription, so make sure to keep them secret. Do not share the X-IBM-Client-Secret portion of any API key in publicly accessible places such as GitHub, or client-side code.



Manage your keys
 

Documentation

Secure Gateway:

operations

operations
Adds an IP Table rule to a private destination.
Adds an IP Table ACCEPT rule to a private destination. Users accessing the destination from an IP and port described by this rule will not be rejected. The rule can contain a hostname, IP, or IP range and a port or port range. Use the describe destination call to view current IP Table Rules.

PUT   /v1/sgconfig/{gatewayID}/destinations/{destinationID}/ipTableRule

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}/destinations/{destinationID}/ipTableRule
		
Keys
Path and Query parameters

destinationID

URL , optional

The id of the destination

gatewayID

URL , optional

The Gateway ID

Request code
								
HttpResponse<String> response = Unirest.put("https://api.ibm.com/v1/sgconfig/%7BgatewayID%7D/destinations/%7BdestinationID%7D/ipTableRule") .header("accept", "application/json") .header("content-type", "application/json") .asString();
Create a destination
Creates a destination Protocol options are accepted as an array of strings matching the option name. See openssl's SSL_CTX_set_options for options.

POST   /v1/sgconfig/{gatewayID}/destinations

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}/destinations
		
Keys
Header parameters

Authorization

HEADER , required

Expected in form Bearer JWT, where the JWT is the security token of the Gateway

Path and Query parameters

gatewayID

URL , required

The Gateway ID

Request code
								
HttpResponse<String> response = Unirest.post("https://api.ibm.com/v1/sgconfig/%7BgatewayID%7D/destinations") .header("accept", "application/json") .header("content-type", "application/json") .header("authorization", "SOME_STRING_VALUE") .asString();
Response model

400

Required param missing

Body

404

destination not found

Body

Response example

400

Required param missing

								
							

404

destination not found

								
							
Creates a new Bluemix Secure Gateway Configuration
Creates a new Bluemix Secure Gateway Configuration.

POST   /v1/sgconfig

			https://sgmanager.ng.bluemix.net/v1/sgconfig
		
Keys
Path and Query parameters

org_id

STRING , required

Bluemix org id

space_id

STRING , required

Bluemix space id

Request code
Request model

desc

STRING , required

A description of this gateway

enf_tok_sec

BOOLEAN , optional

Whether to require the security token when connecting the client. Defaults to true

token_exp

INTEGER , optional

Number of days until the associated security token expires. Defaults to 90. Enter 0 for a token that does not expire.

Request example
{
  "desc": ""My Gateway"",
  "enf_tok_sec": true,
  "token_exp": 55
}
Response model

200

OK

Body

_id

STRING , optional

Unique identifier for this gateway

org_id

STRING , optional

Org ID associated with this gateway

space_id

STRING , optional

Space ID associated with this gateway

desc

STRING , optional

Description of the gateway

host

STRING , optional

Secure Gateway Hostname of the gateway

port

INTEGER , optional

Port for Secure Gateway Client to connect to

status

STRING , optional

Enabled/Disabled

jwt

STRING , optional

The gateway's security token

enf_tok_sec

BOOLEAN , optional

Whether the security token is being enforced on client connection

authorization

object , optional

Unique identifier for cert/key pair associated with this gateway

created_at

DATE , optional

Timestamp of creation of gateway

last_status_change

DATE , optional

Timestamp of latest modification of gateway

connectedClientsArr

ARRAY , optional

Array of currently connected clients

cert

STRING , optional

key

STRING , optional

400

Missing Required Parameter

Body

500

Internal Server error

Body

Response example

200

OK

								{"_id":"KnMUzqQbrPZ_local_ng","org_id":"e586be98-9d1c-4d00-9101-abf22d101f37","space_id":"fb3f464c-e654-4cad-85d4-dee0ebf7090f","desc":"mine","host":"galens-mbp.raleigh.ibm.com","port":50000,"status":"ENABLED","jwt":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25maWd1cmF0aW9uX2lkIjoiS25NVXpxUWJyUFpfbG9jYWxfbmciLCJyZWdpb24iOiJ1cy1zb3V0aCIsImlhdCI6MTQ3NTY5Mzg0NiwiZXhwIjoxNDc5NDk1NDQ2fQ.ii09oAmD_RJJoCxRqD8bMfPSg1UyCx0oWtkzN3I-Geo","enf_tok_sec":false,"authorization":{"cert":"KnMUzqQbrPZ_local_ng_CERT-ZfMc","key":"KnMUzqQbrPZ_local_ng_KEY-P4Cu"},"created_at":"2016-10-05T18:57:26.401Z","last_status_change":"2016-10-05T18:57:26.401Z","connectedClientsArr":[]}
							

400

Missing Required Parameter

								
							

500

Internal Server error

								
							
Deletes a destination
Deletes a destination

DELETE   /v1/sgconfig/{gatewayID}/destinations/{destinationID}

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}/destinations/{destinationID}
		
Keys
Path and Query parameters

destinationID

URL , required

The id of the destination

gatewayID

URL , required

The Gateway ID

Request code
								
HttpResponse<String> response = Unirest.delete("https://api.ibm.com/v1/sgconfig/%7BgatewayID%7D/destinations/%7BdestinationID%7D") .header("accept", "application/json") .header("content-type", "application/json") .asString();
Response model

400

Required param missing

Body

404

destination not found

Body

Response example

400

Required param missing

								
							

404

destination not found

								
							
Deletes a Secure Gateway Configuration
Deletes a Secure Gateway Configuration

DELETE   /v1/sgconfig/{gatewayID}

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}
		
Keys
Header parameters

Authorization

HEADER , required

Expected in form Bearer JWT, where JWT is the security token

Path and Query parameters

gatewayID

URL , required

The Gateway ID

Request code
								
HttpResponse<String> response = Unirest.delete("https://api.ibm.com/v1/sgconfig/%7BgatewayID%7D") .header("accept", "application/json") .header("content-type", "application/json") .header("authorization", "SOME_STRING_VALUE") .asString();
Response model

400

Missing require param

Body

404

Gateway configuration not found

Body

Response example

400

Missing require param

								
							

404

Gateway configuration not found

								
							
Downloads certs for the destination under the given gateway configuration
Downloads certs for the destination under the given gateway configuration

GET   /v1/sgconfig/{gatewayID}/destinations/{destinationID}/cert

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}/destinations/{destinationID}/cert
		
Keys
Path and Query parameters

destinationID

URL , required

The id of the destination

gatewayID

URL , required

The Gateway ID

Request code
								
HttpResponse<String> response = Unirest.get("https://api.ibm.com/v1/sgconfig/%7BgatewayID%7D/destinations/%7BdestinationID%7D/cert") .header("accept", "application/json") .header("content-type", "application/json") .asString();
Response model

404

destination not found

Body

Response example

404

destination not found

								
							
Generates a cert and key for the destination
Generates a cert and key for the destination under the given gateway configuration. They can be downloaded with the get certs call.

PUT   /v1/sgconfig/{gatewayID}/destinations/{destinationID}/genCerts

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}/destinations/{destinationID}/genCerts
		
Keys
Path and Query parameters

destinationID

URL , required

The id of the destination

gatewayID

URL , required

The Gateway ID

Request code
								
HttpResponse<String> response = Unirest.put("https://api.ibm.com/v1/sgconfig/%7BgatewayID%7D/destinations/%7BdestinationID%7D/genCerts") .header("accept", "application/json") .header("content-type", "application/json") .asString();
Response model

404

destination not found

Body

Response example

404

destination not found

								
							
gets a destination's information
gets a destination's information

GET   /v1/sgconfig/{gatewayID}/destinations/{destinationID}

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}/destinations/{destinationID}
		
Keys
Path and Query parameters

destinationID

URL , required

The id of the destination

gatewayID

URL , required

The Gateway ID

Request code
								
HttpResponse<String> response = Unirest.get("https://api.ibm.com/v1/sgconfig/%7BgatewayID%7D/destinations/%7BdestinationID%7D") .header("accept", "application/json") .header("content-type", "application/json") .asString();
Response model

400

Required param missing

Body

404

destination not found

Body

Response example

400

Required param missing

								
							

404

destination not found

								
							
gets a list of destinations associated with given gateway ID
gets a list of destination information

GET   /v1/sgconfig/{gatewayID}/destinations

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}/destinations
		
Keys
Header parameters

Authorization

HEADER , required

Expected in form Bearer JWT, where JWT is the security token of the gateway

Path and Query parameters

gatewayID

URL , required

The Gateway ID

Request code
								
HttpResponse<String> response = Unirest.get("https://api.ibm.com/v1/sgconfig/%7BgatewayID%7D/destinations") .header("accept", "application/json") .header("content-type", "application/json") .header("authorization", "SOME_STRING_VALUE") .asString();
Response model

400

Missing required parameter

Body

404

destination not found

Body

Response example

400

Missing required parameter

								
							

404

destination not found

								
							
Gets the usage statistics for the gateway configuration
Gets the usage statistics for the gateway configuration

GET   /v1/sgconfig/{gatewayID}/stats

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}/stats
		
Keys
Header parameters

Authorization

HEADER , required

Expected in form Bearer JWT

Path and Query parameters

gatewayID

URL , required

The Gateway ID

Request code
								
HttpResponse<String> response = Unirest.get("https://api.ibm.com/v1/sgconfig/%7BgatewayID%7D/stats") .header("accept", "application/json") .header("content-type", "application/json") .header("authorization", "SOME_STRING_VALUE") .asString();
Response model

404

Gateway configuration not found

Body

Response example

404

Gateway configuration not found

								
							
Import Service or Gateway
Import .gateway or service.config file to recreate the gateway(s) and destination(s) they were initially created from.

PUT   /v1/import

			https://sgmanager.ng.bluemix.net/v1/import
		
Keys
FormData parameters

state

STRING , required

Path to file location

Request code
Regenerate the cert/key pair associated with this gateway
Regenerate the cert/key pair associated with this gateway

PUT   /v1/sgconfig/{gatewayID}/genAuth

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}/genAuth
		
Keys

Authorization

STRING , required

Bearer JWT

Path and Query parameters

gatewayID

URL , required

Unique ID of the gateway to regenerate cert/key for

Request code
Removes an IP Table rule from a private destination.
Removes an IP Table ACCEPT rule from a private destination. Users accessing the destination from an IP and Port described by this rule will now be rejected. Use the describe destination call to view current IP Table Rules.

DELETE   /v1/sgconfig/{gatewayID}/destinations/{destinationID}/ipTableRule

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}/destinations/{destinationID}/ipTableRule
		
Keys
Path and Query parameters

destinationID

URL , optional

The id of the destination

gatewayID

URL , optional

The Gateway ID

Request code
								
HttpResponse<String> response = Unirest.delete("https://api.ibm.com/v1/sgconfig/%7BgatewayID%7D/destinations/%7BdestinationID%7D/ipTableRule") .header("accept", "application/json") .header("content-type", "application/json") .asString();
Retrieves a Secure Gateway Configuration
Retrieves a Secure Gateway Configuration

GET   /v1/sgconfig/{gatewayID}

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}
		
Keys
Header parameters

Authorization

HEADER , required

Expected in form Bearer JWT, where JWT is the security token

Path and Query parameters

gatewayID

URL , required

The Gateway ID

Request code
								
HttpResponse<String> response = Unirest.get("https://api.ibm.com/v1/sgconfig/%7BgatewayID%7D") .header("accept", "application/json") .header("content-type", "application/json") .header("authorization", "SOME_STRING_VALUE") .asString();
Response model

400

Missing require param

Body

404

Gateway configuration not found

Body

Response example

400

Missing require param

								
							

404

Gateway configuration not found

								
							
This operation lists all existing Secure Gateway Configurations
Retrieves existing Bluemix Secure Gateway Configurations

GET   /v1/sgconfig

			https://sgmanager.ng.bluemix.net/v1/sgconfig
		
Keys
Path and Query parameters

org_id

STRING , required

Bluemix org id

space_id

STRING , required

Bluemix space id

type

STRING , optional

Enabled/Disabled

Request code
								
HttpResponse<String> response = Unirest.get("https://api.ibm.com/v1/sgconfig?type=SOME_STRING_VALUE&org_id=SOME_STRING_VALUE&space_id=SOME_STRING_VALUE") .header("accept", "application/json") .header("content-type", "application/json") .asString();
Response model

404

No gateway configurations found

Body

Response example

404

No gateway configurations found

								
							
Updates a destination
Updates a destination Protocol options are accepted as an array of strings matching the option name. See openssl's SSL_CTX_set_options for options.

PUT   /v1/sgconfig/{gatewayID}/destinations/{destinationID}

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}/destinations/{destinationID}
		
Keys
Path and Query parameters

destinationID

URL , required

The id of the destination

gatewayID

URL , required

The Gateway ID

Request code
								
HttpResponse<String> response = Unirest.put("https://api.ibm.com/v1/sgconfig/%7BgatewayID%7D/destinations/%7BdestinationID%7D") .header("accept", "application/json") .header("content-type", "application/json") .asString();
Response model

400

Missing required parameter

Body

404

destination not found

Body

Response example

400

Missing required parameter

								
							

404

destination not found

								
							
Updates the enabled and description properties of the gateway configuration
Updates the enabled/description properties of a gateway configuration

PUT   /v1/sgconfig/{gatewayID}

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}
		
Keys
Header parameters

Authorization

HEADER , required

Expected in form Bearer JWT

Path and Query parameters

gatewayID

URL , required

The Gateway ID

Request code
Request model

desc

STRING , optional

New description for the gateway

enabled

BOOLEAN , optional

Whether the gateway should be enabled or disabled

enf_tok_sec

BOOLEAN , optional

Whether to require the security token when connecting the client

regen_token

BOOLEAN , optional

Whether to regenerate the associated security token. Defaults to false

token_exp

INTEGER , optional

Number of days until the newly generated token expires. Defaults to 90. Ignored if regen_token is false or not provided

Request example
{
  "desc": "My New Gateway",
  "enabled": true,
  "enf_tok_sec": true,
  "regen_token": true,
  "token_exp": 44
}
Response model

400

Missing Required Parameter

Body

404

Gateway configuration not found

Body

500

Internal Server error

Body

Response example

400

Missing Required Parameter

								
							

404

Gateway configuration not found

								
							

500

Internal Server error

								
							
Uploads a cert for the destination under the given gateway configuration
Uploads a cert for the destination under the given gateway configuration. NOTE: Accepts a server cert the cert in the form field 'cert' and a client cert under the form field 'client_cert'.

PUT   /v1/sgconfig/{gatewayID}/destinations/{destinationID}/cert

			https://sgmanager.ng.bluemix.net/v1/sgconfig/{gatewayID}/destinations/{destinationID}/cert
		
Keys
Path and Query parameters

destinationID

URL , required

The id of the destination

gatewayID

URL , required

The Gateway ID

Request code
								
HttpResponse<String> response = Unirest.put("https://api.ibm.com/v1/sgconfig/%7BgatewayID%7D/destinations/%7BdestinationID%7D/cert") .header("accept", "application/json") .header("content-type", "application/json") .asString();
Response model

404

destination not found

Body

Response example

404

destination not found

								
							

Loading content...