Create a trial policy

Creates a new trial policy.

POST/v3/trial-policies
JWT
trialPolicy:write

Request Body Schema

PropertyTypeDescriptionConstraints
name*stringName of the policy.min: 1, max: 256
fingerprintMatchingStrategy*stringStrategy for matching machine fingerprint.enum: [fuzzy, exact, loose]
allowVmActivation*booleanWhether to allow an activation inside a virtual machine.
allowContainerActivation*booleanWhether to allow an activation inside a container.
userLocked*booleanLocks the activation to the machine user.
disableGeoLocation*booleanWhether IP address and geo-location should be stored.
allowedIpRangesarrayAllowed IP ranges. Leave empty to ignore.items: string
allowedCountriesarrayList of the allowed countries. Leave empty to ignore.items: string
disallowedCountriesarrayList of the disallowed countries. Leave empty to ignore.items: string
allowedIpAddressesarrayList of the allowed ip addresses. Leave empty to ignore.items: string
disallowedIpAddressesarrayList of the disallowed ip addresses. Leave empty to ignore.items: string
trialLength*integerThe duration after which the trial will expire.min: 1, max: 2147483647, format: int32

Request Example

{
  "name": "string",
  "fingerprintMatchingStrategy": "fuzzy",
  "allowVmActivation": true,
  "allowContainerActivation": true,
  "userLocked": true,
  "disableGeoLocation": true,
  "allowedIpRanges": [
    "string"
  ],
  "allowedCountries": [
    "string"
  ],
  "disallowedCountries": [
    "string"
  ],
  "allowedIpAddresses": [
    "string"
  ],
  "disallowedIpAddresses": [
    "string"
  ],
  "trialLength": 1
}
Triggers webhook: trialPolicy.created
POST <your-webhook-url>
{
  "event": "trialPolicy.created",
  "data": {
    "id": "string",
    "createdAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z",
    "name": "string",
    "allowVmActivation": true,
    "allowContainerActivation": true,
    "userLocked": true,
    "disableGeoLocation": true,
    "allowedIpRange": "string",
    "allowedIpRanges": [
      "string"
    ],
    "allowedCountries": [
      "string"
    ],
    "disallowedCountries": [
      "string"
    ],
    "allowedIpAddresses": [
      "string"
    ],
    "disallowedIpAddresses": [
      "string"
    ],
    "trialLength": 0,
    "fingerprintMatchingStrategy": "fuzzy"
  },
  "triggeredAt": "string"
}

Responses

201 Created
{
  "id": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "name": "string",
  "allowVmActivation": true,
  "allowContainerActivation": true,
  "userLocked": true,
  "disableGeoLocation": true,
  "allowedIpRange": "string",
  "allowedIpRanges": [
    "string"
  ],
  "allowedCountries": [
    "string"
  ],
  "disallowedCountries": [
    "string"
  ],
  "allowedIpAddresses": [
    "string"
  ],
  "disallowedIpAddresses": [
    "string"
  ],
  "trialLength": 0,
  "fingerprintMatchingStrategy": "fuzzy"
}