Assignments

Update, localize or remove page assignments

Runs one structural operation on this project's page assignments, selected by op. All operations are live writes (routing changes immediately, no draft or publish step).

Operations:

  • update (content:write): changes handle and locale of 1-100 assignments by id. Every id must belong to this project; one foreign id refuses the whole batch with 404 and nothing moves. Returns the updated rows. A handle that another assignment already uses in that scope, or a custom page that would hold two handles in one scope (details.handles), returns 409 CONFLICT and nothing moves.
  • localize (content:write): creates a locale-specific copy of page pageId for locale, with the same type and handle and a copy of its SEO. Returns the new page.
  • unassign (content:delete, confirm equal to pageId): removes up to 100 resource assignments (assignmentIds) from template page pageId. Only rows that template owns in this project are removed; other ids are ignored. The template's own wiring row and the page itself are never removed. Returns the number removed.
  • reset-localized (content:delete, confirm equal to assignmentId): removes the localized assignment assignmentId of page pageId so the route falls back to the default page. A version of the content is kept for recovery.
  • rename-locale (content:delete, confirm equal to the projectId): moves every assignment of the project from fromLocale to toLocale. Returns the number of rows moved.

A wrong confirm value returns 400 INVALID_PARAMS.

Required scope: content:write (all operations); unassign, reset-localized and rename-locale also need content:delete

post/projects/{projectId}/assignments

Request

  • Base URL
    https://studio.weaverse.io/api/v1/content
  • Auth
    HTTP bearer

Request body

OR
OR
OR
OR

Response

Operation result

object required

Changes

No recorded changes to this operation across all 1 revision of this API.