Chilkat Online Tools

Node.js / Core Services API / GetCpeDeviceConfigContent

Back to Collection Items

var os = require('os');
if (os.platform() == 'win32') {  
    if (os.arch() == 'ia32') {
        var chilkat = require('@chilkat/ck-node21-win-ia32');
    } else {
        var chilkat = require('@chilkat/ck-node21-win64'); 
    }
} else if (os.platform() == 'linux') {
    if (os.arch() == 'arm') {
        var chilkat = require('@chilkat/ck-node21-arm');
    } else if (os.arch() == 'x86') {
        var chilkat = require('@chilkat/ck-node21-linux32');
    } else {
        var chilkat = require('@chilkat/ck-node21-linux64');
    }
} else if (os.platform() == 'darwin') {
    if (os.arch() == 'arm64') {
        var chilkat = require('@chilkat/ck-node21-mac-m1');
    } else {
        var chilkat = require('@chilkat/ck-node21-macosx');
    }
}


function chilkatExample() {

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    var http = new chilkat.Http();
    var success;

    http.SetRequestHeader("opc-request-id","8wF");
    http.SetRequestHeader("Authorization","{{signature}}");
    http.SetRequestHeader("Date","{{date}}");

    var sbResponseBody = new chilkat.StringBuilder();
    success = http.QuickGetSb("https://iaas.{{region}}.oraclecloud.com/20160918/cpes/:cpeId/cpeConfigContent",sbResponseBody);
    if (success == false) {
        console.log(http.LastErrorText);
        return;
    }

    console.log("Response status code = " + http.LastStatus);
    console.log(sbResponseBody.GetAsString());

}

chilkatExample();

Curl Command

curl -X GET
	-H "opc-request-id: 8wF"
	-H "Date: {{date}}"
	-H "Authorization: {{signature}}"
https://iaas.{{region}}.oraclecloud.com/20160918/cpes/:cpeId/cpeConfigContent

Postman Collection Item JSON

{
  "name": "GetCpeDeviceConfigContent",
  "request": {
    "method": "GET",
    "header": [
      {
        "description": "Unique identifier for the request.\nIf you need to contact Oracle about a particular request, please provide the request ID.\n",
        "key": "opc-request-id",
        "value": "8wF"
      },
      {
        "key": "Date",
        "value": "{{date}}",
        "description": "(Required) Current Date",
        "type": "text"
      },
      {
        "key": "Authorization",
        "value": "{{signature}}",
        "description": "(Required) Signature Authentication on Authorization header",
        "type": "text"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/cpes/:cpeId/cpeConfigContent",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "cpes",
        ":cpeId",
        "cpeConfigContent"
      ],
      "variable": [
        {
          "key": "cpeId",
          "value": "amet ut",
          "description": "(Required) The [OCID](/Content/General/Concepts/identifiers.htm) of the CPE."
        }
      ]
    },
    "description": "Renders a set of CPE configuration content that can help a network engineer configure the actual\nCPE device (for example, a hardware router) represented by the specified [Cpe](#/en/iaas/latest/Cpe/)\nobject.\n\nThe rendered content is specific to the type of CPE device (for example, Cisco ASA). Therefore the\n[Cpe](#/en/iaas/latest/Cpe/) must have the CPE's device type specified by the `cpeDeviceShapeId`\nattribute. The content optionally includes answers that the customer provides (see\n[UpdateTunnelCpeDeviceConfig](#/en/iaas/latest/TunnelCpeDeviceConfig/UpdateTunnelCpeDeviceConfig)),\nmerged with a template of other information specific to the CPE device type.\n\nThe operation returns configuration information for *all* of the\n[IPSecConnection](#/en/iaas/latest/IPSecConnection/) objects that use the specified CPE.\nHere are similar operations:\n\n  * [GetIpsecCpeDeviceConfigContent](#/en/iaas/latest/IPSecConnection/GetIpsecCpeDeviceConfigContent)\n  returns CPE configuration content for all IPSec tunnels in a single IPSec connection.\n  * [GetTunnelCpeDeviceConfigContent](#/en/iaas/latest/TunnelCpeDeviceConfig/GetTunnelCpeDeviceConfigContent)\n  returns CPE configuration content for a specific IPSec tunnel in an IPSec connection.\n"
  },
  "response": [
    {
      "name": "The information was retrieved.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Unique identifier for the request.\nIf you need to contact Oracle about a particular request, please provide the request ID.\n",
            "key": "opc-request-id",
            "value": "8wF"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/cpes/:cpeId/cpeConfigContent",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "cpes",
            ":cpeId",
            "cpeConfigContent"
          ],
          "variable": [
            {
              "key": "cpeId"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "opc-request-id",
          "value": "officia sed",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact\nOracle about a particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "text/plain; charset=utf-8"
        }
      ],
      "cookie": [
      ],
      "body": "officia sed"
    },
    {
      "name": "Bad Request",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Unique identifier for the request.\nIf you need to contact Oracle about a particular request, please provide the request ID.\n",
            "key": "opc-request-id",
            "value": "8wF"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/cpes/:cpeId/cpeConfigContent",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "cpes",
            ":cpeId",
            "cpeConfigContent"
          ],
          "variable": [
            {
              "key": "cpeId"
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "officia sed",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact\nOracle about a particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"et exercitation Excepteur\",\n \"message\": \"irure sit\"\n}"
    },
    {
      "name": "Unauthorized",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Unique identifier for the request.\nIf you need to contact Oracle about a particular request, please provide the request ID.\n",
            "key": "opc-request-id",
            "value": "8wF"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/cpes/:cpeId/cpeConfigContent",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "cpes",
            ":cpeId",
            "cpeConfigContent"
          ],
          "variable": [
            {
              "key": "cpeId"
            }
          ]
        }
      },
      "status": "Unauthorized",
      "code": 401,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "officia sed",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact\nOracle about a particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"et exercitation Excepteur\",\n \"message\": \"irure sit\"\n}"
    },
    {
      "name": "Not Found",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Unique identifier for the request.\nIf you need to contact Oracle about a particular request, please provide the request ID.\n",
            "key": "opc-request-id",
            "value": "8wF"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/cpes/:cpeId/cpeConfigContent",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "cpes",
            ":cpeId",
            "cpeConfigContent"
          ],
          "variable": [
            {
              "key": "cpeId"
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "officia sed",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact\nOracle about a particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"et exercitation Excepteur\",\n \"message\": \"irure sit\"\n}"
    },
    {
      "name": "Internal Server Error",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Unique identifier for the request.\nIf you need to contact Oracle about a particular request, please provide the request ID.\n",
            "key": "opc-request-id",
            "value": "8wF"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/cpes/:cpeId/cpeConfigContent",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "cpes",
            ":cpeId",
            "cpeConfigContent"
          ],
          "variable": [
            {
              "key": "cpeId"
            }
          ]
        }
      },
      "status": "Internal Server Error",
      "code": 500,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "officia sed",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact\nOracle about a particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"et exercitation Excepteur\",\n \"message\": \"irure sit\"\n}"
    },
    {
      "name": "An error has occurred.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Unique identifier for the request.\nIf you need to contact Oracle about a particular request, please provide the request ID.\n",
            "key": "opc-request-id",
            "value": "8wF"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/cpes/:cpeId/cpeConfigContent",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "cpes",
            ":cpeId",
            "cpeConfigContent"
          ],
          "variable": [
            {
              "key": "cpeId"
            }
          ]
        }
      },
      "status": "Internal Server Error",
      "code": 500,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "opc-request-id",
          "value": "officia sed",
          "description": "Unique Oracle-assigned identifier for the request. If you need to contact\nOracle about a particular request, please provide the request ID.\n"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"code\": \"et exercitation Excepteur\",\n \"message\": \"irure sit\"\n}"
    }
  ]
}