Quick Start
Register a gateway node to a logical gateway with the Management Service using the REST API for the Gateway Controller in Oracle API Platform Cloud Service - Classic by performing the following tasks.
Prerequisites
Prerequisite | More Information |
Provision your Oracle API Platform Cloud Service - Classic instance. |
See Creating an Oracle API Platform Cloud Service - Classic Instance in Using Oracle API Platform Cloud Service - Classic. |
Install a gateway node |
See Installing a Gateway Node in Using Oracle API Platform Cloud Service - Classic. |
Create a new logical gateway |
See Creating a Logical Gateway in Using Oracle API Platform Cloud Service - Classic. |
Step 1: Obtain Account Information
-
Username and password
-
The Gateway Manager role in Oracle API Platform Cloud Service - Classic or membership to a group assigned the Gateway Manager role
-
The Manage Gateway grant for the logical gateway you want to register your node to.
Step 2: Install cURL
The examples within this document use the cURL command-line tool to demonstrate how to access the REST API for the Gateway Controller in Oracle API Platform Cloud Service - Classic.
To connect securely to the server, you must install a version of cURL that supports SSL and provide an SSL certificate authority (CA) certificate file or bundle to authenticate against the Verisign CA certificate. For more information about:
-
Using cURL, see Use cURL.
-
Authentication, see Security, Authentication and Authorization.
-
In your browser, navigate to the cURL home page at http://curl.haxx.se and click Download in the left navigation menu.
-
On the cURL Releases and Downloads page, locate the SSL-enabled version of the cURL software that corresponds to your operating system, click the link to download the ZIP file, and install the software.
-
Navigate to the cURL CA Certs page at http://curl.haxx.se/docs/caextract.html and download the cacert.pem SSL CA certificate bundle in the folder where you installed cURL.
-
Open a command window, navigate to the directory where you installed cURL, and set the cURL environment variable,
CURL_CA_BUNDLE
, to the location of an SSL certificate authority (CA) certificate bundle. For example:C:\curl> set CURL_CA_BUNDLE=cacert.pem
You are now ready to send requests to the REST API for the Gateway Controller in Oracle API Platform Cloud Service - Classic using cURL.
Step 3: Register Your Gateway Node to a Logical Gateway
The following cURL example registers a newly installed gateway node to a logical gateway created with the Oracle API Platform Cloud Service - Classic Management Service.
curl -i -X POST
-H "Authorization: Bearer access_token"
-H "Content-Type: application/json"
-d @node.json
https://example.com/apiplatform/gatewaynode/v1/registration
Note:
In releases prior to 18.2.5, the REST endpoints were protected using Basic Authorization instead of OAuth. If you are using an earlier version, you must specify an Authorization header whose value contains the base 64-encrypted user name and password (separated by a colon) of an Oracle API Platform Cloud Service - Classic user with authorization to perform the requested operation. This header looks like:
Authorization: Basic base64-encrypted-username:base64-encrypted-password
The following sample request body (included with the request above in a file named node.json
) specifies the details of the logical gateway you want to register the node to.
{ "gatewayId": "177", "gatewayNodeName": "Production Gateway Node 1", "tenantId": "SampleTenant", "tenantInstanceId": "SampleInstance", "managementUrl": "https://example.com", "gatewayRuntimeUsername": "gateway-runtime-user", "gatewayRuntimePassword": "password", "properties": { "nodeProxy": ["http://www-proxy.example.com:80", "https://www-proxy.example.com:80"] } }