Workspaces - Huddle/huddle-apis GitHub Wiki

Summary

Company workspace resources are exposed by the People API:

Membership covers create workspace, leave, managers, users, invitations, and workspace search — see WorkspaceNew.

On a People workspace representation, teams and bulkInvitation links may target Membership URLs when workspace-invite behaviour is enabled in your environment; otherwise they stay on People. Always use the href from the response.

Operations

Method Path Purpose Details
GET /people/workspaces/{workspaceId} Retrieve a workspace Jump

Retrieve a given workspace

GET returns the workspace resource; the caller must be in the workspace (or a Huddle administrator).

XML example

Request

GET /people/workspaces/123 HTTP/1.1
Accept: application/vnd.huddle.data+xml
Authorization: Bearer frootymcnooty/vonbootycherooty

Response

HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+xml
<workspace>
  <link rel="self" href="..." />
  <link rel="company" href="..." />
  <link rel="teams" href="..." />
  <link rel="bulkInvitation" href="..." />
  <name>My Important Workspace</name>
  <archived>false</archived>
  <locked>false</locked>
  <managers>
    <link rel="self" href="..." />
    <link rel="avatar" href="..." />
    <displayName>Andy McLoughlin</displayName>
  </managers>
  <createdDate>2014-07-04T14:13:57.447Z</createdDate>
  <memberCount>42</memberCount>
</workspace>

Links are repeated <link> elements (not a <links> wrapper). bulkInvitation appears only when the caller may invite to the workspace.

JSON example

Request

GET /people/workspaces/123 HTTP/1.1
Accept: application/vnd.huddle.data+json
Authorization: Bearer frootymcnooty/vonbootycherooty

Response

HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+json
{
  "links": [
    { "rel": "self", "href": "..." },
    { "rel": "company", "href": "..." },
    { "rel": "teams", "href": "..." },
    { "rel": "bulkInvitation", "href": "..." }
  ],
  "name": "My Important Workspace",
  "archived": false,
  "locked": false,
  "managers": [
    {
      "links": [
        { "rel": "self", "href": "..." },
        { "rel": "avatar", "href": "..." }
      ],
      "displayName": "Andy McLoughlin"
    }
  ],
  "createdDate": "2014-07-04T14:13:57.447Z",
  "memberCount": 42
}

Link relations

Name Description Methods
self This workspace. GET
company Owning company. GET
teams Teams in this workspace (People or Membership URL — see summary). GET
bulkInvitation Bulk invitation entry point when present (People or Membership). POST

Other responses

Case Response
Invalid authorization 401 Unauthorized
Actor not in workspace (and not admin) 403 Forbidden
Actor not in company / workspace not found 404 Not Found

Related

  • TeamsGET .../workspaces/{workspaceId}/teams on People (and Membership teams list when the teams link targets Membership).
  • Workspace — legacy XML workspace document (Actor / older clients).
  • WorkspaceNew — Membership workspaces (create, leave, managers, users, invitations).
⚠️ **GitHub.com Fallback** ⚠️