docs: document deleting custom identity schemas#2539
Conversation
Co-authored-by: unatasha8 <una.cogavin@ory.sh>
|
What do you mean by "an attachment to a project is permanent for the lifetime of that project"? You are able to change a project's schema so a schema is not permanently 'attached' for the lifetime of the project. |
When we add a schema to a project its attached to the historical project revision, so identities can still reference that schema even if it's technically not in the project's current state |
So once a schema has been added to a project it cannot be deleted. |
That is correct, at least not for now. This is the current state as we haven't found a good way of deleting schemas that are attached to a project w/out breaking things. |
|
This feature has been released @unatasha8 PTAL again! |
| -H "Authorization: Bearer $ORY_WORKSPACE_API_KEY" | ||
| ``` | ||
|
|
||
| If the schema is still in use, the API returns `409 Conflict` with the number of projects that reference it. |
There was a problem hiding this comment.
Should this not say 'If the schema is used by a project or references an identity..."
The use of 'still' implies that it can be in use and not in use, but we already say once a schema is used by a project it cannot be removed.
| 3. Open the row menu (three dots) and select **Delete schema**. | ||
| 4. Confirm the deletion in the dialog. | ||
|
|
||
| If **Delete schema** is disabled, the schema is currently attached to a project and cannot be deleted. |
There was a problem hiding this comment.
| If **Delete schema** is disabled, the schema is currently attached to a project and cannot be deleted. | |
| If **Delete schema** is disabled, the schema is attached to a project and cannot be deleted. |
| 3. Open the row menu (three dots) and select **Delete schema**. | ||
| 4. Confirm the deletion in the dialog. | ||
|
|
||
| If **Delete schema** is disabled, the schema is currently attached to a project and cannot be deleted. |
There was a problem hiding this comment.
Remove 'currently'. Once a schema is attached to a project it can never be unattached... so it will always be 'currently' attached.
Drop "currently" from the Console disabled-button note (an attachment is permanent for the project's lifetime, so it is never merely current) and replace "still in use" with the explicit "used by a project or referenced by an identity" condition.
Summary
Adds a "Delete a custom schema" section to the manage identity schemas page, covering both the Console UI flow and a cURL example using a workspace API key against the Console API.
Documents the constraints surfaced by the API: the deletion is rejected (409) if the schema is still attached to a project or referenced by an identity. The section also calls out that presets cannot be deleted and that an attachment to a project is permanent for the lifetime of that project.
Pairs with the cloud-side endpoint and Console UI changes that introduced the delete capability.
Test plan
personal-access-token.mdx#authorizing-ory-network-workspace-admin-apisresolve<ConsoleLink route="project.identitySchema" />resolves to the existing schema page