Skip to main content
POST
/
api
/
v1
/
user-defined-functions
CreateUserDefinedFunction
curl --request POST \
  --url https://your-sift-api-url.com/api/v1/user-defined-functions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "expression": "<string>",
  "functionInputs": [
    {
      "identifier": "<string>",
      "dataType": "FUNCTION_DATA_TYPE_UNSPECIFIED",
      "constant": true
    }
  ],
  "userNotes": "<string>",
  "metadata": [
    {
      "key": {
        "name": "<string>",
        "type": "METADATA_KEY_TYPE_UNSPECIFIED",
        "archivedDate": "2023-11-07T05:31:56Z"
      },
      "stringValue": "<string>",
      "numberValue": 123,
      "booleanValue": true,
      "archivedDate": "2023-11-07T05:31:56Z"
    }
  ]
}'
{
  "userDefinedFunction": {
    "userDefinedFunctionId": "<string>",
    "name": "<string>",
    "archivedDate": "2023-11-07T05:31:56Z",
    "userDefinedFunctionVersionId": "<string>",
    "version": 123,
    "description": "<string>",
    "changeMessage": "<string>",
    "userNotes": "<string>",
    "expression": "<string>",
    "functionInputs": [
      {
        "identifier": "<string>",
        "dataType": "FUNCTION_DATA_TYPE_UNSPECIFIED",
        "constant": true
      }
    ],
    "functionOutputType": "FUNCTION_DATA_TYPE_UNSPECIFIED",
    "functionDependencies": [
      {
        "userDefinedFunctionVersionId": "<string>"
      }
    ],
    "createdDate": "2023-11-07T05:31:56Z",
    "modifiedDate": "2023-11-07T05:31:56Z",
    "createdByUserId": "<string>",
    "modifiedByUserId": "<string>",
    "metadata": [
      {
        "key": {
          "name": "<string>",
          "type": "METADATA_KEY_TYPE_UNSPECIFIED",
          "archivedDate": "2023-11-07T05:31:56Z"
        },
        "stringValue": "<string>",
        "numberValue": 123,
        "booleanValue": true,
        "archivedDate": "2023-11-07T05:31:56Z"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
expression
string
required
functionInputs
object[]
required
metadata
object[]
required
description
string
userNotes
string

Response

A successful response.

userDefinedFunction
object
required