> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# segment-functions

> Segment Functions — manage functions, plugins, API usage, deletions, and audit trail

**Server path:** `/segment-functions` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                                                                              | Description                          |
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| [`segment_functions_create_cloud_source_regulation`](#segment_functions_create_cloud_source_regulation)           | Create Cloud Source Regulation       |
| [`segment_functions_create_function`](#segment_functions_create_function)                                         | Create Function                      |
| [`segment_functions_create_function_deployment`](#segment_functions_create_function_deployment)                   | Create Function Deployment           |
| [`segment_functions_create_insert_function_instance`](#segment_functions_create_insert_function_instance)         | Create Insert Function Instance      |
| [`segment_functions_create_live_plugin`](#segment_functions_create_live_plugin)                                   | Create Live Plugin                   |
| [`segment_functions_create_source_regulation`](#segment_functions_create_source_regulation)                       | Create Source Regulation             |
| [`segment_functions_create_workspace_regulation`](#segment_functions_create_workspace_regulation)                 | Create Workspace Regulation          |
| [`segment_functions_delete_function`](#segment_functions_delete_function)                                         | Delete Function                      |
| [`segment_functions_delete_insert_function_instance`](#segment_functions_delete_insert_function_instance)         | Delete Insert Function Instance      |
| [`segment_functions_delete_live_plugin_code`](#segment_functions_delete_live_plugin_code)                         | Delete Live Plugin Code              |
| [`segment_functions_get_daily_per_source_apicalls_usage`](#segment_functions_get_daily_per_source_apicalls_usage) | Get Daily Per Source API Calls Usage |
| [`segment_functions_get_daily_per_source_mtuusage`](#segment_functions_get_daily_per_source_mtuusage)             | Get Daily Per Source MTU Usage       |
| [`segment_functions_get_daily_workspace_apicalls_usage`](#segment_functions_get_daily_workspace_apicalls_usage)   | Get Daily Workspace API Calls Usage  |
| [`segment_functions_get_daily_workspace_mtuusage`](#segment_functions_get_daily_workspace_mtuusage)               | Get Daily Workspace MTU Usage        |
| [`segment_functions_get_function`](#segment_functions_get_function)                                               | Get Function                         |
| [`segment_functions_get_function_version`](#segment_functions_get_function_version)                               | Get Function Version                 |
| [`segment_functions_get_insert_function_instance`](#segment_functions_get_insert_function_instance)               | Get Insert Function Instance         |
| [`segment_functions_get_latest_from_live_plugins`](#segment_functions_get_latest_from_live_plugins)               | Get Latest from Live Plugins         |
| [`segment_functions_get_regulation`](#segment_functions_get_regulation)                                           | Get Regulation                       |
| [`segment_functions_list_audit_events`](#segment_functions_list_audit_events)                                     | List Audit Events                    |
| [`segment_functions_list_function_versions`](#segment_functions_list_function_versions)                           | List Function Versions               |
| [`segment_functions_list_functions`](#segment_functions_list_functions)                                           | List Functions                       |
| [`segment_functions_list_insert_function_instances`](#segment_functions_list_insert_function_instances)           | List Insert Function Instances       |
| [`segment_functions_list_regulations_from_source`](#segment_functions_list_regulations_from_source)               | List Regulations from Source         |
| [`segment_functions_list_suppressions`](#segment_functions_list_suppressions)                                     | List Suppressions                    |
| [`segment_functions_list_workspace_regulations`](#segment_functions_list_workspace_regulations)                   | List Workspace Regulations           |
| [`segment_functions_restore_function_version`](#segment_functions_restore_function_version)                       | Restore Function Version             |
| [`segment_functions_update_function`](#segment_functions_update_function)                                         | Update Function                      |
| [`segment_functions_update_insert_function_instance`](#segment_functions_update_insert_function_instance)         | Update Insert Function Instance      |

***

## segment\_functions\_create\_cloud\_source\_regulation

Create Cloud Source Regulation

**Parameters:**

| Parameter        | Type      | Required | Default | Description                                                                                                                     |
| ---------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `sourceId`       | string    | Yes      | —       | Source Id                                                                                                                       |
| `collection`     | string    | Yes      | —       | The Cloud Source collection to regulate.                                                                                        |
| `regulationType` | string    | Yes      | —       | The regulation type to create.                                                                                                  |
| `subjectIds`     | string\[] | Yes      | —       | The list of `userId` or `objectId` values of the subjects to regulate.  Config API note: equal to `parent` but allows an array. |
| `subjectType`    | string    | Yes      | —       | The subject type. Must be `objectId` for Cloud Sources.                                                                         |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "sourceId": {
        "type": "string",
        "description": "Source Id"
      },
      "collection": {
        "type": "string",
        "description": "The Cloud Source collection to regulate."
      },
      "regulationType": {
        "type": "string",
        "description": "The regulation type to create.",
        "enum": [
          "DELETE_INTERNAL",
          "DELETE_ONLY",
          "SUPPRESS_ONLY",
          "SUPPRESS_WITH_DELETE",
          "SUPPRESS_WITH_DELETE_INTERNAL",
          "UNSUPPRESS"
        ]
      },
      "subjectIds": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The list of `userId` or `objectId` values of the subjects to regulate.  Config API note: equal to `parent` but allows an array."
      },
      "subjectType": {
        "type": "string",
        "description": "The subject type. Must be `objectId` for Cloud Sources.",
        "enum": [
          "OBJECT_ID"
        ]
      }
    },
    "required": [
      "PCID",
      "sourceId",
      "collection",
      "regulationType",
      "subjectIds",
      "subjectType"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_create\_function

Create Function

**Parameters:**

| Parameter      | Type      | Required | Default | Description                                                                                                  |
| -------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------ |
| `code`         | string    | Yes      | —       | The Function code.                                                                                           |
| `description`  | string    | No       | —       | A description for this Function.                                                                             |
| `displayName`  | string    | Yes      | —       | A display name for this Function.  Note that Destination Functions append the Workspace to the display name. |
| `logoUrl`      | string    | No       | —       | The URL of the logo for this Function.                                                                       |
| `resourceType` | string    | Yes      | —       | The Function type.  Config API note: equal to `type`.                                                        |
| `settings`     | object\[] | No       | —       | The list of settings for this Function.                                                                      |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "code": {
        "type": "string",
        "description": "The Function code."
      },
      "description": {
        "type": "string",
        "description": "A description for this Function."
      },
      "displayName": {
        "type": "string",
        "description": "A display name for this Function.  Note that Destination Functions append the Workspace to the display name."
      },
      "logoUrl": {
        "type": "string",
        "description": "The URL of the logo for this Function."
      },
      "resourceType": {
        "type": "string",
        "description": "The Function type.  Config API note: equal to `type`.",
        "enum": [
          "DESTINATION",
          "INSERT_DESTINATION",
          "INSERT_SOURCE",
          "INSERT_TRANSFORMATION",
          "SOURCE"
        ]
      },
      "settings": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of this Function Setting."
            },
            "label": {
              "type": "string",
              "description": "The label for this Function Setting."
            },
            "description": {
              "type": "string",
              "description": "A description of this Function Setting."
            },
            "type": {
              "type": "string",
              "enum": [
                "ARRAY",
                "BOOLEAN",
                "STRING",
                "TEXT_MAP"
              ],
              "description": "The type of this Function Setting."
            },
            "required": {
              "type": "boolean",
              "description": "Whether this Function Setting is required."
            },
            "sensitive": {
              "type": "boolean",
              "description": "Whether this Function Setting contains sensitive information."
            }
          },
          "required": [
            "description",
            "label",
            "name",
            "required",
            "sensitive",
            "type"
          ]
        },
        "description": "The list of settings for this Function."
      }
    },
    "required": [
      "PCID",
      "code",
      "displayName",
      "resourceType"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_create\_function\_deployment

Create Function Deployment

**Parameters:**

| Parameter    | Type   | Required | Default | Description |
| ------------ | ------ | -------- | ------- | ----------- |
| `functionId` | string | Yes      | —       | Function Id |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "functionId": {
        "type": "string",
        "description": "Function Id"
      }
    },
    "required": [
      "PCID",
      "functionId"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_create\_insert\_function\_instance

Create Insert Function Instance

**Parameters:**

| Parameter       | Type    | Required | Default | Description                                                                                                                    |
| --------------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `enabled`       | boolean | No       | —       | Whether this insert Function instance should be enabled for the Destination.                                                   |
| `functionId`    | string  | Yes      | —       | Insert Function id to which this instance is associated.  Note: Remove the ifnd\_/ifns\_ prefix from the id.                   |
| `integrationId` | string  | Yes      | —       | The Source or Destination id to be connected.                                                                                  |
| `name`          | string  | Yes      | —       | Defines the display name of the insert Function instance.                                                                      |
| `settings`      | object  | Yes      | —       | An object that contains settings for this insert Function instance based on the settings present in the insert Function class. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "enabled": {
        "type": "boolean",
        "description": "Whether this insert Function instance should be enabled for the Destination."
      },
      "functionId": {
        "type": "string",
        "description": "Insert Function id to which this instance is associated.  Note: Remove the ifnd_/ifns_ prefix from the id."
      },
      "integrationId": {
        "type": "string",
        "description": "The Source or Destination id to be connected."
      },
      "name": {
        "type": "string",
        "description": "Defines the display name of the insert Function instance."
      },
      "settings": {
        "type": "object",
        "description": "An object that contains settings for this insert Function instance based on the settings present in the insert Function class."
      }
    },
    "required": [
      "PCID",
      "functionId",
      "integrationId",
      "name",
      "settings"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_create\_live\_plugin

Create Live Plugin

**Parameters:**

| Parameter  | Type   | Required | Default | Description                          |
| ---------- | ------ | -------- | ------- | ------------------------------------ |
| `sourceId` | string | Yes      | —       | Source Id                            |
| `code`     | string | Yes      | —       | The Live Plugin code to be uploaded. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "sourceId": {
        "type": "string",
        "description": "Source Id"
      },
      "code": {
        "type": "string",
        "description": "The Live Plugin code to be uploaded."
      }
    },
    "required": [
      "PCID",
      "sourceId",
      "code"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_create\_source\_regulation

Create Source Regulation

**Parameters:**

| Parameter        | Type      | Required | Default | Description                                                                                                                                                                                   |
| ---------------- | --------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sourceId`       | string    | Yes      | —       | Source Id                                                                                                                                                                                     |
| `regulationType` | string    | Yes      | —       | The regulation type to create. Please note that `DELETE_ARCHIVE_ONLY` is only supported for limited Workspaces for Source-scoped regulations.                                                 |
| `subjectIds`     | string\[] | Yes      | —       | The list of `userId` or `objectId` or `anonymousId` values of the subjects to regulate.  Config API note: equal to `parent` but allows an array.                                              |
| `subjectType`    | string    | Yes      | —       | The subject type. Note: `ANONYMOUS_ID` is only supported for limited Workspaces for Source-scoped regulations. `ANONYMOUS_ID` is only supported when regulationType is `DELETE_ARCHIVE_ONLY`. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "sourceId": {
        "type": "string",
        "description": "Source Id"
      },
      "regulationType": {
        "type": "string",
        "description": "The regulation type to create. Please note that `DELETE_ARCHIVE_ONLY` is only supported for limited Workspaces for Source-scoped regulations.",
        "enum": [
          "DELETE_ARCHIVE_ONLY",
          "DELETE_INTERNAL",
          "DELETE_ONLY",
          "SUPPRESS_ONLY",
          "SUPPRESS_WITH_DELETE",
          "SUPPRESS_WITH_DELETE_INTERNAL",
          "UNSUPPRESS"
        ]
      },
      "subjectIds": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The list of `userId` or `objectId` or `anonymousId` values of the subjects to regulate.  Config API note: equal to `parent` but allows an array."
      },
      "subjectType": {
        "type": "string",
        "description": "The subject type. Note: `ANONYMOUS_ID` is only supported for limited Workspaces for Source-scoped regulations. `ANONYMOUS_ID` is only supported when regulationType is `DELETE_ARCHIVE_ONLY`.",
        "enum": [
          "ANONYMOUS_ID",
          "USER_ID"
        ]
      }
    },
    "required": [
      "PCID",
      "sourceId",
      "regulationType",
      "subjectIds",
      "subjectType"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_create\_workspace\_regulation

Create Workspace Regulation

**Parameters:**

| Parameter        | Type      | Required | Default | Description                                                                                                                     |
| ---------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `regulationType` | string    | Yes      | —       | The regulation type to create.                                                                                                  |
| `subjectIds`     | string\[] | Yes      | —       | The list of `userId` or `objectId` values of the subjects to regulate.  Config API note: equal to `parent` but allows an array. |
| `subjectType`    | string    | Yes      | —       | The subject type. Use `objectId` for Cloud Source regulations.                                                                  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "regulationType": {
        "type": "string",
        "description": "The regulation type to create.",
        "enum": [
          "DELETE_INTERNAL",
          "DELETE_ONLY",
          "SUPPRESS_ONLY",
          "SUPPRESS_WITH_DELETE",
          "SUPPRESS_WITH_DELETE_INTERNAL",
          "UNSUPPRESS"
        ]
      },
      "subjectIds": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The list of `userId` or `objectId` values of the subjects to regulate.  Config API note: equal to `parent` but allows an array."
      },
      "subjectType": {
        "type": "string",
        "description": "The subject type. Use `objectId` for Cloud Source regulations.",
        "enum": [
          "OBJECT_ID",
          "USER_ID"
        ]
      }
    },
    "required": [
      "PCID",
      "regulationType",
      "subjectIds",
      "subjectType"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_delete\_function

Delete Function

**Parameters:**

| Parameter    | Type   | Required | Default | Description |
| ------------ | ------ | -------- | ------- | ----------- |
| `functionId` | string | Yes      | —       | Function Id |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "functionId": {
        "type": "string",
        "description": "Function Id"
      }
    },
    "required": [
      "PCID",
      "functionId"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_delete\_insert\_function\_instance

Delete Insert Function Instance

**Parameters:**

| Parameter    | Type   | Required | Default | Description |
| ------------ | ------ | -------- | ------- | ----------- |
| `instanceId` | string | Yes      | —       | Instance Id |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "instanceId": {
        "type": "string",
        "description": "Instance Id"
      }
    },
    "required": [
      "PCID",
      "instanceId"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_delete\_live\_plugin\_code

Delete Live Plugin Code

**Parameters:**

| Parameter  | Type   | Required | Default | Description |
| ---------- | ------ | -------- | ------- | ----------- |
| `sourceId` | string | Yes      | —       | Source Id   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "sourceId": {
        "type": "string",
        "description": "Source Id"
      }
    },
    "required": [
      "PCID",
      "sourceId"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_get\_daily\_per\_source\_apicalls\_usage

Get Daily Per Source API Calls Usage

**Parameters:**

| Parameter    | Type   | Required | Default | Description                                                                        |
| ------------ | ------ | -------- | ------- | ---------------------------------------------------------------------------------- |
| `period`     | string | Yes      | —       | The start of the usage month in the ISO-8601 format.  This parameter exists in v1. |
| `pagination` | object | No       | —       | Pagination input for per Source API calls counts.  This parameter exists in v1.    |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "period": {
        "type": "string",
        "description": "The start of the usage month in the ISO-8601 format.  This parameter exists in v1."
      },
      "pagination": {
        "type": "object",
        "description": "Pagination input for per Source API calls counts.  This parameter exists in v1.",
        "properties": {
          "cursor": {
            "type": "string",
            "description": "The page to request.  Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys.  Consumers of the API must treat this value as opaque."
          },
          "count": {
            "type": "integer",
            "description": "The number of items to retrieve in a page, between 1 and 1000."
          }
        },
        "required": [
          "count"
        ]
      }
    },
    "required": [
      "PCID",
      "period"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_get\_daily\_per\_source\_mtuusage

Get Daily Per Source MTU Usage

**Parameters:**

| Parameter    | Type   | Required | Default | Description                                                                         |
| ------------ | ------ | -------- | ------- | ----------------------------------------------------------------------------------- |
| `period`     | string | Yes      | —       | The start of the usage month, in the ISO-8601 format.  This parameter exists in v1. |
| `pagination` | object | No       | —       | Pagination input for per Source MTU counts.  This parameter exists in v1.           |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "period": {
        "type": "string",
        "description": "The start of the usage month, in the ISO-8601 format.  This parameter exists in v1."
      },
      "pagination": {
        "type": "object",
        "description": "Pagination input for per Source MTU counts.  This parameter exists in v1.",
        "properties": {
          "cursor": {
            "type": "string",
            "description": "The page to request.  Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys.  Consumers of the API must treat this value as opaque."
          },
          "count": {
            "type": "integer",
            "description": "The number of items to retrieve in a page, between 1 and 1000."
          }
        },
        "required": [
          "count"
        ]
      }
    },
    "required": [
      "PCID",
      "period"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_get\_daily\_workspace\_apicalls\_usage

Get Daily Workspace API Calls Usage

**Parameters:**

| Parameter    | Type   | Required | Default | Description                                                                        |
| ------------ | ------ | -------- | ------- | ---------------------------------------------------------------------------------- |
| `period`     | string | Yes      | —       | The start of the usage month in the ISO-8601 format.  This parameter exists in v1. |
| `pagination` | object | No       | —       | Pagination input for Workspace API call counts.  This parameter exists in v1.      |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "period": {
        "type": "string",
        "description": "The start of the usage month in the ISO-8601 format.  This parameter exists in v1."
      },
      "pagination": {
        "type": "object",
        "description": "Pagination input for Workspace API call counts.  This parameter exists in v1.",
        "properties": {
          "cursor": {
            "type": "string",
            "description": "The page to request.  Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys.  Consumers of the API must treat this value as opaque."
          },
          "count": {
            "type": "integer",
            "description": "The number of items to retrieve in a page, between 1 and 1000."
          }
        },
        "required": [
          "count"
        ]
      }
    },
    "required": [
      "PCID",
      "period"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_get\_daily\_workspace\_mtuusage

Get Daily Workspace MTU Usage

**Parameters:**

| Parameter    | Type   | Required | Default | Description                                                                         |
| ------------ | ------ | -------- | ------- | ----------------------------------------------------------------------------------- |
| `period`     | string | Yes      | —       | The start of the usage month, in the ISO-8601 format.  This parameter exists in v1. |
| `pagination` | object | No       | —       | Pagination input for Workspace MTU counts.  This parameter exists in v1.            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "period": {
        "type": "string",
        "description": "The start of the usage month, in the ISO-8601 format.  This parameter exists in v1."
      },
      "pagination": {
        "type": "object",
        "description": "Pagination input for Workspace MTU counts.  This parameter exists in v1.",
        "properties": {
          "cursor": {
            "type": "string",
            "description": "The page to request.  Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys.  Consumers of the API must treat this value as opaque."
          },
          "count": {
            "type": "integer",
            "description": "The number of items to retrieve in a page, between 1 and 1000."
          }
        },
        "required": [
          "count"
        ]
      }
    },
    "required": [
      "PCID",
      "period"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_get\_function

Get Function

**Parameters:**

| Parameter    | Type   | Required | Default | Description |
| ------------ | ------ | -------- | ------- | ----------- |
| `functionId` | string | Yes      | —       | Function Id |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "functionId": {
        "type": "string",
        "description": "Function Id"
      }
    },
    "required": [
      "PCID",
      "functionId"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_get\_function\_version

Get Function Version

**Parameters:**

| Parameter    | Type   | Required | Default | Description |
| ------------ | ------ | -------- | ------- | ----------- |
| `functionId` | string | Yes      | —       | Function Id |
| `versionId`  | string | Yes      | —       | Version Id  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "functionId": {
        "type": "string",
        "description": "Function Id"
      },
      "versionId": {
        "type": "string",
        "description": "Version Id"
      }
    },
    "required": [
      "PCID",
      "functionId",
      "versionId"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_get\_insert\_function\_instance

Get Insert Function Instance

**Parameters:**

| Parameter    | Type   | Required | Default | Description |
| ------------ | ------ | -------- | ------- | ----------- |
| `instanceId` | string | Yes      | —       | Instance Id |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "instanceId": {
        "type": "string",
        "description": "Instance Id"
      }
    },
    "required": [
      "PCID",
      "instanceId"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_get\_latest\_from\_live\_plugins

Get Latest from Live Plugins

**Parameters:**

| Parameter  | Type   | Required | Default | Description |
| ---------- | ------ | -------- | ------- | ----------- |
| `sourceId` | string | Yes      | —       | Source Id   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "sourceId": {
        "type": "string",
        "description": "Source Id"
      }
    },
    "required": [
      "PCID",
      "sourceId"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_get\_regulation

Get Regulation

**Parameters:**

| Parameter    | Type   | Required | Default | Description |
| ------------ | ------ | -------- | ------- | ----------- |
| `regulateId` | string | Yes      | —       | Regulate Id |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "regulateId": {
        "type": "string",
        "description": "Regulate Id"
      }
    },
    "required": [
      "PCID",
      "regulateId"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_list\_audit\_events

List Audit Events

**Parameters:**

| Parameter      | Type   | Required | Default | Description                                                                                                                                                       |
| -------------- | ------ | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `startTime`    | string | No       | —       | Filter response to events that happened after this time.  This parameter exists in v1.                                                                            |
| `endTime`      | string | No       | —       | Filter response to events that happened before this time. Defaults to the current time, or the end time from the pagination cursor.  This parameter exists in v1. |
| `resourceId`   | string | No       | —       | Filter response to events that affect a specific resource, for example, a single Source.  This parameter exists in v1.                                            |
| `resourceType` | string | No       | —       | Filter response to events that affect a specific type, for example, Sources, Warehouses, and Tracking Plans.  This parameter exists in v1.                        |
| `pagination`   | object | No       | —       | Defines the pagination parameters.  This parameter exists in v1.                                                                                                  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "startTime": {
        "type": "string",
        "description": "Filter response to events that happened after this time.  This parameter exists in v1."
      },
      "endTime": {
        "type": "string",
        "description": "Filter response to events that happened before this time. Defaults to the current time, or the end time from the pagination cursor.  This parameter exists in v1."
      },
      "resourceId": {
        "type": "string",
        "description": "Filter response to events that affect a specific resource, for example, a single Source.  This parameter exists in v1."
      },
      "resourceType": {
        "type": "string",
        "description": "Filter response to events that affect a specific type, for example, Sources, Warehouses, and Tracking Plans.  This parameter exists in v1."
      },
      "pagination": {
        "type": "object",
        "description": "Defines the pagination parameters.  This parameter exists in v1.",
        "properties": {
          "cursor": {
            "type": "string",
            "description": "The page to request.  Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys.  Consumers of the API must treat this value as opaque."
          },
          "count": {
            "type": "integer",
            "description": "The number of items to retrieve in a page, between 1 and 1000."
          }
        },
        "required": [
          "count"
        ]
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_list\_function\_versions

List Function Versions

**Parameters:**

| Parameter    | Type   | Required | Default | Description                                             |
| ------------ | ------ | -------- | ------- | ------------------------------------------------------- |
| `functionId` | string | Yes      | —       | Function Id                                             |
| `pagination` | object | No       | —       | Pagination parameters.  This parameter exists in alpha. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "functionId": {
        "type": "string",
        "description": "Function Id"
      },
      "pagination": {
        "type": "object",
        "description": "Pagination parameters.  This parameter exists in alpha.",
        "properties": {
          "cursor": {
            "type": "string",
            "description": "The page to request.  Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys.  Consumers of the API must treat this value as opaque."
          },
          "count": {
            "type": "integer",
            "description": "The number of items to retrieve in a page, between 1 and 1000."
          }
        },
        "required": [
          "count"
        ]
      }
    },
    "required": [
      "PCID",
      "functionId"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_list\_functions

List Functions

**Parameters:**

| Parameter      | Type   | Required | Default | Description                                                                         |
| -------------- | ------ | -------- | ------- | ----------------------------------------------------------------------------------- |
| `pagination`   | object | No       | —       | Pagination parameters.  This parameter exists in v1.                                |
| `resourceType` | string | Yes      | —       | The Function type.  Config API note: equal to `type`.  This parameter exists in v1. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "pagination": {
        "type": "object",
        "description": "Pagination parameters.  This parameter exists in v1.",
        "properties": {
          "cursor": {
            "type": "string",
            "description": "The page to request.  Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys.  Consumers of the API must treat this value as opaque."
          },
          "count": {
            "type": "integer",
            "description": "The number of items to retrieve in a page, between 1 and 1000."
          }
        },
        "required": [
          "count"
        ]
      },
      "resourceType": {
        "type": "string",
        "description": "The Function type.  Config API note: equal to `type`.  This parameter exists in v1.",
        "enum": [
          "DESTINATION",
          "INSERT_DESTINATION",
          "INSERT_SOURCE",
          "INSERT_TRANSFORMATION",
          "SOURCE"
        ]
      }
    },
    "required": [
      "PCID",
      "resourceType"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_list\_insert\_function\_instances

List Insert Function Instances

**Parameters:**

| Parameter    | Type   | Required | Default | Description                                                              |
| ------------ | ------ | -------- | ------- | ------------------------------------------------------------------------ |
| `pagination` | object | No       | —       | Pagination parameters.  This parameter exists in alpha.                  |
| `functionId` | string | Yes      | —       | The insert Function class id to lookup.  This parameter exists in alpha. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "pagination": {
        "type": "object",
        "description": "Pagination parameters.  This parameter exists in alpha.",
        "properties": {
          "cursor": {
            "type": "string",
            "description": "The page to request.  Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys.  Consumers of the API must treat this value as opaque."
          },
          "count": {
            "type": "integer",
            "description": "The number of items to retrieve in a page, between 1 and 1000."
          }
        },
        "required": [
          "count"
        ]
      },
      "functionId": {
        "type": "string",
        "description": "The insert Function class id to lookup.  This parameter exists in alpha."
      }
    },
    "required": [
      "PCID",
      "functionId"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_list\_regulations\_from\_source

List Regulations from Source

**Parameters:**

| Parameter         | Type      | Required | Default | Description                                                                                 |
| ----------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------- |
| `sourceId`        | string    | Yes      | —       | Source Id                                                                                   |
| `status`          | string    | No       | —       | The status on which to filter returned regulations.  This parameter exists in v1.           |
| `regulationTypes` | string\[] | No       | —       | The regulation types on which to filter returned regulations.  This parameter exists in v1. |
| `pagination`      | object    | No       | —       | Pagination parameters.  This parameter exists in v1.                                        |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "sourceId": {
        "type": "string",
        "description": "Source Id"
      },
      "status": {
        "type": "string",
        "description": "The status on which to filter returned regulations.  This parameter exists in v1.",
        "enum": [
          "FAILED",
          "FINISHED",
          "INITIALIZED",
          "INVALID",
          "NOT_SUPPORTED",
          "PARTIAL_SUCCESS",
          "RUNNING"
        ]
      },
      "regulationTypes": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "DELETE_ARCHIVE_ONLY",
            "DELETE_INTERNAL",
            "DELETE_ONLY",
            "SUPPRESS_ONLY",
            "SUPPRESS_WITH_DELETE",
            "SUPPRESS_WITH_DELETE_INTERNAL",
            "UNSUPPRESS"
          ]
        },
        "description": "The regulation types on which to filter returned regulations.  This parameter exists in v1."
      },
      "pagination": {
        "type": "object",
        "description": "Pagination parameters.  This parameter exists in v1.",
        "properties": {
          "cursor": {
            "type": "string",
            "description": "The page to request.  Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys.  Consumers of the API must treat this value as opaque."
          },
          "count": {
            "type": "integer",
            "description": "The number of items to retrieve in a page, between 1 and 1000."
          }
        },
        "required": [
          "count"
        ]
      }
    },
    "required": [
      "PCID",
      "sourceId"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_list\_suppressions

List Suppressions

**Parameters:**

| Parameter    | Type   | Required | Default | Description                                          |
| ------------ | ------ | -------- | ------- | ---------------------------------------------------- |
| `pagination` | object | No       | —       | Pagination parameters.  This parameter exists in v1. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "pagination": {
        "type": "object",
        "description": "Pagination parameters.  This parameter exists in v1.",
        "properties": {
          "cursor": {
            "type": "string",
            "description": "The page to request.  Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys.  Consumers of the API must treat this value as opaque."
          },
          "count": {
            "type": "integer",
            "description": "The number of items to retrieve in a page, between 1 and 1000."
          }
        },
        "required": [
          "count"
        ]
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_list\_workspace\_regulations

List Workspace Regulations

**Parameters:**

| Parameter         | Type      | Required | Default | Description                                                                                 |
| ----------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------- |
| `status`          | string    | No       | —       | The status on which to filter the returned regulations.  This parameter exists in v1.       |
| `regulationTypes` | string\[] | No       | —       | The regulation types on which to filter returned regulations.  This parameter exists in v1. |
| `pagination`      | object    | No       | —       | Pagination parameters.  This parameter exists in v1.                                        |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "status": {
        "type": "string",
        "description": "The status on which to filter the returned regulations.  This parameter exists in v1.",
        "enum": [
          "FAILED",
          "FINISHED",
          "INITIALIZED",
          "INVALID",
          "NOT_SUPPORTED",
          "PARTIAL_SUCCESS",
          "RUNNING"
        ]
      },
      "regulationTypes": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "DELETE_INTERNAL",
            "DELETE_ONLY",
            "SUPPRESS_ONLY",
            "SUPPRESS_WITH_DELETE",
            "SUPPRESS_WITH_DELETE_INTERNAL",
            "UNSUPPRESS"
          ]
        },
        "description": "The regulation types on which to filter returned regulations.  This parameter exists in v1."
      },
      "pagination": {
        "type": "object",
        "description": "Pagination parameters.  This parameter exists in v1.",
        "properties": {
          "cursor": {
            "type": "string",
            "description": "The page to request.  Acceptable values to use here are in PaginationOutput objects, in the `current`, `next`, and `previous` keys.  Consumers of the API must treat this value as opaque."
          },
          "count": {
            "type": "integer",
            "description": "The number of items to retrieve in a page, between 1 and 1000."
          }
        },
        "required": [
          "count"
        ]
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_restore\_function\_version

Restore Function Version

**Parameters:**

| Parameter    | Type   | Required | Default | Description                     |
| ------------ | ------ | -------- | ------- | ------------------------------- |
| `functionId` | string | Yes      | —       | Function Id                     |
| `versionId`  | string | Yes      | —       | An identifier for this version. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "functionId": {
        "type": "string",
        "description": "Function Id"
      },
      "versionId": {
        "type": "string",
        "description": "An identifier for this version."
      }
    },
    "required": [
      "PCID",
      "functionId",
      "versionId"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_update\_function

Update Function

**Parameters:**

| Parameter     | Type      | Required | Default | Description                             |
| ------------- | --------- | -------- | ------- | --------------------------------------- |
| `functionId`  | string    | Yes      | —       | Function Id                             |
| `code`        | string    | No       | —       | The Function code.                      |
| `description` | string    | No       | —       | A description for this Function.        |
| `displayName` | string    | No       | —       | A display name for this Function.       |
| `logoUrl`     | string    | No       | —       | A logo for this Function.               |
| `settings`    | object\[] | No       | —       | The list of settings for this Function. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "functionId": {
        "type": "string",
        "description": "Function Id"
      },
      "code": {
        "type": "string",
        "description": "The Function code."
      },
      "description": {
        "type": "string",
        "description": "A description for this Function."
      },
      "displayName": {
        "type": "string",
        "description": "A display name for this Function."
      },
      "logoUrl": {
        "type": "string",
        "description": "A logo for this Function."
      },
      "settings": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of this Function Setting."
            },
            "label": {
              "type": "string",
              "description": "The label for this Function Setting."
            },
            "description": {
              "type": "string",
              "description": "A description of this Function Setting."
            },
            "type": {
              "type": "string",
              "enum": [
                "ARRAY",
                "BOOLEAN",
                "STRING",
                "TEXT_MAP"
              ],
              "description": "The type of this Function Setting."
            },
            "required": {
              "type": "boolean",
              "description": "Whether this Function Setting is required."
            },
            "sensitive": {
              "type": "boolean",
              "description": "Whether this Function Setting contains sensitive information."
            }
          },
          "required": [
            "description",
            "label",
            "name",
            "required",
            "sensitive",
            "type"
          ]
        },
        "description": "The list of settings for this Function."
      }
    },
    "required": [
      "PCID",
      "functionId"
    ]
  }
  ```
</Expandable>

***

## segment\_functions\_update\_insert\_function\_instance

Update Insert Function Instance

**Parameters:**

| Parameter    | Type    | Required | Default | Description                                                                                                                    |
| ------------ | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `instanceId` | string  | Yes      | —       | Instance Id                                                                                                                    |
| `enabled`    | boolean | No       | —       | Whether this insert Function instance should be enabled for the Destination.                                                   |
| `name`       | string  | No       | —       | Defines the display name of the insert Function instance.                                                                      |
| `settings`   | object  | No       | —       | An object that contains settings for this insert Function instance based on the settings present in the insert Function class. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "instanceId": {
        "type": "string",
        "description": "Instance Id"
      },
      "enabled": {
        "type": "boolean",
        "description": "Whether this insert Function instance should be enabled for the Destination."
      },
      "name": {
        "type": "string",
        "description": "Defines the display name of the insert Function instance."
      },
      "settings": {
        "type": "object",
        "description": "An object that contains settings for this insert Function instance based on the settings present in the insert Function class."
      }
    },
    "required": [
      "PCID",
      "instanceId"
    ]
  }
  ```
</Expandable>
