For Developers

List Integration Rules

GET https://ed.link/api/v2/teams/:team_id/integrations/:integration_id/rules

Returns sharing and licensing rules for the integration. Each rule is a model-shaped MikroORM Rule entity with nested Condition entities.

Requires the rules.read system permission. Rule ownership (developer vs district) is determined by the team's relationship to the integration.

This query allows for standard paging parameters.

It is best practice to use either $first or $last in conjunction with the $next value returned by the API to paginate through results.

Sample Request

const response = await axios.get(
    `https://ed.link/api/v2/teams/${team_id}/integrations/${integration_id}/rules`,
    {
        headers: {
            authorization: `Bearer ${user_session_token}`
        }
    }
);

Sample Response

{
    "$data": [
        {
            "id": "58176ba0-34f6-459c-a7b0-757dbdf3b3af",
            "created_date": "2023-11-12T20:23:16.080Z",
            "updated_date": "2024-01-05T10:00:00.000Z",
            "type": "sharing",
            "owner": "developer",
            "state": "active",
            "conditions": [
                {
                    "id": "ffef1450-8a86-4e6b-a13c-a0f2c2be5a8a",
                    "field": "role",
                    "operator": "equals",
                    "value": "student"
                }
            ]
        }
    ]
}
  • POST /api/v2/teams/:team_id/integrations/:integration_id/rules — Create a rule
  • PATCH /api/v2/teams/:team_id/integrations/:integration_id/rules/:rule_id — Update a rule
  • DELETE /api/v2/teams/:team_id/integrations/:integration_id/rules/:rule_id — Delete a rule