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
| Parameter | Type | Required | Description |
|---|---|---|---|
:team_id | UUID | Yes | The ID of the team. |
:application_id | UUID | Yes | The ID of the application. |
:schema_id | UUID | Yes | The UUID of the audit log schema. |
Request Body
| Property | Type | Required | Description |
|---|---|---|---|
action_type | String | No | create, read, update, delete, or other. |
name | String | No | Display name. Send null to clear it. |
description | String | No | Description. Send null to clear it. |
validation_level | String | No | Updated enforcement level (strict or lax). |
data | Object | No | Updated JSON Schema for event payload. |
before | Object | No | Updated JSON Schema for prior state. |
after | Object | No | Updated 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"
}
}
