Views (beta)

Unlink resource

DELETE
/api/v2/projects/{projectKey}/views/{viewKey}/link/{resourceType}

Unlink one or multiple resources from a view:

  • Unlink flags using flag keys
  • Unlink segments using segment IDs
  • Unlink AI configs using config keys

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string
viewKey*string
resourceType*string

Value in

  • "flags"
  • "segments"
  • "aiConfigs"

Header Parameters

LD-API-Version*"beta"

Version of the endpoint.

Value in

  • "beta"

Request Body

application/json

The resource to link to the view. Flags are identified by key. Segments are identified by segment ID.

keys*array<string>

Keys of the resources (flags, segments) to link/unlink

filter?string

Optional filter string to determine which resources should be linked. Resources only need to match either the filter or explicitly-listed keys to be linked (union). Uses the same syntax as list endpoints: flags use comma-separated field:value filters, segments use queryfilter syntax.

Supported filters by resource type:

  • flags: query, tags, maintainerId, maintainerTeamKey, type, status, state, staleState, sdkAvailability, targeting, hasExperiment, hasDataExport, evaluated, creationDate, contextKindTargeted, contextKindsEvaluated, filterEnv, segmentTargeted, codeReferences.min, codeReferences.max, excludeSettings, releasePipeline, applicationEvaluated, purpose, guardedRollout, view, key, name, archived, followerId
  • segments (queryfilter): query, tags, keys, excludedKeys, unbounded, external, view, type Some filters are only available when the corresponding feature is enabled on your account.
comment?string

Optional comment for the link/unlink operation

Default""

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/api/v2/projects/default/views/my-view/link/flags" \  -H "LD-API-Version: beta" \  -H "Content-Type: application/json" \  -d '{    "filter": "maintainerId:507f1f77bcf86cd799439011,tags:backend+beta",    "keys": [      "flag-1",      "flag-2"    ],    "comment": ""  }'
{  "failedResources": [    {      "environmentId": "environmentId",      "resourceKey": "resourceKey",      "errorMessage": "errorMessage",      "resourceType": "flag"    },    {      "environmentId": "environmentId",      "resourceKey": "resourceKey",      "errorMessage": "errorMessage",      "resourceType": "flag"    }  ],  "successCount": 0,  "failureCount": 6}