---
title: DaVinci Admin Variables
description: The PingOne DaVinci Admin Variables service provides endpoints to create, read, update, and delete DaVinci variables. Variables are values that can be read and modified during a flow. Every variable has a context, which determines how widely its value is shared.
component: pingone-api
page_id: pingone-api:davinci:davinci-admin-apis/admin-variables
canonical_url: https://developer.pingidentity.com/pingone-api/davinci/davinci-admin-apis/admin-variables.html
section_ids:
  assigning-admin-roles-and-permissions-to-this-service: Assigning admin roles and permissions to this service
  davinci-admin-variable-data-model-properties: DaVinci Admin variable data model properties
  limiting-and-filtering-data: Limiting and filtering data
  response-codes: Response codes
---

# DaVinci Admin Variables

The PingOne DaVinci Admin Variables service provides endpoints to create, read, update, and delete DaVinci variables. Variables are values that can be read and modified during a flow. Every variable has a context, which determines how widely its value is shared.

The options for the variable's context types are:

* `flow`

  The variable is tied to a specific flow and has a single, persistent value until that value is changed.

* `flowInstance`

  The variable can be used in multiple flows.

  * If the variable's value is set within a flow, the variable instance in that flow gets the value set by the flow's execution.

  * If the variable's value is not set within a flow, the variable instance in that flow inherits the value.

* `user`

  The variable has a separate value for each user. If you use a variable with this context in a flow, the user must be identified.

* `company`

  The variable has a single value for the company. This value is used in all flows and for all users.

## Assigning admin roles and permissions to this service

Admin role assignments determine access to PingOne APIs. When assigning admin roles to this service, refer to [PingOne Permissions by Service](../../platform/reference/roles-and-permissions-in-pingone/permissions-by-service.html) for the service-specific permissions.

You can also choose to assign admin roles based on particular service resources. Refer to [PingOne Permissions by Resource](../../platform/reference/roles-and-permissions-in-pingone/permissions-by-resource.html) when assigning admin roles per service resources.

Admin assignments to roles are set by:

* [Automatic assignment for some roles](../../platform/roles/predefined-roles.html#automatic-role-assignment).

* [Group Role Assignments](../../platform/group-role-assignments/group-role-assignments.html).

* [User Role Assignments](../../platform/users/user-role-assignments.html).

Refer to [Roles Management](../../platform/roles.html) for more information.

## DaVinci Admin variable data model properties

| Property         | Type?                        | Required? | Mutable?  | Description                                                                                                                                                                                         |
| ---------------- | ---------------------------- | --------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `createdAt`      | Date                         | N/A       | Read only | The time when the variable was created.                                                                                                                                                             |
| `context`        | String                       | Required  | Immutable | The context or type of the variable. Options are `flow`, `flowInstance`, `user`, or `company`.                                                                                                      |
| `dataType`       | String                       | Required  | Mutable   | Data type of the variable. Can be `STRING`, `BOOLEAN`, `NUMBER`, `SECRET`, or `OBJECT`. The `context` property must be set to `company` to use `SECRET` as the value for the `dataType` property.   |
| `displayName`    | String                       | Optional  | Mutable   | A human-readable variable name set in the request.                                                                                                                                                  |
| `environment`    | Object                       | N/A       | Read only | The DaVinci company ID (environment ID) object.                                                                                                                                                     |
| `environment.id` | String                       | N/A       | Read only | The DaVinci company ID, which is the PingOne environment ID.                                                                                                                                        |
| `flow`           | Object                       | Immutable | Optional  | The flow object specifying the DaVinci flow associated with the variable. This is a required property when `context` is set to `flow`. It is ignored when `context` is set to any other option.     |
| `flow.id`        | String                       | Immutable | Optional  | The flow ID of the DaVinci flow associated with the variable. This is a required property when `context` is set to `flow`. It is ignored when `context` is set to any other option.                 |
| `id`             | String                       | N/A       | Read only | The variable ID.                                                                                                                                                                                    |
| `max`            | Integer                      | Optional  | Mutable   | The maximum value of the variable. The default value is 2000.                                                                                                                                       |
| `min`            | Integer                      | Optional  | Mutable   | The minimum value of the variable. The default value is 0.                                                                                                                                          |
| `mutable`        | Boolean                      | Optional  | Mutable   | Specifies whether the variable is mutable, which allows nodes within a flow to change the value of the variable. If the `value` property is null, this property is required.                        |
| `name`           | String                       | Required  | Immutable | The variable name.                                                                                                                                                                                  |
| `updatedAt`      | Date                         | N/A       | Read only | The time when the variable was modified.                                                                                                                                                            |
| `value`          | String/Number/Boolean/Object | Optional  | Mutable   | An internally stored value that is part of a HashMap/Object. If the `mutable` property is set to `false`, this property is required. If `mutable` is not set on the request, it defaults to `true`. |

## Limiting and filtering data

These SCIM operators can be applied to the following attributes:

* `eq` (equals)

  Supports attributes of type `STRING` and `BOOLEAN`.

* `sw` (starts with)

  Supports attributes of type `STRING`.

* `ew` (ends with)

  Supports attributes of type `STRING`.

* `co` (contains)

  Supports attributes of type `STRING`.

* `and` (logical AND)

  Logical AND for building compound expressions in which both expressions are true.

* `or` (logical OR)

  Logical OR for building compound expressions if either expression is true.

For information about paging and ordering the response for [Read All DaVinci Variables](admin-variables/read-variables.html), refer to [Paging and ordering collections](../../platform/reference/paging-ordering-collections.html).

### Response codes

| Code | Message                                                               |
| ---- | --------------------------------------------------------------------- |
| 200  | Successful operation.                                                 |
| 201  | Successfully created.                                                 |
| 204  | Successfully removed. No content.                                     |
| 400  | The request could not be completed.                                   |
| 401  | You do not have access to this resource.                              |
| 403  | You do not have permissions or are not licensed to make this request. |
| 404  | The requested resource was not found.                                 |
