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
| Parameter | Type | Required | Description |
|---|---|---|---|
:team_id | UUID | Yes | The ID of the team. |
:application_id | UUID | Yes | The ID of the application. |
Request Body
| Property | Type | Required | Description |
|---|---|---|---|
action | String | Conditional | Action identifier (required if schema_id omitted). |
schema_id | UUID | Conditional | Target schema ID (required if action omitted). |
action_type | String | No | Updated action type (create, read, update, delete, etc.). |
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`,
{
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"
}
}
