Workspace service#
This service provides information about workspaces. Workspaces provide access control boundaries. All resources in Nominal live within a workspace.
OpenAPI file: WorkspaceService.json
Endpoints#
Get workspaces#
GET /workspaces/v1/workspaces
Gets all workspaces that the requesting user belongs to. Filters results to workspaces in the user’s session org, unless otherwise specified.
Query parameters
filterBySessionOrgbooleanWhen true (the default), returns only workspaces in the caller’s session org. When false, returns workspaces across all orgs the user belongs to.
includeGuestWorkspacesbooleanWhen true, includes workspaces where the user matches a guest condition. When false (the default), returns only workspaces where the user is a full member.
Response
The body is an array of Workspace.
Fields of Workspace
idstringA unique identifier for the workspace within the organization. The workspace ID must be lower case alphanumeric characters, optionally separated by hyphens.
ridstring (RID)
orgstring (RID)
displayNamestring
symbolWorkspaceSymbol
Set
typeto"icon".iconstringWorkspace icon name (e.g. castle)
Set
typeto"emoji".emojistringWorkspace emoji name (e.g. :castle:)
Set
typeto"image".imagestringWorkspace image url (e.g. https://example.com/image.png)
settingsWorkspaceSettings
Fields of
WorkspaceSettingsrefNamesPreferredRefNameConfiguration
Set
typeto"v1".v1array ofRefNameAndType
Fields of
RefNameAndTypenamestring
typeDataSourceType
Values of
DataSourceTypeDATASET
CONNECTION
VIDEO
SPATIAL
proceduresProcedureSettings
Set
typeto"v1".v1ProcedureSettingsV1
Fields of
ProcedureSettingsV1workspaceProceduresarray of string (RID)A list of procedures that are elevated to the workspace-level. They will be available for execution in a top-level context, rather than just from the procedure details page.
Request
curl "https://api.gov.nominal.io/api/workspaces/v1/workspaces" \
-H "Authorization: Bearer <api key>"
import requests
response = requests.get(
"https://api.gov.nominal.io/api/workspaces/v1/workspaces",
headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.get(
"https://api.gov.nominal.io/api/workspaces/v1/workspaces",
headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import asyncio
import aiohttp
async def main() -> None:
async with aiohttp.ClientSession() as session:
async with session.get(
"https://api.gov.nominal.io/api/workspaces/v1/workspaces",
headers={"Authorization": "Bearer <api key>"},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
[
{
"id": "<workspace id>",
"rid": "<workspace rid>",
"org": "<org rid>",
"displayName": "<display name>",
"symbol": {
"type": "icon",
"icon": "<icon>"
},
"settings": {
"refNames": {
"type": "v1",
"v1": [
{
"name": "<data source ref name>",
"type": "DATASET"
}
]
},
"procedures": {
"type": "v1",
"v1": {
"workspaceProcedures": [
"<procedure rid>"
]
}
}
}
}
]
Get workspace#
GET /workspaces/v1/workspaces/{workspaceRid}
Gets the workspace with the specified WorkspaceRid. Throws if the requesting user does not have access to the workspace based on their current session.
Path parameters
workspaceRidstring (RID) required
Response
idstringA unique identifier for the workspace within the organization. The workspace ID must be lower case alphanumeric characters, optionally separated by hyphens.
ridstring (RID)
orgstring (RID)
displayNamestring
symbolWorkspaceSymbol
Set
typeto"icon".iconstringWorkspace icon name (e.g. castle)
Set
typeto"emoji".emojistringWorkspace emoji name (e.g. :castle:)
Set
typeto"image".imagestringWorkspace image url (e.g. https://example.com/image.png)
settingsWorkspaceSettings
Fields of
WorkspaceSettingsrefNamesPreferredRefNameConfiguration
Set
typeto"v1".v1array ofRefNameAndType
Fields of
RefNameAndTypenamestring
typeDataSourceType
Values of
DataSourceTypeDATASET
CONNECTION
VIDEO
SPATIAL
proceduresProcedureSettings
Set
typeto"v1".v1ProcedureSettingsV1
Fields of
ProcedureSettingsV1workspaceProceduresarray of string (RID)A list of procedures that are elevated to the workspace-level. They will be available for execution in a top-level context, rather than just from the procedure details page.
Request
curl "https://api.gov.nominal.io/api/workspaces/v1/workspaces/<workspace rid>" \
-H "Authorization: Bearer <api key>"
import requests
response = requests.get(
"https://api.gov.nominal.io/api/workspaces/v1/workspaces/<workspace rid>",
headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.get(
"https://api.gov.nominal.io/api/workspaces/v1/workspaces/<workspace rid>",
headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import asyncio
import aiohttp
async def main() -> None:
async with aiohttp.ClientSession() as session:
async with session.get(
"https://api.gov.nominal.io/api/workspaces/v1/workspaces/<workspace rid>",
headers={"Authorization": "Bearer <api key>"},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"id": "<workspace id>",
"rid": "<workspace rid>",
"org": "<org rid>",
"displayName": "<display name>",
"symbol": {
"type": "icon",
"icon": "<icon>"
},
"settings": {
"refNames": {
"type": "v1",
"v1": [
{
"name": "<data source ref name>",
"type": "DATASET"
}
]
},
"procedures": {
"type": "v1",
"v1": {
"workspaceProcedures": [
"<procedure rid>"
]
}
}
}
}
Update workspace#
PUT /workspaces/v1/workspaces/{rid}
Updates the settings of the workspace with the specified WorkspaceRid.
Path parameters
ridstring (RID) required
Body
displayNameUpdateOrRemoveWorkspaceDisplayName
Set
typeto"displayName".displayNamestring
Set
typeto"removeType".removeTypeRemoveType
symbolUpdateOrRemoveWorkspaceSymbol
Set
typeto"symbol".symbolWorkspaceSymbol
Set
typeto"icon".iconstringWorkspace icon name (e.g. castle)
Set
typeto"emoji".emojistringWorkspace emoji name (e.g. :castle:)
Set
typeto"image".imagestringWorkspace image url (e.g. https://example.com/image.png)
Set
typeto"removeType".removeTypeRemoveType
settingsWorkspaceSettings
Fields of
WorkspaceSettingsrefNamesPreferredRefNameConfiguration
Set
typeto"v1".v1array ofRefNameAndType
Fields of
RefNameAndTypenamestring required
typeDataSourceTyperequired
Values of
DataSourceTypeDATASET
CONNECTION
VIDEO
SPATIAL
proceduresProcedureSettings
Set
typeto"v1".v1ProcedureSettingsV1
Fields of
ProcedureSettingsV1workspaceProceduresarray of string (RID)A list of procedures that are elevated to the workspace-level. They will be available for execution in a top-level context, rather than just from the procedure details page.
Response
idstringA unique identifier for the workspace within the organization. The workspace ID must be lower case alphanumeric characters, optionally separated by hyphens.
ridstring (RID)
orgstring (RID)
displayNamestring
symbolWorkspaceSymbol
Set
typeto"icon".iconstringWorkspace icon name (e.g. castle)
Set
typeto"emoji".emojistringWorkspace emoji name (e.g. :castle:)
Set
typeto"image".imagestringWorkspace image url (e.g. https://example.com/image.png)
settingsWorkspaceSettings
Fields of
WorkspaceSettingsrefNamesPreferredRefNameConfiguration
Set
typeto"v1".v1array ofRefNameAndType
Fields of
RefNameAndTypenamestring
typeDataSourceType
Values of
DataSourceTypeDATASET
CONNECTION
VIDEO
SPATIAL
proceduresProcedureSettings
Set
typeto"v1".v1ProcedureSettingsV1
Fields of
ProcedureSettingsV1workspaceProceduresarray of string (RID)A list of procedures that are elevated to the workspace-level. They will be available for execution in a top-level context, rather than just from the procedure details page.
Request
curl -X PUT "https://api.gov.nominal.io/api/workspaces/v1/workspaces/<rid>" \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
--data '{
"displayName": {
"type": "displayName",
"displayName": "<display name>"
},
"symbol": {
"type": "symbol",
"symbol": {
"type": "icon",
"icon": "<icon>"
}
},
"settings": {
"refNames": {
"type": "v1",
"v1": [
{
"name": "<data source ref name>",
"type": "DATASET"
}
]
},
"procedures": {
"type": "v1",
"v1": {
"workspaceProcedures": [
"<procedure rid>"
]
}
}
}
}'
import requests
response = requests.put(
"https://api.gov.nominal.io/api/workspaces/v1/workspaces/<rid>",
headers={"Authorization": "Bearer <api key>"},
json={
"displayName": {"type": "displayName", "displayName": "<display name>"},
"symbol": {"type": "symbol", "symbol": {"type": "icon", "icon": "<icon>"}},
"settings": {
"refNames": {
"type": "v1",
"v1": [{"name": "<data source ref name>", "type": "DATASET"}],
},
"procedures": {
"type": "v1",
"v1": {"workspaceProcedures": ["<procedure rid>"]},
},
},
},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.put(
"https://api.gov.nominal.io/api/workspaces/v1/workspaces/<rid>",
headers={"Authorization": "Bearer <api key>"},
json={
"displayName": {"type": "displayName", "displayName": "<display name>"},
"symbol": {"type": "symbol", "symbol": {"type": "icon", "icon": "<icon>"}},
"settings": {
"refNames": {
"type": "v1",
"v1": [{"name": "<data source ref name>", "type": "DATASET"}],
},
"procedures": {
"type": "v1",
"v1": {"workspaceProcedures": ["<procedure rid>"]},
},
},
},
)
response.raise_for_status()
print(response.json())
import asyncio
import aiohttp
async def main() -> None:
async with aiohttp.ClientSession() as session:
async with session.put(
"https://api.gov.nominal.io/api/workspaces/v1/workspaces/<rid>",
headers={"Authorization": "Bearer <api key>"},
json={
"displayName": {"type": "displayName", "displayName": "<display name>"},
"symbol": {
"type": "symbol",
"symbol": {"type": "icon", "icon": "<icon>"},
},
"settings": {
"refNames": {
"type": "v1",
"v1": [{"name": "<data source ref name>", "type": "DATASET"}],
},
"procedures": {
"type": "v1",
"v1": {"workspaceProcedures": ["<procedure rid>"]},
},
},
},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"id": "<workspace id>",
"rid": "<workspace rid>",
"org": "<org rid>",
"displayName": "<display name>",
"symbol": {
"type": "icon",
"icon": "<icon>"
},
"settings": {
"refNames": {
"type": "v1",
"v1": [
{
"name": "<data source ref name>",
"type": "DATASET"
}
]
},
"procedures": {
"type": "v1",
"v1": {
"workspaceProcedures": [
"<procedure rid>"
]
}
}
}
}
Get default workspace#
GET /workspaces/v1/default-workspace
Gets the default workspace for the requesting user. If the user belongs to a single workspace, that workspace is returned. Otherwise, if the user’s organization has a default workspace and the user belongs to it, that will be returned.
Request
No parameters and no body.
Response
idstringA unique identifier for the workspace within the organization. The workspace ID must be lower case alphanumeric characters, optionally separated by hyphens.
ridstring (RID)
orgstring (RID)
displayNamestring
symbolWorkspaceSymbol
Set
typeto"icon".iconstringWorkspace icon name (e.g. castle)
Set
typeto"emoji".emojistringWorkspace emoji name (e.g. :castle:)
Set
typeto"image".imagestringWorkspace image url (e.g. https://example.com/image.png)
settingsWorkspaceSettings
Fields of
WorkspaceSettingsrefNamesPreferredRefNameConfiguration
Set
typeto"v1".v1array ofRefNameAndType
Fields of
RefNameAndTypenamestring
typeDataSourceType
Values of
DataSourceTypeDATASET
CONNECTION
VIDEO
SPATIAL
proceduresProcedureSettings
Set
typeto"v1".v1ProcedureSettingsV1
Fields of
ProcedureSettingsV1workspaceProceduresarray of string (RID)A list of procedures that are elevated to the workspace-level. They will be available for execution in a top-level context, rather than just from the procedure details page.
When there is nothing to return, the response is HTTP 204 with no body.
Request
curl "https://api.gov.nominal.io/api/workspaces/v1/default-workspace" \
-H "Authorization: Bearer <api key>"
import requests
response = requests.get(
"https://api.gov.nominal.io/api/workspaces/v1/default-workspace",
headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.get(
"https://api.gov.nominal.io/api/workspaces/v1/default-workspace",
headers={"Authorization": "Bearer <api key>"},
)
response.raise_for_status()
print(response.json())
import asyncio
import aiohttp
async def main() -> None:
async with aiohttp.ClientSession() as session:
async with session.get(
"https://api.gov.nominal.io/api/workspaces/v1/default-workspace",
headers={"Authorization": "Bearer <api key>"},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"id": "<workspace id>",
"rid": "<workspace rid>",
"org": "<org rid>",
"displayName": "<display name>",
"symbol": {
"type": "icon",
"icon": "<icon>"
},
"settings": {
"refNames": {
"type": "v1",
"v1": [
{
"name": "<data source ref name>",
"type": "DATASET"
}
]
},
"procedures": {
"type": "v1",
"v1": {
"workspaceProcedures": [
"<procedure rid>"
]
}
}
}
}
Errors#
Errors shows how these errors are sent.
Each error’s errorName is Security: followed by its name below.
Status |
Name |
Notes |
|---|---|---|
400 |
|
Workspaces are hard boundaries in Nominal. Resources from different workspaces cannot be combined. |
400 |
|
A workspace was not specified and could not be inferred. |
404 |
|
The workspace with the specified rid was not found. |
Types#
DataSourceType#
DATASET
CONNECTION
VIDEO
SPATIAL
PreferredRefNameConfiguration#
Set type to the name of one of the other fields, and set only that field.
v1array ofRefNameAndType
ProcedureSettings#
Set type to the name of one of the other fields, and set only that field.
ProcedureSettingsV1#
workspaceProceduresarray of string (RID)A list of procedures that are elevated to the workspace-level. They will be available for execution in a top-level context, rather than just from the procedure details page.
RefNameAndType#
namestring required
typeDataSourceTyperequired
RemoveType#
The request to remove a field from a workspace.
An empty JSON object, {}.
UpdateOrRemoveWorkspaceDisplayName#
The request to update the display name of the workspace. The request will replace the existing display name with the display name specified if it’s provided. Otherwise, the current display name will be removed from the workspace.
Set type to the name of one of the other fields, and set only that field.
displayNamestring
removeTypeRemoveType
UpdateOrRemoveWorkspaceSymbol#
The request to update the symbol of the workspace. The request will replace the existing symbol with the symbol specified if it’s provided. Otherwise, the current symbol will be removed from the workspace.
Set type to the name of one of the other fields, and set only that field.
symbolWorkspaceSymbol
removeTypeRemoveType
Workspace#
idstring requiredA unique identifier for the workspace within the organization. The workspace ID must be lower case alphanumeric characters, optionally separated by hyphens.
ridstring (RID) required
orgstring (RID) required
displayNamestring
symbolWorkspaceSymbol
settingsWorkspaceSettingsrequired
WorkspaceSettings#
refNamesPreferredRefNameConfiguration
proceduresProcedureSettings
WorkspaceSymbol#
Set type to the name of one of the other fields, and set only that field.
iconstringWorkspace icon name (e.g. castle)
emojistringWorkspace emoji name (e.g. :castle:)
imagestringWorkspace image url (e.g. https://example.com/image.png)
Page design based on Scalar, MIT License.