properties on committed models). Metadata is workspace configuration stored on each project record.
The supported flow is:
- Confirm permissions (optional but recommended)
- Read or set the workspace metadata template (admins)
- Read per-project values
- Update values with a partial merge (
nullclears a key)
Project metadata is in active development. Today, the GraphQL API backs the Metadata card on project Home. We are seeking feedback on how you want to use it next—for example user-facing project filters, automation context, or reference bounds for Speckle Intelligence chat responses. Share feedback on Speckle Community.
Prerequisites
- A personal access token for your Speckle server
- Workspace admin role to set or delete the workspace metadata template
- Project owner role (or workspace admin) to update values on a project
- An Enterprise workspace with project metadata enabled
- Target
workspaceIdandprojectIdstrings (from the web app URL or GraphQL)
Project metadata is available on the Enterprise plan. The workspaces module must be enabled on the server.
End-user setup: Project metadata (template builder) and Metadata on Projects (Home card, drift, layout).
Before you start: IDs and permission checks
You typically need:workspaceId— from the workspace URL orworkspace(id: …) { id }projectId— from/projects/{id}/in the web app orproject(id: …) { id }
workspaceId as String! and others as ID! in the GraphQL schema. Use the same identifier string in both cases.
Query permission checks before you build automation:
POST /graphql
Query:
| Check | Who is authorized |
|---|---|
canManageProjectMetadataSchema | Workspace Admin |
canUpdateMetadata | Project Owner or workspace Admin |
Overview
Two layers work together:- Workspace schema — a JSON Schema template (
workspace.projectMetadataSchema) that defines which fields exist - Project values — stored data (
project.metadata.values) keyed by field name
Step 1: Read the workspace schema
Use this to discover the template before reading or writing project values. POST/graphql
Query:
null for projectMetadataSchema when no template is configured yet.
The response includes additionalProperties: false after save even if you omitted it in the mutation input.
Step 2: Set the workspace schema
Workspace admins define or replace the template for all projects in the workspace. POST/graphql
Mutation:
PROJECT_METADATA_SCHEMA_DOC_VALIDATION_ERROR with JSON Pointer paths (for example /properties/nested/type).
Include
propertyOrder with every property key when you care about display order. The web app builder sets it from drag order (Field types). PostgreSQL jsonb does not preserve key insertion order.Step 3: Read project metadata
POST/graphql
Query:
metadata is null when the project has no stored values yet. The response may still include keys that are no longer in the workspace template (legacy data). The web app hides those keys; the API returns them until cleared.
Step 4: Update project metadata
updateMetadata accepts a partial values object. Only keys in the input are validated and written. Pass null for a key to clear it.
POST /graphql
Mutation:
PROJECT_METADATA_SCHEMA_NOT_CONFIGURED— workspace has no template yetPROJECT_METADATA_VALUES_VALIDATION_ERROR— value fails type, enum, pattern, or URI format checks
Step 5: Delete the workspace schema (optional)
Workspace admins can remove the template and all stored values. This is irreversible. POST/graphql
Mutation:
Operational notes
- The server does not enforce
requiredonupdateMetadata. Required flags are UI guidance; your integration can enforce them or ignore them. - The server adds
additionalProperties: falsewhen a schema is stored. You can omit it insetProjectMetadataSchemainput; read responses include it. Value writes reject unknown keys against the stored schema. - Property keys are locked in the web UI after the first template save. Treat renames as a new key and clear the old key with
null. - Enum and pattern constraints must match the workspace schema exactly or writes fail validation.
- Drift warnings (N problem(s)) are a web-app concern for project owners and workspace admins only. The API does not expose drift; integrations may validate full documents client-side or ignore drift.
What developers need to know
What is the workspace schema format?
What is the workspace schema format?
The template is a constrained JSON Schema 2020-12 document. Top level:
Not supported: nested objects, arrays,
type: object, non-empty properties, optional required, optional propertyOrder listing every property key once, and additionalProperties: false (added on save if omitted).Property keys must match ^[a-zA-Z_][a-zA-Z0-9_]*$.Supported property types:type | Extras |
|---|---|
string | title, description, maxLength, pattern, format (uri only), enum, x-ui-type |
number | minimum, maximum, exclusiveMinimum, exclusiveMaximum |
boolean | title, description |
integer, $ref, oneOf, anyOf, format: email.How do web app field types map to JSON Schema?
How do web app field types map to JSON Schema?
Match the Field types table in the user guide:
| Web app field type | JSON Schema |
|---|---|
| Text | type: "string", "x-ui-type": "text" |
| Long text | type: "string", "x-ui-type": "textarea" |
| URL | type: "string", "format": "uri", "x-ui-type": "url" |
| Dropdown | type: "string", "enum": ["option1", "option2"], "x-ui-type": "dropdown" |
| Number | type: "number" (optional min/max) |
| Yes / No | type: "boolean" |
What is x-ui-type?
What is x-ui-type?
Optional hint for the web app JSONForms renderer. Valid values:
text, textarea, url, dropdown. Omit it only when enum or format: uri already implies the control (dropdown and URL fields). Invalid values fail schema validation. Integrations that only read or write API values can ignore x-ui-type; it does not affect server value validation.How does schema evolution affect stored values?
How does schema evolution affect stored values?
Updating the template does not rewrite project data. If you remove a field from the template, existing values for that key can remain in
metadata.values until cleared.Example: the template had city with value "London". You replace city with stadt in the template. A read still returns both keys until you run:What is drift and does the server enforce it?
What is drift and does the server enforce it?
The web app flags drift (missing required values, type mismatches, constraint violations) for project owners and workspace admins on project Home. Project members see read-only values without drift warnings. The server does not block writes based on
required or drift.Integrations may replicate drift checks client-side or ignore them. Orphaned keys (removed from the template) are not writable until the key exists in the schema again. See Metadata on Projects.Which GraphQL error codes should I handle?
Which GraphQL error codes should I handle?
| Code | When |
|---|---|
PROJECT_METADATA_SCHEMA_DOC_VALIDATION_ERROR | Invalid workspace schema document |
PROJECT_METADATA_VALUES_VALIDATION_ERROR | Invalid values on updateMetadata |
PROJECT_METADATA_SCHEMA_NOT_CONFIGURED | updateMetadata when no workspace template exists |
Can I automate this with SpecklePy?
Can I automate this with SpecklePy?
Yes. Use
authenticate_with_token, then execute_query or POST the same payloads to {host}/graphql with requests or httpx. Pass the operations from this guide as query strings and variables.Related Documentation
- GraphQL API reference — Apollo Studio and general API usage
- Project metadata (user guide) — workspace template and field types
- Metadata on Projects — Home card, layout, drift, and edit workflows