# Workspaces

​ A workspace is a collaboration context for the two involved parties. At least one party must be authorized to create a workspace and invite another party to it. The workspace becomes a shared place for the electronic documents and catalogs created by these parties and either one can view the objects that are created within it.

# Data Model

All entities used for this API follow canonical Entity Envelope data format. Below is the workspace entity body schema.

Field Type Description
description string User-friendly textual description of the workspace.
parties object A list of workspace parties.
parties.client.id reference Reference to the client's record in the Bridge Organization registry.
parties.client.xref string
parties.vendor.id reference Reference to the vendors's record in the Bridge Organization registry.
parties.vendor.xref string

# Example Body

{
  "description": "Workspace 1",
  "parties": {
    "client": {
      "id": "8d5ad423-bfdd-4b66-a6de-0cde92707f54",
      "xref": "abcd"
    },
    "vendor": {
      "id": "32c2798a-1aae-4398-b12e-65e99effaaa2",
      "xref": "2345"
    }
  }
}

# Search Workspaces

GET /v2/workspaces

# Query parameters

​Parameter Description Type Required Default
limit Maximum number of records to return integer no 25
offset The number of records to skip integer no 0
sort List of comma-separated ordering criteria string: field:asc|desc no "created_at:desc, id:asc"
filter[body.parties.client.id] Client organization ID. UUID no
filter[body.parties.vendor.id] Vendor organization ID. UUID no
filter[body.description] Workspace description. UUID no

# Request body

None

# Response

An array of entity envelopes with the type set to navarik.bridge.workspace and the body formatted to the workspace model.

# Create Workspace

POST /v2/workspaces

# Query parameters

None

# Request body

See data model

# Response

A single entity envelope with the type set to navarik.bridge.workspace and the body formatted to the workspace model.

# Get Workspace by ID

​ Retrieves the details of an existing workspace. You need only supply the unique workspace identifier that was returned upon workspace creation.

GET /v2/workspaces/{workspace_id}

# Request parameters

Parameter Description Type Required Default
workspace_id Workspace ID UUID yes

# Request body

None

# Response

A single entity envelope with the type set to navarik.bridge.workspace and the body formatted to the workspace model.

# Update Workspace

​ Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

PATCH /v2/workspaces/{workspace_id}

# Request parameters

Parameter Description Type Required Default
workspace_id Workspace ID UUID yes

# Request body

Parameter Description Type Required Default
body Changes to the entity body. object yes
body.description Workspace description. string no

Note: Parties are not allowed to be updated. Attempting to update workspace parties causes no errors, but produces no changes.

# Response

A single entity envelope with the type set to navarik.bridge.workspace and the body formatted to the workspace model.

# Delete Workspace

​ Permanently deletes a workspace. It cannot be undone.

DELETE /v2/workspaces/{workspace_id}

# Request parameters

Parameter Description Type Required Default
workspace_id Workspace ID UUID yes

# Request body

None

# Response

The latest known version of deleted workspace as a single entity envelope with the type set to navarik.bridge.workspace and the body formatted to the workspace model.

A workspace containing documents cannot be deleted and returns an error Workspace is not empty. Deleting a workspace with an invalid ID returns a 404 error.