SQL Server / Core Services API / RemoveDrgRouteRules
Back to Collection Items
-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
DECLARE @hr int
DECLARE @iTmp0 int
-- Important: Do not use nvarchar(max). See the warning about using nvarchar(max).
DECLARE @sTmp0 nvarchar(4000)
-- This example assumes the Chilkat API to have been previously unlocked.
-- See Global Unlock Sample for sample code.
DECLARE @http int
-- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
IF @hr <> 0
BEGIN
PRINT 'Failed to create ActiveX component'
RETURN
END
DECLARE @success int
-- Use this online tool to generate code from sample JSON: Generate Code to Create JSON
-- The following JSON is sent in the request body.
-- {
-- "routeRuleIds": [
-- "quis"
-- ]
-- }
DECLARE @json int
-- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @json OUT
EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'routeRuleIds[0]', 'quis'
EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Content-Type', 'application/json'
EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'x-content-sha256', '{{content_sha256}}'
EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Authorization', '{{signature}}'
EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Date', '{{date}}'
DECLARE @resp int
EXEC sp_OAMethod @http, 'PostJson3', @resp OUT, 'https://iaas.{{region}}.oraclecloud.com/20160918/drgRouteTables/:drgRouteTableId/actions/removeDrgRouteRules', 'application/json', @json
EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
IF @iTmp0 = 0
BEGIN
EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
PRINT @sTmp0
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @json
RETURN
END
EXEC sp_OAGetProperty @resp, 'StatusCode', @iTmp0 OUT
PRINT @iTmp0
EXEC sp_OAGetProperty @resp, 'BodyStr', @sTmp0 OUT
PRINT @sTmp0
EXEC @hr = sp_OADestroy @resp
EXEC @hr = sp_OADestroy @http
EXEC @hr = sp_OADestroy @json
END
GO
Curl Command
curl -X POST
-H "Content-Type: application/json"
-H "Date: {{date}}"
-H "Authorization: {{signature}}"
-H "x-content-sha256: {{content_sha256}}"
-d '{
"routeRuleIds": [
"quis"
]
}'
https://iaas.{{region}}.oraclecloud.com/20160918/drgRouteTables/:drgRouteTableId/actions/removeDrgRouteRules
Postman Collection Item JSON
{
"name": "RemoveDrgRouteRules",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Date",
"value": "{{date}}",
"description": "(Required) Current Date",
"type": "text"
},
{
"key": "Authorization",
"value": "{{signature}}",
"description": "(Required) Signature Authentication on Authorization header",
"type": "text"
},
{
"key": "x-content-sha256",
"value": "{{content_sha256}}",
"description": "(Required) Content sha256 for POST, PUT and PATCH operations",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"routeRuleIds\": [\n \"quis\"\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/drgRouteTables/:drgRouteTableId/actions/removeDrgRouteRules",
"host": [
"{{baseUrl}}"
],
"path": [
"drgRouteTables",
":drgRouteTableId",
"actions",
"removeDrgRouteRules"
],
"variable": [
{
"key": "drgRouteTableId",
"value": "amet ut",
"description": "(Required) The [OCID](/iaas/Content/General/Concepts/identifiers.htm) of the DRG route table."
}
]
},
"description": "Removes one or more route rules from the specified DRG route table.\n"
},
"response": [
{
"name": "The route rules are being deleted.",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"routeRuleIds\": [\n \"quis\"\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/drgRouteTables/:drgRouteTableId/actions/removeDrgRouteRules",
"host": [
"{{baseUrl}}"
],
"path": [
"drgRouteTables",
":drgRouteTableId",
"actions",
"removeDrgRouteRules"
],
"variable": [
{
"key": "drgRouteTableId"
}
]
}
},
"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"
}
],
"cookie": [
],
"body": ""
},
{
"name": "Bad Request",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"routeRuleIds\": [\n \"quis\"\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/drgRouteTables/:drgRouteTableId/actions/removeDrgRouteRules",
"host": [
"{{baseUrl}}"
],
"path": [
"drgRouteTables",
":drgRouteTableId",
"actions",
"removeDrgRouteRules"
],
"variable": [
{
"key": "drgRouteTableId"
}
]
}
},
"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": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"routeRuleIds\": [\n \"quis\"\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/drgRouteTables/:drgRouteTableId/actions/removeDrgRouteRules",
"host": [
"{{baseUrl}}"
],
"path": [
"drgRouteTables",
":drgRouteTableId",
"actions",
"removeDrgRouteRules"
],
"variable": [
{
"key": "drgRouteTableId"
}
]
}
},
"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": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"routeRuleIds\": [\n \"quis\"\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/drgRouteTables/:drgRouteTableId/actions/removeDrgRouteRules",
"host": [
"{{baseUrl}}"
],
"path": [
"drgRouteTables",
":drgRouteTableId",
"actions",
"removeDrgRouteRules"
],
"variable": [
{
"key": "drgRouteTableId"
}
]
}
},
"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": "Conflict",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"routeRuleIds\": [\n \"quis\"\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/drgRouteTables/:drgRouteTableId/actions/removeDrgRouteRules",
"host": [
"{{baseUrl}}"
],
"path": [
"drgRouteTables",
":drgRouteTableId",
"actions",
"removeDrgRouteRules"
],
"variable": [
{
"key": "drgRouteTableId"
}
]
}
},
"status": "Conflict",
"code": 409,
"_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": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"routeRuleIds\": [\n \"quis\"\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/drgRouteTables/:drgRouteTableId/actions/removeDrgRouteRules",
"host": [
"{{baseUrl}}"
],
"path": [
"drgRouteTables",
":drgRouteTableId",
"actions",
"removeDrgRouteRules"
],
"variable": [
{
"key": "drgRouteTableId"
}
]
}
},
"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": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"routeRuleIds\": [\n \"quis\"\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/drgRouteTables/:drgRouteTableId/actions/removeDrgRouteRules",
"host": [
"{{baseUrl}}"
],
"path": [
"drgRouteTables",
":drgRouteTableId",
"actions",
"removeDrgRouteRules"
],
"variable": [
{
"key": "drgRouteTableId"
}
]
}
},
"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}"
}
]
}