Update a function
Updates the function with the provided content.
1{2 "creationTimeStamp": "2020-08-04T17:46:19.097Z",3 "modifiedTimeStamp": "2020-08-04T17:47:28.848Z",4 "createdBy": "brmdev",5 "modifiedBy": "brmdev",6 "version": 1,7 "id": "26674236-bc80-41de-954d-d37b1a19d98d",8 "categoryId": "85329ae9-52df-444f-8e18-bffb1a523da7",9 "name": "customadd2",10 "code": "method customAdd2(double a, double b) returns double; return a + b; end;",11 "returnType": "double",12 "signature": [13 {14 "type": "double",15 "name": "a",16 "inOut": false,17 "nameQuoted": false18 },19 {20 "type": "double",21 "name": "b",22 "inOut": false,23 "nameQuoted": false24 }25 ],26 "links": [27 {28 "method": "GET",29 "rel": "self",30 "href": "/businessRules/functions/26674236-bc80-41de-954d-d37b1a19d98d",31 "uri": "/businessRules/functions/26674236-bc80-41de-954d-d37b1a19d98d",32 "type": "application/vnd.sas.business.rule.function"33 },34 {35 "method": "PUT",36 "rel": "update",37 "href": "/businessRules/functions/26674236-bc80-41de-954d-d37b1a19d98d",38 "uri": "/businessRules/functions/26674236-bc80-41de-954d-d37b1a19d98d",39 "type": "application/vnd.sas.business.rule.function"40 },41 {42 "method": "DELETE",43 "rel": "delete",44 "href": "/businessRules/functions/26674236-bc80-41de-954d-d37b1a19d98d",45 "uri": "/businessRules/functions/26674236-bc80-41de-954d-d37b1a19d98d"46 },47 {48 "method": "GET",49 "rel": "up",50 "href": "/businessRules/functions",51 "uri": "/businessRules/functions",52 "type": "application/vnd.sas.collection",53 "itemType": "application/vnd.sas.business.rule.function"54 },55 {56 "method": "GET",57 "rel": "category",58 "href": "/businessRules/functionCategories/85329ae9-52df-444f-8e18-bffb1a523da7",59 "uri": "/businessRules/functionCategories/85329ae9-52df-444f-8e18-bffb1a523da7",60 "type": "application/vnd.sas.business.rule.function.category"61 }62 ],63 "hidden": false,64 "nameQuoted": false65}
Name | Type | Required | Description |
---|---|---|---|
If-Match | string | true | The entity tag from the last time the function was retrieved. Example: "\"kt144a1d\"" |
A reusable DS2 method with additional metadata.
Name | Type | Required | Description |
---|---|---|---|
id | string | false | The system-assigned unique ID for this object. |
name | string | false | A unique name for the function. The name is determined by parsing the method name defined in the function's code. Note that if the method identifier is quoted, this name will NOT include those quotes, but it will match the casing of the name in the code. If the method identifier is unquoted in the code, its name will be folded to lowercase. |
nameQuoted | boolean | false | A boolean indicating if the function's name is quoted in its code. |
hidden | boolean | false | A boolean indicating if the function is hidden or not. |
categoryId | string | true | The ID of the function's parent category. This can be changed during an update to the function in order to move the function into a different category. |
description | string | false | A description of the function. |
code | string | true | The DS2 function implementation, starting with the |
returnType | string | false | The type returned from the function is specified after the |
signature | array [Function Signature Term] | false | An ordered array of the input parameters to the function determined by parsing the function's code. |
createdBy | string | false | The user who created the function. |
creationTimeStamp | string<date-time> | false | The data and time at which the function was created. |
modifiedBy | string | false | The user who made the last modification to the function. |
modifiedTimeStamp | string<date-time> | false | The date and time at which the function was last modified. |
testCustomContextUri | string | false | The URI of a Custom Context DS2 code file that provides a custom context to this function. Normally, this function's custom context is provided by the decision that utimately utilizes it. For syntax validation purpose, you can specify a testing-only custom context. |
links | array [Link] | false | Zero or more links to related resources or operations. |
version | integer | false | This media type's schema version number. This representation is version 1. |
Status | Meaning | Description | ||
---|---|---|---|---|
200 | OK | The function was updated. | Headers | Schema |
400 | Bad Request | The request was invalid. | Schema | |
404 | Not Found | No resource exists at the requested path. | Schema | |
412 | Precondition Failed | The `If-Match` header did not match the resource's entity tag. | Schema | |
428 | Precondition Required | The request headers did not include the `If-Match` precondition. | Schema |