Skip to main content
POST
http://localhost:3000
/
scope-hierarchy
/
batch
curl -X POST 'https://api.example.com/scope-hierarchy/batch' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "parentScopeId": "scope_acme",
      "childScopeId": "scope_engineering"
    },
    {
      "parentScopeId": "scope_engineering",
      "childScopeId": "scope_backend"
    }
  ]'
[
  {
    "parentScopeId": "scope_acme",
    "childScopeId": "scope_engineering"
  },
  {
    "parentScopeId": "scope_engineering",
    "childScopeId": "scope_backend"
  }
]

Overview

Batch creation allows you to establish multiple parent-child scope relationships in a single API call.

Request Body

Array of hierarchy edge objects:
[].parentScopeId
string
required
ID of the parent scope
[].childScopeId
string
required
ID of the child scope

Response

Returns an array of created hierarchy edge objects.
curl -X POST 'https://api.example.com/scope-hierarchy/batch' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '[
    {
      "parentScopeId": "scope_acme",
      "childScopeId": "scope_engineering"
    },
    {
      "parentScopeId": "scope_engineering",
      "childScopeId": "scope_backend"
    }
  ]'
[
  {
    "parentScopeId": "scope_acme",
    "childScopeId": "scope_engineering"
  },
  {
    "parentScopeId": "scope_engineering",
    "childScopeId": "scope_backend"
  }
]