- URL:https://[root]/portals/[portalID]/collaborations/[collaborationID]/addWorkspace(POST only)
- Required Capability:Administrator (host)
- Version Introduced:10.5
Example usage
Below is a sample ArcGIS Online POST request for the addWorkspace operation:
POST /sharing/rest/portals/0123456789ABCDEF/collaborations/3e9d1694351a4b5badef66c7599fced5/addWorkspace HTTP/1.1
Host: org.arcgis.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
collaborationWorkspaceName=Test Workspace&collaborationWorkspaceDescription=Test Workspace for distributed collaboration&portalGroupId=a47d414ceccf447bb0b92adbf189e93e&f=pjsonBelow is a sample ArcGIS Enterprise POST request for the addWorkspace operation:
POST /webadaptor/sharing/rest/portals/0123456789ABCDEF/collaborations/3e9d1694351a4b5badef66c7599fced5/addWorkspace HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
collaborationWorkspaceName=Test Workspace&collaborationWorkspaceDescription=Test Workspace for distributed collaboration&portalGroupId=a47d414ceccf447bb0b92adbf189e93e&f=pjsonDescription
The addWorkspace resource adds a new workspace to a distributed collaboration. Only collaboration hosts can create new workspaces.
Request parameters
| Parameter | Details |
|---|---|
| collaborationWorkspaceName | The name of the new workspace. The workspace name has a limit of 100 characters. Example |
| collaborationWorkspaceDescription | The description of the new workspace. The workspace description has a limit of 250 characters. Example |
| portalGroupId | The ID of the portal group linked with the workspace. Example |
| f | The response format. The default format is html. Values: html | json | pjson |
Response properties
| Property | Details |
|---|---|
| collaborationWorkspaceId | The ID of the new workspace. |
| collaborationId | The ID of the collaboration where the workspace was created. |
| success | Returns the status of whether the operation was successful. Returns true if so. |
JSON Response example
{
"success": true,
"workspace": {
"id": "b8895fa6e10d479cab11858d06df30ab",
"name": "Test Workspace",
"description": "Test Workspace for distributed collaboration",
"collaborationId": "3e9d1694351a4b5badef66c7599fced5",
"config": {
"maxItemSizeInMB": 1024,
"maxReplicationPackageSizeInMB": 5120,
"bidirectionalSyncCapable": true
},
"created": 1615594027324,
"modified": 1615594027324,
"lastSyncSuccess": -1
}
}