# Entitlements
URL: https://docs.datarobot.com/en/docs/api/reference/public-api/entitlements.html

> Use the endpoints described below to manage entitlements.

# Entitlements

Use the endpoints described below to manage entitlements.

## Apply entitlement set leases

Operation path: `POST /api/v2/entitlements/applyEntitlementSets/`

Authentication requirements: `BearerAuth`

Request temporary entitlement leases for users within a tenant.

### Body parameter

```
{
  "properties": {
    "acceptedTerms": {
      "description": "Indicates the requesting user has actively accepted the required terms and conditions for starting the trial.",
      "type": "boolean"
    },
    "durationDays": {
      "description": "Duration of the lease in days.",
      "minimum": 1,
      "type": "integer"
    },
    "entitlementSetId": {
      "description": "UUID of the entitlement set to lease.",
      "type": "string"
    },
    "tenantId": {
      "description": "UUID of the tenant to apply entitlements to.",
      "type": "string"
    }
  },
  "required": [
    "acceptedTerms",
    "durationDays",
    "entitlementSetId"
  ],
  "type": "object",
  "x-versionadded": "v2.38"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| body | body | ApplyEntitlementSetLeaseRequest | false | none |

### Example responses

> 200 Response

```
{
  "type": "object",
  "x-versionadded": "v2.38"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | Entitlement leases applied successfully. | EntitlementSetLeaseResponse |
| 400 | Bad Request | Invalid request data. | None |
| 403 | Forbidden | Access denied. | None |
| 422 | Unprocessable Entity | Invalid parameters provided. | None |
| 500 | Internal Server Error | Service temporarily unavailable. | None |

## Retrieve entitlement set leases

Operation path: `GET /api/v2/entitlements/entitlementSetLeases/`

Authentication requirements: `BearerAuth`

Retrieve entitlement set leases with optional filtering by tenant, entitlement set, and status.

### Body parameter

```
{
  "properties": {
    "entitlementSetId": {
      "description": "UUID of the entitlement set to filter leases by.",
      "type": "string"
    },
    "limit": {
      "default": 100,
      "description": "Pagination limit (max 100).",
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    },
    "offset": {
      "default": 0,
      "description": "Pagination offset.",
      "minimum": 0,
      "type": "integer"
    },
    "status": {
      "description": "Status to filter leases by (e.g., ACTIVE, EXPIRED).",
      "type": "string"
    },
    "tenantId": {
      "description": "UUID of the tenant to filter leases by.",
      "type": "string"
    }
  },
  "type": "object",
  "x-versionadded": "v2.38"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| body | body | EntitlementSetLeasesRequest | false | none |

### Example responses

> 200 Response

```
{
  "properties": {
    "count": {
      "description": "Number of items in current page",
      "type": "integer"
    },
    "data": {
      "description": "List of entitlement set leases",
      "items": {
        "properties": {
          "createdAt": {
            "description": "Lease creation timestamp",
            "type": "string"
          },
          "createdBy": {
            "description": "Created by user",
            "type": "string"
          },
          "entitlementSetId": {
            "description": "UUID of the entitlement set",
            "type": "string"
          },
          "id": {
            "description": "UUID of the lease",
            "type": "string"
          },
          "lastLeaseEndDate": {
            "description": "Last lease end date timestamp",
            "type": "string"
          },
          "leaseCount": {
            "description": "Lease count",
            "type": "integer"
          },
          "status": {
            "description": "Status of the lease",
            "type": "string"
          },
          "tenantId": {
            "description": "UUID of the tenant",
            "type": "string"
          },
          "updatedAt": {
            "description": "Lease last update timestamp",
            "type": "string"
          },
          "updatedBy": {
            "description": "Updated by user",
            "type": "string"
          },
          "validFrom": {
            "description": "Lease valid from timestamp",
            "type": "string"
          },
          "validUntil": {
            "description": "Lease valid until timestamp",
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "entitlementSetId",
          "id",
          "status",
          "tenantId",
          "updatedAt"
        ],
        "type": "object",
        "x-versionadded": "v2.38"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "next": {
      "description": "URL for next page",
      "type": "string"
    },
    "previous": {
      "description": "URL for previous page",
      "type": "string"
    },
    "totalCount": {
      "description": "Total number of items",
      "type": "integer"
    }
  },
  "required": [
    "count",
    "data",
    "totalCount"
  ],
  "type": "object",
  "x-versionadded": "v2.38"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | Entitlement set leases retrieved successfully. | EntitlementSetLeasesResponse |
| 400 | Bad Request | Invalid request parameters. | None |
| 403 | Forbidden | Access denied. | None |
| 500 | Internal Server Error | Service temporarily unavailable. | None |

## Evaluate entitlements

Operation path: `POST /api/v2/entitlements/evaluate/`

Authentication requirements: `BearerAuth`

Evaluate entitlements of the client requesting the API.

### Body parameter

```
{
  "properties": {
    "entitlements": {
      "description": "Entitlements to evaluate",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the entitlement to evaluate",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 100,
      "type": "array"
    }
  },
  "required": [
    "entitlements"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| body | body | EvaluateEntitlementsRequest | false | none |

### Example responses

> 200 Response

```
{
  "properties": {
    "entitlements": {
      "description": "Results of evaluation",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the entitlement to evaluate",
            "type": "string"
          },
          "value": {
            "description": "The result of an entitlement evaluation.",
            "oneOf": [
              {
                "type": "boolean"
              }
            ]
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 100,
      "type": "array"
    }
  },
  "required": [
    "entitlements"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | Evaluation succeeded. | EvaluateEntitlementsResponse |

# Schemas

## ApplyEntitlementSetLeaseRequest

```
{
  "properties": {
    "acceptedTerms": {
      "description": "Indicates the requesting user has actively accepted the required terms and conditions for starting the trial.",
      "type": "boolean"
    },
    "durationDays": {
      "description": "Duration of the lease in days.",
      "minimum": 1,
      "type": "integer"
    },
    "entitlementSetId": {
      "description": "UUID of the entitlement set to lease.",
      "type": "string"
    },
    "tenantId": {
      "description": "UUID of the tenant to apply entitlements to.",
      "type": "string"
    }
  },
  "required": [
    "acceptedTerms",
    "durationDays",
    "entitlementSetId"
  ],
  "type": "object",
  "x-versionadded": "v2.38"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| acceptedTerms | boolean | true |  | Indicates the requesting user has actively accepted the required terms and conditions for starting the trial. |
| durationDays | integer | true | minimum: 1 | Duration of the lease in days. |
| entitlementSetId | string | true |  | UUID of the entitlement set to lease. |
| tenantId | string | false |  | UUID of the tenant to apply entitlements to. |

## Entitlement

```
{
  "properties": {
    "name": {
      "description": "Name of the entitlement to evaluate",
      "type": "string"
    }
  },
  "required": [
    "name"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| name | string | true |  | Name of the entitlement to evaluate |

## EntitlementEvaluateResult

```
{
  "properties": {
    "name": {
      "description": "Name of the entitlement to evaluate",
      "type": "string"
    },
    "value": {
      "description": "The result of an entitlement evaluation.",
      "oneOf": [
        {
          "type": "boolean"
        }
      ]
    }
  },
  "required": [
    "name",
    "value"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| name | string | true |  | Name of the entitlement to evaluate |
| value | boolean | true |  | The result of an entitlement evaluation. |

## EntitlementSetLease

```
{
  "properties": {
    "createdAt": {
      "description": "Lease creation timestamp",
      "type": "string"
    },
    "createdBy": {
      "description": "Created by user",
      "type": "string"
    },
    "entitlementSetId": {
      "description": "UUID of the entitlement set",
      "type": "string"
    },
    "id": {
      "description": "UUID of the lease",
      "type": "string"
    },
    "lastLeaseEndDate": {
      "description": "Last lease end date timestamp",
      "type": "string"
    },
    "leaseCount": {
      "description": "Lease count",
      "type": "integer"
    },
    "status": {
      "description": "Status of the lease",
      "type": "string"
    },
    "tenantId": {
      "description": "UUID of the tenant",
      "type": "string"
    },
    "updatedAt": {
      "description": "Lease last update timestamp",
      "type": "string"
    },
    "updatedBy": {
      "description": "Updated by user",
      "type": "string"
    },
    "validFrom": {
      "description": "Lease valid from timestamp",
      "type": "string"
    },
    "validUntil": {
      "description": "Lease valid until timestamp",
      "type": "string"
    }
  },
  "required": [
    "createdAt",
    "entitlementSetId",
    "id",
    "status",
    "tenantId",
    "updatedAt"
  ],
  "type": "object",
  "x-versionadded": "v2.38"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| createdAt | string | true |  | Lease creation timestamp |
| createdBy | string | false |  | Created by user |
| entitlementSetId | string | true |  | UUID of the entitlement set |
| id | string | true |  | UUID of the lease |
| lastLeaseEndDate | string | false |  | Last lease end date timestamp |
| leaseCount | integer | false |  | Lease count |
| status | string | true |  | Status of the lease |
| tenantId | string | true |  | UUID of the tenant |
| updatedAt | string | true |  | Lease last update timestamp |
| updatedBy | string | false |  | Updated by user |
| validFrom | string | false |  | Lease valid from timestamp |
| validUntil | string | false |  | Lease valid until timestamp |

## EntitlementSetLeaseResponse

```
{
  "type": "object",
  "x-versionadded": "v2.38"
}
```

### Properties

None

## EntitlementSetLeasesRequest

```
{
  "properties": {
    "entitlementSetId": {
      "description": "UUID of the entitlement set to filter leases by.",
      "type": "string"
    },
    "limit": {
      "default": 100,
      "description": "Pagination limit (max 100).",
      "maximum": 100,
      "minimum": 1,
      "type": "integer"
    },
    "offset": {
      "default": 0,
      "description": "Pagination offset.",
      "minimum": 0,
      "type": "integer"
    },
    "status": {
      "description": "Status to filter leases by (e.g., ACTIVE, EXPIRED).",
      "type": "string"
    },
    "tenantId": {
      "description": "UUID of the tenant to filter leases by.",
      "type": "string"
    }
  },
  "type": "object",
  "x-versionadded": "v2.38"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| entitlementSetId | string | false |  | UUID of the entitlement set to filter leases by. |
| limit | integer | false | maximum: 100minimum: 1 | Pagination limit (max 100). |
| offset | integer | false | minimum: 0 | Pagination offset. |
| status | string | false |  | Status to filter leases by (e.g., ACTIVE, EXPIRED). |
| tenantId | string | false |  | UUID of the tenant to filter leases by. |

## EntitlementSetLeasesResponse

```
{
  "properties": {
    "count": {
      "description": "Number of items in current page",
      "type": "integer"
    },
    "data": {
      "description": "List of entitlement set leases",
      "items": {
        "properties": {
          "createdAt": {
            "description": "Lease creation timestamp",
            "type": "string"
          },
          "createdBy": {
            "description": "Created by user",
            "type": "string"
          },
          "entitlementSetId": {
            "description": "UUID of the entitlement set",
            "type": "string"
          },
          "id": {
            "description": "UUID of the lease",
            "type": "string"
          },
          "lastLeaseEndDate": {
            "description": "Last lease end date timestamp",
            "type": "string"
          },
          "leaseCount": {
            "description": "Lease count",
            "type": "integer"
          },
          "status": {
            "description": "Status of the lease",
            "type": "string"
          },
          "tenantId": {
            "description": "UUID of the tenant",
            "type": "string"
          },
          "updatedAt": {
            "description": "Lease last update timestamp",
            "type": "string"
          },
          "updatedBy": {
            "description": "Updated by user",
            "type": "string"
          },
          "validFrom": {
            "description": "Lease valid from timestamp",
            "type": "string"
          },
          "validUntil": {
            "description": "Lease valid until timestamp",
            "type": "string"
          }
        },
        "required": [
          "createdAt",
          "entitlementSetId",
          "id",
          "status",
          "tenantId",
          "updatedAt"
        ],
        "type": "object",
        "x-versionadded": "v2.38"
      },
      "maxItems": 1000,
      "type": "array"
    },
    "next": {
      "description": "URL for next page",
      "type": "string"
    },
    "previous": {
      "description": "URL for previous page",
      "type": "string"
    },
    "totalCount": {
      "description": "Total number of items",
      "type": "integer"
    }
  },
  "required": [
    "count",
    "data",
    "totalCount"
  ],
  "type": "object",
  "x-versionadded": "v2.38"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| count | integer | true |  | Number of items in current page |
| data | [EntitlementSetLease] | true | maxItems: 1000 | List of entitlement set leases |
| next | string | false |  | URL for next page |
| previous | string | false |  | URL for previous page |
| totalCount | integer | true |  | Total number of items |

## EvaluateEntitlementsRequest

```
{
  "properties": {
    "entitlements": {
      "description": "Entitlements to evaluate",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the entitlement to evaluate",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 100,
      "type": "array"
    }
  },
  "required": [
    "entitlements"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| entitlements | [Entitlement] | true | maxItems: 100 | Entitlements to evaluate |

## EvaluateEntitlementsResponse

```
{
  "properties": {
    "entitlements": {
      "description": "Results of evaluation",
      "items": {
        "properties": {
          "name": {
            "description": "Name of the entitlement to evaluate",
            "type": "string"
          },
          "value": {
            "description": "The result of an entitlement evaluation.",
            "oneOf": [
              {
                "type": "boolean"
              }
            ]
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object",
        "x-versionadded": "v2.35"
      },
      "maxItems": 100,
      "type": "array"
    }
  },
  "required": [
    "entitlements"
  ],
  "type": "object",
  "x-versionadded": "v2.35"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| entitlements | [EntitlementEvaluateResult] | true | maxItems: 100 | Results of evaluation |

---
