Browse documentation DocumentationLet’s talk
Documentation / Build with Rokn

Project links, delete previews and contracts

A project's links, what a client or project delete would remove, and the rules for contracts without a client.

Project links, delete previews and contracts. Every path below is under /api/v1/workspaces/{slug} and follows the usual rules: bearer credential, the workspace in the path, problem-details errors. A record of another workspace is always 404.

A project's links are the addresses it lives at: its site, app, login, dashboards or hosting panel. They show on the project's Overview.

  • GET …/projects/{id}/links (projects:read, tool list_project_links) returns the links in order. It is not paginated.
  • PUT …/projects/{id}/links (projects:write, tool set_project_links) REPLACES the whole list with links, in the order given: at most 30, each a label of 1 to 60 characters and an absolute http(s) url without a username or password. The address is stored normalized. An empty list removes every link.

Because the write replaces the set, send every link you want to keep.

Delete previews

Read what a delete would do before you do it. Both reads change nothing.

  • GET …/clients/{id}/delete-impact (clients:write, tool get_client_delete_impact) and GET …/projects/{id}/delete-impact (projects:write, tool get_project_delete_impact).
  • The answer counts what the delete removes (deleted), what it detaches and keeps (unlinked) and what stops it (blocked, with the records in blockedRecords). It also gives signedContracts and, for a project, crossProjectDependencies, the task dependencies on other projects that would be removed.
  • blockedByPermission names the sections whose removed rows the caller may not delete. The delete is then refused, as the preview needs a role that may delete.
  • A delete moves the record to the recycle bin for 30 days, where owners and admins can restore it.

Contracts

  • Contract operations need contracts:read or contracts:write. The documents scopes no longer cover them: give a key that manages contracts the contracts scopes.
  • A contract needs no client. A draft may be saved with no signers, and sending an empty roster is refused. A contact signer needs a client and is otherwise refused with contract_contact_needs_client.
  • A draft whose document and project name different clients is 409 conflict with the reason contract_client_mismatch.
  • Once a contract is sent it keeps its own client, even if its project changes.