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"
}
]'
const axios = require('axios');
const { data } = await axios.post('https://api.example.com/scope-hierarchy/batch', [
{ parentScopeId: 'scope_acme', childScopeId: 'scope_engineering' },
{ parentScopeId: 'scope_engineering', childScopeId: 'scope_backend' },
], {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
[
{
"parentScopeId": "scope_acme",
"childScopeId": "scope_engineering"
},
{
"parentScopeId": "scope_engineering",
"childScopeId": "scope_backend"
}
]
Scope Hierarchy
Create Hierarchy Edges (Batch)
Create multiple scope hierarchy edges in a single request
POST
/
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"
}
]'
const axios = require('axios');
const { data } = await axios.post('https://api.example.com/scope-hierarchy/batch', [
{ parentScopeId: 'scope_acme', childScopeId: 'scope_engineering' },
{ parentScopeId: 'scope_engineering', childScopeId: 'scope_backend' },
], {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
[
{
"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:string
required
ID of the parent scope
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"
}
]'
const axios = require('axios');
const { data } = await axios.post('https://api.example.com/scope-hierarchy/batch', [
{ parentScopeId: 'scope_acme', childScopeId: 'scope_engineering' },
{ parentScopeId: 'scope_engineering', childScopeId: 'scope_backend' },
], {
headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
});
[
{
"parentScopeId": "scope_acme",
"childScopeId": "scope_engineering"
},
{
"parentScopeId": "scope_engineering",
"childScopeId": "scope_backend"
}
]
Was this page helpful?
⌘I