For Developers

Update Schema

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

Updates an existing schema identified by its UUID. The event action string cannot be passed in place of :schema_id, and this call does not rename the action.

Permissions

Requires the audit_log_schemas.update system permission.

Parameters

ParameterTypeRequiredDescription
:team_idUUIDYesThe ID of the team.
:application_idUUIDYesThe ID of the application.
:schema_idUUIDYesThe UUID of the audit log schema.

Request Body

PropertyTypeRequiredDescription
action_typeStringNocreate, read, update, delete, or other.
nameStringNoDisplay name. Send null to clear it.
descriptionStringNoDescription. Send null to clear it.
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/${schema_id}`,
    {
        validation_level: 'lax'
    },
    {
        headers: {
            authorization: `Bearer ${user_session_token}`
        }
    }
);

Sample Response

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