Workspace
Introduction
Workspaces represent the largest possible container unit for your organization's content (assessments, items, passages, courses, units, etc.) team members, and all other related assets. In most cases, one organization equals one workspace. In rare cases, it might make sense to license multiple workspaces in Campfire if the content your organization manages requires a more cautious security architecture.
When you create applications in Campfire, and license your curriculum and assessment products to other organizations, you have the authority to create a workspace on your customer's behalf so that you may license your content securely to them.
These routes are for the purpose of creating workspaces that you manage on behalf of customers ("Managed Workspaces") that license your curriculum and assessment products.
Routes
List Workspaces
POST /api/workspaces
Returns current and all managed workspaces.
Sample Request
GET /api/workspaces
Content-Type: application/json
Authorization: Basic *****
Get Workspace
GET /api/workspace/:id
Get Workspace data by ID
→ Sample Request
POST /api/workspaces
Content-Type: application/json
Authorization: Basic {{appKey}}:{{appSecret}}
{
"filter": {
"search": "workspace name"
"address.state": {
"include": [
"b842bb5e-9957-403e-bc54-9a054b290158",
"cdf02148-7888-4e4b-97ff-0003846baa4d",
"993d673c-5c8d-43aa-99ea-8e417d1300dc",
"0c4d9608-48da-409e-bfb5-d0d0a019b7e4"
]
}
}
}
Get Workspace Keys
GET /api/workspace/:id/keys
Get Workspace data by ID
← Sample Response
[
{
"appKey": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"appSecret": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"createdAt": "2024-11-11T20:09:47.357Z",
"updatedAt": "2024-11-11T20:09:47.357Z",
"tags": []
},
{
"appKey": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"appSecret": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"createdAt": "2024-11-11T20:09:47.379Z",
"updatedAt": "2024-11-11T20:09:47.379Z",
"tags": [
{
"type": "string",
"value": "TRUE",
"key": "allow-rest-api-access"
}
]
}
]
Create Workspace
POST /api/workspace
Create a new Workspace, and optionally share licensed content (Products) with it.
→ Sample Request
POST /api/workspace
Content-Type: application/json
Authorization: Basic *****
{
"id": "focus1f8-campus",
"name": "SAMPLE CAMPUS",
"type": "CAMPUS",
"parentWorkspaceId": "focus1f8-district",
"address": {
"city": "CHESAPEAKE",
"state": "US-VA",
"country": "US"
},
"products": [{
"bank": {
"id": "examspark-ignite-us/ignite"
}
}]
}
← Sample Response
{
"workspaceId": "focus1f8-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"type": "DISTRICT",
"name": "PREVIEW DISTRICT",
"registrationCodes": [
{
"code": "V5VP4R"
}
],
"appKeys": {
"lti": {
"consumerKey": "xxxx-xxxx-xxxx-xxxx",
"sharedSecret": "xxxx-xxxx-xxxx-xxxx",
"configurationUrl": "https://api.examspark.com/lti/config/app/xxxx-xxxx-xxxx-xxxx",
"launchUrl": "https://xxxx-xxxx-xxxx-xxxx.apps.api.examspark.com/lti/launch"
},
"server": {
"consumerKey": "xxxx-xxxx-xxxx-xxxx",
"sharedSecret": "xxxx-xxxx-xxxx-xxxx"
}
}
}
Update Workspace
PUT /api/workspace/:id
Update workspace name, parent workspace ID, or products. ID cannot be modified or viewable objective documents.
→ Sample Request
{
"name": "PREVIEW DISTRICT",
"type": "DISTRICT",
"parentWorkspaceId": null,
"address": {
"city": "CHESAPEAKE",
"state": "US-VA",
"country": "US"
},
"products": [
{
"bank": {
"id": "examspark-ignite-us/ignite"
}
}
],
"objectiveDocuments": [
"fl-doe#best#ela:2020",
"fl-doe#best#ma:2020"
]
}
← Sample Response
{
"__typename": "Workspace",
"updatedAt": "2024-11-11T19:58:50.822Z",
"schemaVersion": "2020-01-01",
"intercomId": "673261fbe0c4f45ea2260f31",
"createdAt": "2024-11-11T19:58:50.822Z",
"sk": "workspace",
"id": "focus1f8-district",
"name": "SAMPLE DISTRICT",
"tags": [
...
],
"type": "DISTRICT",
"workspaceId": "focus1f8-district"
}
Delete Workspace (Softly)
DELETE /api/workspace/:id
Delete Workspace by ID. This only soft deletes the workspace, so this workspace can theoretically be revived, but not much thought has been put into this part of the lifecycle. The primary purpose of this operation is to clear it from your workspace list.