Create Util Library Function

post

/rest/v19/bml/library/functions

This operation creates a new Util Library function.

Request

Supported Media Types
Body ()
Create Util Library.
Root Schema : createUtilibrary-request
Type: object
Show Source
Nested Schema : The library attributes list to add into library
Type: array
Title: The library attributes list to add into library
The attributes list to add into library.
Show Source
Nested Schema : The library functions list to add into library
Type: array
Title: The library functions list to add into library
The library functions list to add into library.
Show Source
Nested Schema : The parameters list to add into library
Type: array
Title: The parameters list to add into library
The parameters list to add into library.
Show Source
Nested Schema : dataType-value
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : libraryFunctions
Type: object
Show Source
Nested Schema : parametersList
Type: object
Show Source
Back to Top

Response

Supported Media Types

Default Response

Create Util Library Response.
Body ()
Root Schema : utilLibrary-response
Type: object
Show Source
Nested Schema : The library attributes list to add into library
Type: array
Title: The library attributes list to add into library
The attributes list to add into library.
Show Source
Nested Schema : The library functions list to add into library
Type: array
Title: The library functions list to add into library
The library functions list to add into library.
Show Source
Nested Schema : The parameters list to add into library
Type: array
Title: The parameters list to add into library
The parameters list to add into library.
Show Source
Nested Schema : dataType-value
Type: object
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : libraryFunctions
Type: object
Show Source
Nested Schema : parametersList
Type: object
Show Source
Back to Top

Examples

The following example shows how to create a new Util Library function by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.

curl -X POST  -H "Authorization: Bearer <token>" -H "Content-type: application/json" -H "Accept: application/json"
https://sitename.oracle.com/rest/v19/bml/library/functions

Request Body Sample

{
  "name": "ConcatString",
  "variableName": "concatString",
  "description": "This function returns a string. The 2 parameters are concatenated and returned to the calling function.",
  "returnType": {
    "value": 1
  },
  "attributes": [],
  "parameters": [{
      "dataType": {
        "value": 2
      },
      "name": "stringOne"
    }, {
      "dataType": {
        "value": 2
      },
      "name": "stringTwo"
    }
  ],
  "libraryFunctions": [],
  "scriptText": "return stringOne + \" \" + stringTwo;"
}

Response Body Sample

{
  "name": "ConcatString",
  "variableName": "concatString",
  "description": "This function returns a string. The 2 parameters are concatenated and returned to the calling function.",
  "folderName": "util",
  "scriptText": "return stringOne + \" \" + stringTwo;",
  "useTestScript": false,
  "returnType": {
    "value": 1,
    "displayValue": "String"
  },
  "parameters": [{
      "name": "stringOne",
      "dataType": {
        "value": 2,
        "displayValue": "String"
      }
    }, {
      "name": "stringTwo",
      "dataType": {
        "value": 2,
        "displayValue": "String"
      }
    }
  ],
  "links": [{
      "rel": "self",
      "href": "https://sitename.oracle.com/cpq/rest/v19/bml/library/functions/concatString"
    }
  ],
  "referencesUrl": "/admin/bmllib/list_rules.jsp?id=3024451356&folder_id=5751277&process_id=-1&doc_id=-1",
  "isReferred": false,
  "isLocked": false,
  "isOverridden": false
}
Back to Top