For Developers

Update CIDR

PATCH https://ed.link/api/v2/teams/:team_id/origin-policies/:policy_id/cidrs/:cidr_id

Updates network specification, outcome, label, or enabled status for a CIDR rule.

Permissions

Requires the origin_policies.update system permission.

Parameters

ParameterTypeRequiredDescription
:team_idUUIDYesThe ID of the team.
:policy_idUUIDYesThe ID of the origin policy.
:cidr_idUUIDYesThe ID of the CIDR rule.

Request Body

PropertyTypeRequiredDescription
networkStringNoUpdated CIDR network string.
outcomeStringNoUpdated outcome: allowed or denied.
labelStringNoUpdated description.
enabledBooleanNoEnable or disable the rule.

Sample Request

const response = await axios.patch(
    `https://ed.link/api/v2/teams/${team_id}/origin-policies/${policy_id}/cidrs/${cidr_id}`,
    {
        label: 'Primary Office Network (Updated)',
        enabled: true
    },
    {
        headers: {
            authorization: `Bearer ${user_session_token}`,
            'content-type': 'application/json'
        }
    }
);

Sample Response

{
    "$data": {
        "id": "18de75a1-4b12-4c8d-9011-30112fa50012",
        "network": "203.0.113.0/24",
        "outcome": "allowed",
        "label": "Primary Office Network (Updated)",
        "enabled": true
    }
}