Import/Export

Validate feature import data

Validates a feature flag data set. Checks whether the data can be imported into the specified project and environment. The returned value is an object that contains errors, warnings, and permissions required to perform the import, as described in the import documentation.

post/api/admin/features-batch/validate

Request body

projectstring required

The exported project

environmentstring required

The exported environment

Example request

{
  "project": "My awesome project",
  "environment": "development",
  "data": {
    "features": [
      {
        "name": "my-feature",
        "description": "best feature ever",
        "type": "release",
        "project": "default",
        "stale": false,
        "impressionData": false,
        "archived": false
      }
    ],
    "featureStrategies": [
      {
        "name": "flexibleRollout",
        "id": "924974d7-8003-43ee-87eb-c5f887c06fd1",
        "featureName": "my-feature",
        "title": "Rollout 50%",
        "parameters": {
          "groupId": "default",
          "rollout": "50",
          "stickiness": "random"
        },
        "constraints": [],
        "disabled": false,
        "segments": [
          1
        ]
      }
    ],
    "featureEnvironments": [
      {
        "enabled": true,
        "featureName": "my-feature",
        "environment": "development",
        "variants": [
          {
            "name": "a",
            "weight": 500,
            "overrides": [],
            "stickiness": "random",
            "weightType": "variable"
          },
          {
            "name": "b",
            "weight": 500,
            "overrides": [],
            "stickiness": "random",
            "weightType": "variable"
          }
        ],
        "name": "variant-testing"
      }
    ],
    "contextFields": [
      {
        "name": "appName",
        "description": "Allows you to constrain on application name",
        "stickiness": false,
        "sortOrder": 2,
        "legalValues": []
      }
    ],
    "featureTags": [
      {
        "featureName": "my-feature",
        "tagType": "simple",
        "tagValue": "user-facing"
      }
    ],
    "segments": [
      {
        "id": 1,
        "name": "new-segment-name"
      }
    ],
    "tagTypes": [
      {
        "name": "simple",
        "description": "Used to simplify filtering of features",
        "icon": "#"
      }
    ],
    "dependencies": [
      {
        "feature": "child_feature",
        "dependencies": [
          {
            "feature": "parent_feature",
            "variants": [
              "variantA",
              "variantB"
            ]
          }
        ]
      }
    ],
    "links": [
      {
        "feature": "child_feature",
        "links": [
          {
            "url": "https://github.com/search?q=cleanupReminder&type=code",
            "title": "Github cleanup"
          }
        ]
      }
    ]
  }
}

Response

importTogglesValidateSchema

Example response

{
  "errors": [
    {
      "message": "You cannot import a feature that already exist in other projects. You already have the following features defined outside of project default:",
      "affectedItems": [
        "my-feature (in project project-854)"
      ]
    }
  ],
  "warnings": [
    {
      "message": "The following strategy types will be used in import. Please make sure the strategy type parameters are configured as in source environment:",
      "affectedItems": [
        "custom-strategy-7"
      ]
    }
  ],
  "permissions": []
}

Changes

Changed in 2 of the 7 revisions of this API.7523

  • b2c3116e633e510See the full diff
    • the /////////// request property's minLength was increased from 0 to 1

      request-property-min-length-increased

    • the /////// request property's minLength was increased from 0 to 1

      request-property-min-length-increased

    • the ///// request property's minLength was increased from 0 to 1

      request-property-min-length-increased

    • the ///////////// request property's minLength was increased from 0 to 1

      request-property-min-length-increased

    • the ///////// request property's minLength was increased from 0 to 1

      request-property-min-length-increased

    • added the new SEMVER_GTE enum value to the request property ///////////

      request-property-enum-value-added

    • added the new SEMVER_GTE enum value to the request property ///////

      request-property-enum-value-added

    • added the new SEMVER_GTE enum value to the request property /////

      request-property-enum-value-added

    • added the new SEMVER_GTE enum value to the request property /////////////

      request-property-enum-value-added

    • added the new SEMVER_GTE enum value to the request property /////////

      request-property-enum-value-added

    • added the new SEMVER_LTE enum value to the request property ///////////

      request-property-enum-value-added

    • added the new SEMVER_LTE enum value to the request property ///////

      request-property-enum-value-added

    • added the new SEMVER_LTE enum value to the request property /////

      request-property-enum-value-added

    • added the new SEMVER_LTE enum value to the request property /////////////

      request-property-enum-value-added

    • added the new SEMVER_LTE enum value to the request property /////////

      request-property-enum-value-added

  • 774670258f042513See the full diff
    • added the new required request property /////////

      new-required-request-property

    • added the new required request property ///////////

      new-required-request-property

    • removed the request property ///

      request-property-removed

    • removed the request property ///

      request-property-removed

    • removed the request property ///

      request-property-removed

    • removed the request property ///

      request-property-removed

    • removed the request property ///

      request-property-removed

    • added the new optional request property /////////

      new-optional-request-property

    • added the new optional request property ////////

      new-optional-request-property

    • added the new optional request property ///

      new-optional-request-property

    • added the new optional request property ///////////

      new-optional-request-property

    • added the new optional request property //////////

      new-optional-request-property

    • added the new optional request property /////

      new-optional-request-property

    • request property ///////// deprecated (stability: stable)

      request-property-deprecated

    • request property /////////// deprecated (stability: stable)

      request-property-deprecated

    • added the new REGEX enum value to the request property ///////////

      request-property-enum-value-added

    • added the new REGEX enum value to the request property ///////

      request-property-enum-value-added

    • added the new REGEX enum value to the request property /////

      request-property-enum-value-added

    • added the new REGEX enum value to the request property /////////////

      request-property-enum-value-added

    • added the new REGEX enum value to the request property /////////

      request-property-enum-value-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog