For Developers
Create Rule
POST https://ed.link/api/v2/teams/:team_id/integrations/:integration_id/rules
Creates a new integration rule and schedules a materialization.
Permissions
Requires either the rules.create or rules.update system permission.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
:team_id | UUID | Yes | The ID of the team. |
:integration_id | UUID | Yes | The ID of the integration. |
Request Body
| Property | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Name of the rule. |
action | String | Yes | include or exclude. |
target | String | Yes | Target entity type (people, courses, sections, schools). |
conditions | Array | Yes | Array of condition objects specifying field matching rules. |
Sample Request
const response = await axios.post(
`https://ed.link/api/v2/teams/${team_id}/integrations/${integration_id}/rules`,
{
name: 'Exclude Graduated Students',
action: 'exclude',
target: 'people',
conditions: [
{
field: 'roles',
operator: 'contains',
value: 'graduated'
}
]
},
{
headers: {
authorization: `Bearer ${user_session_token}`,
'content-type': 'application/json'
}
}
);
Sample Response
{
"$data": {
"id": "7ca194a2-1982-4f91-8841-59128aa10234",
"name": "Exclude Graduated Students",
"action": "exclude",
"target": "people"
}
}
