Delete Building Blocks
  • 03 Nov 2024
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Delete Building Blocks

  • Dark
    Light
  • PDF

Article summary

Delete
/api/2.0/building-blocks/{envId}

Delete Building Blocks by Filter.

Notice

Accessing the Policy Management APIs is through a dedicated domain/URL, according to your PlainID Tenant Location
  • United States (US) - https://api.us1.plainid.io
  • Canada (CA) - https://api.ca1.plainid.io
  • Europe (EU) - https://api.eu1.plainid.io
  • Local PAA - https://api.plainid.local

  • Using HTML Encoded Special Characters

    Use HTML encoded patterns when working with values that contain special characters like spaces, dashes, etc. Refer to this HTML URL Encoding Reference for a full list.


    cURL Sample Guidelines

    In order for the relevant parameters to appear in the cURL sample, you can input the values in the interactive API console on the right. They will then appear in the cURL sample on the bottom of the page in the correct format.

    Security
    HTTP
    Type bearer

    For more details about Administration API Authentication, check out the Authentication APIs documentation. Provide your bearer token in the Authorization header when making requests to protected resources. Example: Authorization: Bearer 123

    Path parameters
    envId
    string (uuid) Required

    The Environment ID can be found under the Details tab in the Environment Settings.

    Query parameters
    filter[authWsId]
    string (uuid)

    Authorization Workspace ID. *Required if identityWsId is not provided.

    filter[identityWsId]
    string (uuid)

    Identity Workspace ID. *Required if authWsId is not provided.

    filter[kind]
    stringRequired

    Kinds of Building Block Filters. *Required if at least one of the following filters are provided:filter[id], filter[name],filter[templateId].

    Valid values[ "\"dynamic-group\"", "\"ruleset\"", "\"condition\"", "\"condition-identity\"", "\"condition-request\"", "\"condition-ip\"" ]
    filter[id]
    string

    Building Block ID Filter

    filter[id][in]
    array of string

    Filter for multiple Building Block IDs. *Required if filter[id] is not provided.

    filter[name]
    string

    Building Block Name Filter

    filter[templateId]
    string

    Building Block Template ID Filter

    Responses
    200

    successful operation

    Headers
    x-request-id
    string
    Successful Delete
    {
      "data": {
        "conditionCounter": 1,
        "dynamicGroupCounter": 0,
        "ruleSetCounter": 0
      }
    }
    Expand All
    object
    data
    object
    conditionCounter
    integer

    Number of Conditions deleted

    dynamicGroupCounter
    integer

    Number of Dynamic Groups deleted

    ruleSetCounter
    integer

    Number of Rulesets deleted

    400

    bad request

    Headers
    x-request-id
    string
    Identity WS not found
    {
      "errors": [
        {
          "args": {
            "0": "67c1ffe0-a540-4662-b894-0813abcc04ec"
          },
          "code": "PAC-005",
          "id": "ERHCQC",
          "message": "IdentityWs: [67c1ffe0-a540-4662-b894-0813abcc04ec] not found",
          "name": "IdentityWsNotFound",
          "status": 400
        }
      ]
    }
    Expand All
    object
    errors
    Array of object (Error)
    object
    args
    object
    path
    string
    code
    string
    id
    string
    message
    string
    name
    string
    status
    integer
    401

    Unauthorized

    Headers
    x-request-id
    string
    404

    not found

    Headers
    x-request-id
    string
    Building Blocks not found
    {
      "errors": [
        {
          "args": {
            "0": "67c1ffe0-a540-4662-b894-0813abcc04ec"
          },
          "code": "PAC-005",
          "id": "ERHCQC",
          "message": "Building Blocks not found",
          "name": "BuildingBlocksNotFound",
          "status": 404
        }
      ]
    }
    Expand All
    object
    errors
    Array of object (Error)
    object
    args
    object
    path
    string
    code
    string
    id
    string
    message
    string
    name
    string
    status
    integer
    422

    Validation Failed - Invalid UUID

    Headers
    x-request-id
    string
    Invalid ID Format
    {
      "errors": [
        {
          "args": {
            "0": "ed252aa5-9d0c-4193-838-60bf20b13109",
            "1": "uuid"
          },
          "code": "V-032",
          "id": "EEJQMA",
          "message": "$: test is an invalid uuid",
          "name": "UnprocessableEntityError",
          "status": 422
        }
      ]
    }
    Expand All
    object
    errors
    Array of object (Error)
    object
    args
    object
    path
    string
    code
    string
    id
    string
    message
    string
    name
    string
    status
    integer

    Was this article helpful?