For Developers

Update Schema

PATCH https://ed.link/api/v2/teams/:team_id/applications/:application_id/schemas

Updates an existing schema identified by action or schema_id.

Permissions

Requires the audit_log_schemas.update system permission.

Parameters

ParameterTypeRequiredDescription
:team_idUUIDYesThe ID of the team.
:application_idUUIDYesThe ID of the application.

Request Body

PropertyTypeRequiredDescription
actionStringConditionalAction identifier (required if schema_id omitted).
schema_idUUIDConditionalTarget schema ID (required if action omitted).
action_typeStringNoUpdated action type (create, read, update, delete, etc.).
validation_levelStringNoUpdated enforcement level (strict or lax).
dataObjectNoUpdated JSON Schema for event payload.
beforeObjectNoUpdated JSON Schema for prior state.
afterObjectNoUpdated JSON Schema for subsequent state.

Sample Request

const response = await axios.patch(
    `https://ed.link/api/v2/teams/${team_id}/applications/${application_id}/schemas`,
    {
        action: "user.login",
        validation_level: "lax"
    },
    {
        headers: {
            authorization: `Bearer ${user_session_token}`
        }
    }
);

Sample Response

{
    "$data": {
        "id": "6732d847-f5da-48c5-9273-df8734e5684a",
        "action": "user.login",
        "validation_level": "lax"
    }
}