Workspace service#
This service provides information about workspaces. Workspaces provide access control boundaries. All resources in Nominal live within a workspace.
OpenAPI file: nominal.workspaces.v1.json
Endpoints#
Get default workspace#
GET /workspaces/v2/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
workspaceWorkspace
Fields of
WorkspaceidstringA unique identifier for the workspace within the organization. The workspace ID must be lower case alphanumeric characters, optionally separated by hyphens.
ridstring
orgstring
displayNamestring
symbolWorkspaceSymbol
Fields of
WorkspaceSymbol- one of
icon,emoji,image
iconstringWorkspace icon name (e.g. castle)
emojistringWorkspace emoji name (e.g. :castle:)
imagestringWorkspace image url (e.g. https://example.com/image.png)
- one of
settingsWorkspaceSettings
Fields of
WorkspaceSettingsrefNamesPreferredRefNameConfiguration
Fields of
PreferredRefNameConfigurationv1array ofRefNameAndType
Fields of
RefNameAndTypenamestring
typeDataSourceType
Values of
DataSourceTypeDATA_SOURCE_TYPE_UNSPECIFIED
DATASET
CONNECTION
VIDEO
SPATIAL
proceduresProcedureSettings
Fields of
ProcedureSettingsv1ProcedureSettingsV1
Fields of
ProcedureSettingsV1workspaceProceduresarray of stringA 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/v2/default-workspace" \
-H "Authorization: Bearer <api key>"
import requests
response = requests.get(
"https://api.gov.nominal.io/api/workspaces/v2/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/v2/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/v2/default-workspace",
headers={"Authorization": "Bearer <api key>"},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"workspace": {
"id": "<id>",
"rid": "<rid>",
"org": "<org>",
"displayName": "<display name>",
"symbol": {
"icon": "<icon>"
},
"settings": {
"refNames": {
"v1": [
{
"name": "<name>",
"type": "DATASET"
}
]
},
"procedures": {
"v1": {
"workspaceProcedures": [
"<workspace procedures>"
]
}
}
}
}
}
Get workspaces#
GET /workspaces/v2/workspaces
Gets all workspaces that the requesting user belongs to.
Query parameters
filterBySessionOrgbooleanWhen unset, defaults to true.
includeGuestWorkspacesbooleanWhen unset, defaults to false.
includeRoleBoundWorkspacesbooleanWhen unset, defaults to false. Also returns the session org’s workspaces where a role binding grants the caller workspace:view.
Response
workspacesarray ofWorkspace
Fields of
WorkspaceidstringA unique identifier for the workspace within the organization. The workspace ID must be lower case alphanumeric characters, optionally separated by hyphens.
ridstring
orgstring
displayNamestring
symbolWorkspaceSymbol
Fields of
WorkspaceSymbol- one of
icon,emoji,image
iconstringWorkspace icon name (e.g. castle)
emojistringWorkspace emoji name (e.g. :castle:)
imagestringWorkspace image url (e.g. https://example.com/image.png)
- one of
settingsWorkspaceSettings
Fields of
WorkspaceSettingsrefNamesPreferredRefNameConfiguration
Fields of
PreferredRefNameConfigurationv1array ofRefNameAndType
Fields of
RefNameAndTypenamestring
typeDataSourceType
Values of
DataSourceTypeDATA_SOURCE_TYPE_UNSPECIFIED
DATASET
CONNECTION
VIDEO
SPATIAL
proceduresProcedureSettings
Fields of
ProcedureSettingsv1ProcedureSettingsV1
Fields of
ProcedureSettingsV1workspaceProceduresarray of stringA 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/v2/workspaces" \
-H "Authorization: Bearer <api key>"
import requests
response = requests.get(
"https://api.gov.nominal.io/api/workspaces/v2/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/v2/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/v2/workspaces",
headers={"Authorization": "Bearer <api key>"},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"workspaces": [
{
"id": "<id>",
"rid": "<rid>",
"org": "<org>",
"displayName": "<display name>",
"symbol": {
"icon": "<icon>"
},
"settings": {
"refNames": {
"v1": [
{
"name": "<name>",
"type": "DATASET"
}
]
},
"procedures": {
"v1": {
"workspaceProcedures": [
"<workspace procedures>"
]
}
}
}
}
]
}
Update workspace#
PUT /workspaces/v2/workspaces/{rid}
Updates the settings of the workspace with the specified WorkspaceRid.
Path parameters
ridstring required
Body
requestUpdateWorkspaceRequest
Fields of
UpdateWorkspaceRequestdisplayNameUpdateOrRemoveWorkspaceDisplayName
Fields of
UpdateOrRemoveWorkspaceDisplayName- one of
displayName,removeTyperequired
displayNamestring
removeTypeRemoveType
- one of
symbolUpdateOrRemoveWorkspaceSymbol
Fields of
UpdateOrRemoveWorkspaceSymbol- one of
symbol,removeTyperequired
symbolWorkspaceSymbol
Fields of
WorkspaceSymbol- one of
icon,emoji,imagerequired
iconstringWorkspace icon name (e.g. castle)
emojistringWorkspace emoji name (e.g. :castle:)
imagestringWorkspace image url (e.g. https://example.com/image.png)
- one of
removeTypeRemoveType
- one of
settingsWorkspaceSettingsExcluded fields in the settings update will be ignored.
Fields of
WorkspaceSettingsrefNamesPreferredRefNameConfiguration
Fields of
PreferredRefNameConfigurationv1array ofRefNameAndType
Fields of
RefNameAndTypenamestring
typeDataSourceType
Values of
DataSourceTypeDATA_SOURCE_TYPE_UNSPECIFIED
DATASET
CONNECTION
VIDEO
SPATIAL
proceduresProcedureSettings
Fields of
ProcedureSettingsv1ProcedureSettingsV1
Fields of
ProcedureSettingsV1workspaceProceduresarray of stringA 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
workspaceWorkspace
Fields of
WorkspaceidstringA unique identifier for the workspace within the organization. The workspace ID must be lower case alphanumeric characters, optionally separated by hyphens.
ridstring
orgstring
displayNamestring
symbolWorkspaceSymbol
Fields of
WorkspaceSymbol- one of
icon,emoji,image
iconstringWorkspace icon name (e.g. castle)
emojistringWorkspace emoji name (e.g. :castle:)
imagestringWorkspace image url (e.g. https://example.com/image.png)
- one of
settingsWorkspaceSettings
Fields of
WorkspaceSettingsrefNamesPreferredRefNameConfiguration
Fields of
PreferredRefNameConfigurationv1array ofRefNameAndType
Fields of
RefNameAndTypenamestring
typeDataSourceType
Values of
DataSourceTypeDATA_SOURCE_TYPE_UNSPECIFIED
DATASET
CONNECTION
VIDEO
SPATIAL
proceduresProcedureSettings
Fields of
ProcedureSettingsv1ProcedureSettingsV1
Fields of
ProcedureSettingsV1workspaceProceduresarray of stringA 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/v2/workspaces/<rid>" \
-H "Authorization: Bearer <api key>" \
-H "Content-Type: application/json" \
--data '{
"request": {
"displayName": {
"displayName": "<display name>"
},
"symbol": {
"symbol": {
"icon": "<icon>"
}
},
"settings": {
"refNames": {
"v1": [
{
"name": "<name>",
"type": "DATASET"
}
]
},
"procedures": {
"v1": {
"workspaceProcedures": [
"<workspace procedures>"
]
}
}
}
}
}'
import requests
response = requests.put(
"https://api.gov.nominal.io/api/workspaces/v2/workspaces/<rid>",
headers={"Authorization": "Bearer <api key>"},
json={
"request": {
"displayName": {"displayName": "<display name>"},
"symbol": {"symbol": {"icon": "<icon>"}},
"settings": {
"refNames": {"v1": [{"name": "<name>", "type": "DATASET"}]},
"procedures": {
"v1": {"workspaceProcedures": ["<workspace procedures>"]},
},
},
},
},
)
response.raise_for_status()
print(response.json())
import httpx
response = httpx.put(
"https://api.gov.nominal.io/api/workspaces/v2/workspaces/<rid>",
headers={"Authorization": "Bearer <api key>"},
json={
"request": {
"displayName": {"displayName": "<display name>"},
"symbol": {"symbol": {"icon": "<icon>"}},
"settings": {
"refNames": {"v1": [{"name": "<name>", "type": "DATASET"}]},
"procedures": {
"v1": {"workspaceProcedures": ["<workspace procedures>"]},
},
},
},
},
)
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/v2/workspaces/<rid>",
headers={"Authorization": "Bearer <api key>"},
json={
"request": {
"displayName": {"displayName": "<display name>"},
"symbol": {"symbol": {"icon": "<icon>"}},
"settings": {
"refNames": {"v1": [{"name": "<name>", "type": "DATASET"}]},
"procedures": {
"v1": {"workspaceProcedures": ["<workspace procedures>"]},
},
},
},
},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"workspace": {
"id": "<id>",
"rid": "<rid>",
"org": "<org>",
"displayName": "<display name>",
"symbol": {
"icon": "<icon>"
},
"settings": {
"refNames": {
"v1": [
{
"name": "<name>",
"type": "DATASET"
}
]
},
"procedures": {
"v1": {
"workspaceProcedures": [
"<workspace procedures>"
]
}
}
}
}
}
Get workspace#
GET /workspaces/v2/workspaces/{workspaceRid}
Gets the workspace with the specified WorkspaceRid.
Path parameters
workspaceRidstring required
Response
workspaceWorkspace
Fields of
WorkspaceidstringA unique identifier for the workspace within the organization. The workspace ID must be lower case alphanumeric characters, optionally separated by hyphens.
ridstring
orgstring
displayNamestring
symbolWorkspaceSymbol
Fields of
WorkspaceSymbol- one of
icon,emoji,image
iconstringWorkspace icon name (e.g. castle)
emojistringWorkspace emoji name (e.g. :castle:)
imagestringWorkspace image url (e.g. https://example.com/image.png)
- one of
settingsWorkspaceSettings
Fields of
WorkspaceSettingsrefNamesPreferredRefNameConfiguration
Fields of
PreferredRefNameConfigurationv1array ofRefNameAndType
Fields of
RefNameAndTypenamestring
typeDataSourceType
Values of
DataSourceTypeDATA_SOURCE_TYPE_UNSPECIFIED
DATASET
CONNECTION
VIDEO
SPATIAL
proceduresProcedureSettings
Fields of
ProcedureSettingsv1ProcedureSettingsV1
Fields of
ProcedureSettingsV1workspaceProceduresarray of stringA 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/v2/workspaces/<workspace rid>" \
-H "Authorization: Bearer <api key>"
import requests
response = requests.get(
"https://api.gov.nominal.io/api/workspaces/v2/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/v2/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/v2/workspaces/<workspace rid>",
headers={"Authorization": "Bearer <api key>"},
) as response:
response.raise_for_status()
print(await response.json())
asyncio.run(main())
Response: 200
{
"workspace": {
"id": "<id>",
"rid": "<rid>",
"org": "<org>",
"displayName": "<display name>",
"symbol": {
"icon": "<icon>"
},
"settings": {
"refNames": {
"v1": [
{
"name": "<name>",
"type": "DATASET"
}
]
},
"procedures": {
"v1": {
"workspaceProcedures": [
"<workspace procedures>"
]
}
}
}
}
}
Errors#
Errors shows how these errors are sent.
Each error’s errorName is NominalWorkspacesV1: 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#
DATA_SOURCE_TYPE_UNSPECIFIED
DATASET
CONNECTION
VIDEO
SPATIAL
PreferredRefNameConfiguration#
v1array ofRefNameAndType
ProcedureSettings#
ProcedureSettingsV1#
workspaceProceduresarray of stringA 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
typeDataSourceType
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 exactly one of the fields below.
- one of
displayName,removeTyperequired
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 exactly one of the fields below.
- one of
symbol,removeTyperequired
symbolWorkspaceSymbol
removeTypeRemoveType
UpdateWorkspaceRequest#
displayNameUpdateOrRemoveWorkspaceDisplayName
symbolUpdateOrRemoveWorkspaceSymbol
settingsWorkspaceSettingsExcluded fields in the settings update will be ignored.
Workspace#
idstringA unique identifier for the workspace within the organization. The workspace ID must be lower case alphanumeric characters, optionally separated by hyphens.
ridstring
orgstring
displayNamestring
symbolWorkspaceSymbol
settingsWorkspaceSettings
WorkspaceSettings#
refNamesPreferredRefNameConfiguration
proceduresProcedureSettings
WorkspaceSymbol#
Set exactly one of the fields below.
- one of
icon,emoji,imagerequired
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.