Skip to content

Instantly share code, notes, and snippets.

@damithsj
Last active November 6, 2024 23:56
Show Gist options
  • Save damithsj/ac163372a9a45996b55b1d923e9dc757 to your computer and use it in GitHub Desktop.
Save damithsj/ac163372a9a45996b55b1d923e9dc757 to your computer and use it in GitHub Desktop.
Sample IFS Cloud outbound REST API request
DECLARE
json_ CLOB;
message_id_ NUMBER;
url_params_ PLSQLAP_DOCUMENT_API.DOCUMENT;
BEGIN
json_ := '
{
"TestAttr1": "TestValue1"
}';
-- To match this request, set the Rest Root Endpoint URL as https://yourrooturl/{parameter1}/{parameter2}
url_params_ := ifsapp.Plsqlap_Document_API.New_Document('URL_PARAMETERS');
PLSQLAP_DOCUMENT_API.Add_Attribute(url_params_,'parameter1', 'post');
PLSQLAP_DOCUMENT_API.Add_Attribute(url_params_,'parameter2', 'document');
Plsql_Rest_Sender_API.Call_Rest_EndPoint_Json(rest_service_ => 'TEST_SYSTEM',
json_ => json_,
message_id_ => message_id_,
url_params_ => url_params_,
http_method_ => 'POST',
http_req_headers_ => 'accept:*/*, customheader1:value1, customheader2:value2',
subject_ => 'Test system integration');
COMMIT;
END;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment