{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":2459,"path":"application-development/servicenow-sdk/fluent-workspace-api.md","title":"Workspace API - ServiceNow Fluent","bundle":null,"doc_type":null,"release":"australia","body":"\n# Workspace API - ServiceNow Fluent\n\nThe Workspace API defines configurable workspace experiences for organizing and sharing data visually.\n\n**Note:** For the latest ServiceNow Fluent API documentation and examples, see the [ServiceNow Fluent API reference](https://servicenow.github.io/sdk/category/api-reference) and [ServiceNow SDK examples repository](https://github.com/ServiceNow/sdk-examples) on GitHub.\n\nThe Workspace API creates application metadata in the following tables depending on the workspace definition: UX Application \\[sys\\_ux\\_page\\_registry\\], UX App Configuration \\[sys\\_ux\\_app\\_config\\], UX Application Category M2M \\[sys\\_ux\\_registry\\_m2m\\_category\\], UX Page Property \\[sys\\_ux\\_page\\_property\\], UX Screen Collection \\[sys\\_ux\\_screen\\_type\\], UX App Route \\[sys\\_ux\\_app\\_route\\], UX Screen \\[sys\\_ux\\_screen\\], and UX Macroponent Definition \\[sys\\_ux\\_macroponent\\].\n\nDashboards can be used as the home page of a workspace by referring to one or more workspaces from the visibilities array of the Dashboard object. To create a dashboard, see [Dashboard API - ServiceNow Fluent](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/servicenow-sdk/fluent-dashboard-api.md).\n\nFor general information about workspaces, see [Configurable Workspace UI](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/workspace-landing-page.md).\n\n**Parent Topic:**[ServiceNow Fluent API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/servicenow-sdk/servicenow-fluent-api-reference.md)\n\n**Related topics**  \n\n\n[ServiceNow Fluent](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/servicenow-fluent.md)\n\n## Workspace object\n\nCreate a workspace for managing business entities in a single focused working area that enables users to complete an entire job.\n\n<table id=\"table_owp_xh2_h3c\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n$id\n\n</td><td>\n\nString or Number\n\n</td><td>\n\nRequired. A unique ID for the metadata object. When you build the application, this ID is hashed into a unique sys\\_id. For more information, see [ServiceNow Fluent language constructs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/servicenow-sdk/fluent-constructs.md).Format: `Now.ID['String' or Number]`\n\n</td></tr><tr><td>\n\ntitle\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. A name for the workspace that appears in navigation and headers.\n\n</td></tr><tr><td>\n\npath\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. The URL path segment of the workspace. Workspace URLs follow the pattern `/now/<path>/<landingPath>` and use kebab case.Workspaces require access control lists \\(ACLs\\) to secure the workspace routes. The field property of an Acl object must match the value of this property with a wildcard pattern: `{workspace.path}.*`.\n\n</td></tr><tr><td>\n\ntables\n\n</td><td>\n\nArray\n\n</td><td>\n\nRequired. A list of table names to manage in the workspace.\n\n</td></tr><tr><td>\n\nlistConfig\n\n</td><td>\n\nReference\n\n</td><td>\n\nRequired. The variable identifier of a UxListMenuConfig object that defines the navigation structure of the workspace. For more information, see [UxListMenuConfig object](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/servicenow-sdk/fluent-workspace-api.md).\n\n</td></tr><tr><td>\n\nlandingPath\n\n</td><td>\n\nString\n\n</td><td>\n\nThe URL path segment of the landing page. Workspace URLs follow the pattern `/now/<path>/<landingPath>` and use kebab case.Default: home\n\n</td></tr><tr><td>\n\nactive\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the workspace is accessible to users.Default: true\n\n</td></tr></tbody>\n</table>```javascript\nimport { Workspace } from '@servicenow/sdk/core';\n\nconst itsmWorkspace = Workspace({\n    $id: Now.ID['itsm_workspace'],\n    title: 'IT Service Management',\n    path: 'itsm',\n    tables: ['incident', 'problem', 'change_request', 'user', 'sys_user_group'],\n    listConfig: incidentListConfig\n})\n```\n\nThe UX List Menu Configuration referenced is defined using the UxListMenuConfig object.\n\n## UxListMenuConfig object\n\nDefine a UX list menu configuration \\[sys\\_ux\\_list\\_menu\\_config\\] for the navigation structure and list views of a workspace.\n\nA UX list menu configuration organizes data into categories and lists, enabling users to access different views of business data with filtering, column selection, and role-based visibility. This structure appears in the workspace's navigation panel, providing organized access to different data views.\n\n<table id=\"table_owp_xh2_h3c\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n$id\n\n</td><td>\n\nString or Number\n\n</td><td>\n\nRequired. A unique ID for the metadata object. When you build the application, this ID is hashed into a unique sys\\_id. For more information, see [ServiceNow Fluent language constructs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/servicenow-sdk/fluent-constructs.md).Format: `Now.ID['String' or Number]`\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. A name for the list configuration.\n\n</td></tr><tr><td>\n\ndescription\n\n</td><td>\n\nString\n\n</td><td>\n\nA description of the list configuration.\n\n</td></tr><tr><td>\n\nactive\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the list configuration is active.Default: true\n\n</td></tr><tr><td>\n\ncategories\n\n</td><td>\n\nArray\n\n</td><td>\n\nA list of top-level groupings in the list configuration. For more information, see [categories array](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/servicenow-sdk/fluent-workspace-api.md).\n\n</td></tr></tbody>\n</table>```javascript\nimport { UxListMenuConfig } from '@servicenow/sdk/core';\n\nconst incidentListConfig = UxListMenuConfig({\n    $id: Now.ID['incident_list_config'],\n    name: 'Incident List Configuration',\n    description: 'Navigation for Incident Workspace',\n    categories: [\n        {\n            $id: Now.ID['incidents_category'],\n            title: 'Incidents',\n            order: 10,\n            lists: [\n                {\n                    $id: Now.ID['incidents_open'],\n                    title: 'Open',\n                    order: 10,\n                    condition: 'active=true^EQ',\n                    table: 'incident',\n                    columns: 'number,short_description,priority,state',\n                    applicabilities: [\n                        {\n                            $id: Now.ID['incidents_open_applicability'],\n                            applicability: applicability\n                        }\n                    ]\n                }\n            ]\n        }\n    ]\n})\n```\n\n### categories array\n\nDefine categories of related lists \\[sys\\_ux\\_list\\_category\\] for a UX list menu configuration.\n\n<table id=\"table_owp_xh2_h3c\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n$id\n\n</td><td>\n\nString or Number\n\n</td><td>\n\nRequired. A unique ID for the metadata object. When you build the application, this ID is hashed into a unique sys\\_id. For more information, see [ServiceNow Fluent language constructs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/servicenow-sdk/fluent-constructs.md).Format: `Now.ID['String' or Number]`\n\n</td></tr><tr><td>\n\ntitle\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. A title for the category to display in the navigation menu.\n\n</td></tr><tr><td>\n\nlists\n\n</td><td>\n\nArray\n\n</td><td>\n\nRequired. A list of list views in the category. For more information, see [lists array](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/servicenow-sdk/fluent-workspace-api.md).\n\n</td></tr><tr><td>\n\norder\n\n</td><td>\n\nNumber\n\n</td><td>\n\nA number indicating the position of the category in the navigation menu. Categories with lower numbers appear first.\n\n</td></tr><tr><td>\n\nactive\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the category is visible in the navigation menu.Default: true\n\n</td></tr><tr><td>\n\ndescription\n\n</td><td>\n\nString\n\n</td><td>\n\nA description of the category.\n\n</td></tr></tbody>\n</table>```javascript\ncategories: [\n    {\n      $id: Now.ID[\"incidents_category\"],\n      title: \"Incidents\",\n      order: 10,\n      lists: [\n        {\n          $id: Now.ID[\"incidents_open\"],\n          title: \"Open\",\n          order: 10,\n          condition: \"active=true^EQ\",\n          table: \"incident\",\n          columns: \"number,short_description,priority,state\",\n          applicabilities: [\n            {\n              $id: Now.ID[\"incidents_open_applicability\"],\n              applicability: applicability\n            }\n          ]\n        },\n        {\n          $id: Now.ID[\"incidents_all\"],\n          title: \"All\",\n          order: 20,\n          condition: \"\",\n          table: \"incident\",\n          columns: \"number,short_description,priority,state\",\n          applicabilities: [\n            {\n              $id: Now.ID[\"incidents_all_applicability\"],\n              applicability: applicability\n            }\n          ]\n        }\n]\n```\n\n#### lists array\n\nDefine list views of table data \\[sys\\_ux\\_list\\] with filtering and column configurations for a UX list menu configuration.\n\n<table id=\"table_owp_xh2_h3c\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n$id\n\n</td><td>\n\nString or Number\n\n</td><td>\n\nRequired. A unique ID for the metadata object. When you build the application, this ID is hashed into a unique sys\\_id. For more information, see [ServiceNow Fluent language constructs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/servicenow-sdk/fluent-constructs.md).Format: `Now.ID['String' or Number]`\n\n</td></tr><tr><td>\n\ntitle\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. A title for the list to display in the navigation menu.\n\n</td></tr><tr><td>\n\ntable\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. The name of a table to use for the list.\n\n</td></tr><tr><td>\n\ncolumns\n\n</td><td>\n\nString\n\n</td><td>\n\nA comma-separated list of column names to display in the list.\n\n</td></tr><tr><td>\n\ncondition\n\n</td><td>\n\nString\n\n</td><td>\n\nAn encoded query string to filter the records displayed in the list.\n\n</td></tr><tr><td>\n\norder\n\n</td><td>\n\nNumber\n\n</td><td>\n\nA number indicating the position of the list within its category. Lists with lower numbers appear first.\n\n</td></tr><tr><td>\n\nactive\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the list is visible to users.Default: true\n\n</td></tr><tr><td>\n\napplicabilities\n\n</td><td>\n\nArray\n\n</td><td>\n\nA list of variable identifiers of Applicability objects that control which roles can view the list. For more information, see [Applicability object](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/servicenow-sdk/fluent-workspace-api.md).\n\n</td></tr></tbody>\n</table>```javascript\nlists: [\n        {\n          $id: Now.ID[\"assets_active\"],\n          title: \"Active\",\n          order: 10,\n          condition: \"install_status=1\",\n          table: \"alm_asset\",\n          columns: \"asset_tag,display_name,model_category,assigned_to\",\n          applicabilities: [\n            {\n              $id: Now.ID[\"assets_active_applicability\"],\n              applicability: assetApplicability\n            }\n          ]\n        },\n        {\n          $id: Now.ID[\"assets_all\"],\n          title: \"All\",\n          order: 20,\n          condition: \"\",\n          table: \"alm_asset\",\n          columns: \"asset_tag,display_name,model_category,assigned_to\",\n          applicabilities: [\n            {\n              $id: Now.ID[\"assets_all_applicability\"],\n              applicability: assetApplicability\n            }\n          ]\n  }\n]\n```\n\n## Applicability object\n\nDefine the audience \\[sys\\_ux\\_applicability\\] that can view a list in the UX list menu configuration.\n\n<table id=\"table_owp_xh2_h3c\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\n$id\n\n</td><td>\n\nString or Number\n\n</td><td>\n\nRequired. A unique ID for the metadata object. When you build the application, this ID is hashed into a unique sys\\_id. For more information, see [ServiceNow Fluent language constructs](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/servicenow-sdk/fluent-constructs.md).Format: `Now.ID['String' or Number]`\n\n</td></tr><tr><td>\n\nname\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired. A name for the applicability rule.\n\n</td></tr><tr><td>\n\ndescription\n\n</td><td>\n\nString\n\n</td><td>\n\nA description of the audience.\n\n</td></tr><tr><td>\n\nactive\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the applicability rule is applied.Default: true\n\n</td></tr><tr><td>\n\nroles\n\n</td><td>\n\nArray\n\n</td><td>\n\nA list of variable identifiers of Role objects or sys\\_ids of roles that a user must have to view the list. For more information, see [Role API - ServiceNow Fluent](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/application-development/servicenow-sdk/role-api-now-ts.md).\n\n</td></tr><tr><td>\n\nroleNames\n\n</td><td>\n\nString\n\n</td><td>\n\nA comma-separated list of role names that a user must have to view the list. This property is an alternative to the roles property.\n\n</td></tr></tbody>\n</table>```javascript\nimport { Applicability } from '@servicenow/sdk/core';\n\nconst managerApplicability = Applicability({\n    $id: Now.ID['manager_applicability'],\n    name: 'Managers Only',\n    roles: [managerRole]\n})\n```\n\nThe role referenced is defined using the Role object:\n\n```javascript\nimport { Role } from '@servicenow/sdk/core';\n\nconst managerRole = Role({\n    $id: Now.ID['manager_user_role'],\n    name: 'x_snc_manager.user',\n    containsRoles: ['canvas_user']\n})\n```\n\n"}}