Skip to content

Whitelist

gordon.so edited this page Sep 2, 2015 · 8 revisions

Summary

A Whitelist represents the allowed emails and email domains that members of a Company can have. A Company can only have one Whitelist and it can either apply to all Workspace in the Company or a sub-set of them. When retrieving a Company, the Company will advertise a "whitelist" link, which can be used by a Company Manager to retrive the Whitelist.

Beta warning

The Whitelist API is in Beta

Operations

Retrieving the Whitelist

XML Example

Request

GET /people/companies/123/whitelist
Accept: application/vnd.huddle.data+xml
Authorization: OAuth2 frootymcnooty/vonbootycherooty

Response

HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+xml
<whitelist>
  <links>
    <link href="..." rel="self"/>
    <link href="..." rel="parent"/>
    <link href="..." rel="edit"/>
  </links>
  <enabled>true<enabled>
  <entries>
    <entry>@huddle.net<entry>
    <entry>[email protected]</entry>
  </entries>
  <workspaces>
    <workspace>
      <link rel="self" href="..." />
      <name>My Important Workspace</name>
    </workspace>
    <workspace>
      <link rel="self" href="..." />
      <name>My Secret Workspace</name>
    </workspace>
  </workspaces>
</whitelist>

JSON Example

Request

GET /people/companies/123/whitelist
Accept: application/vnd.huddle.data+json
Authorization: OAuth2 frootymcnooty/vonbootycherooty

Response

HTTP/1.1 200 OK
Content-Type: application/vnd.huddle.data+json
{
  "links": [{
    "rel": "self",
    "href": "..."
  },{
    "rel": "parent",
    "href": "..."
  },{
    "rel": "edit",
    "href": "..."
  }],
  "enabled": true,
  "entries": [
    "@huddle.net",
    "[email protected]"
  ],
  "workspaces" : [{
      "links" : [
        { "rel" : "self", "href" : "..." }
      ],
      "name" : "My Important Workspace"
    },{
      "links" : [
        { "rel" : "self", "href" : "..." }
      ],
      "name" : "My Secret Workspace"
    }]
}

Other Responses

Case Response
Invalid authorization token 401 Unauthorized
Not a Company Manager 403 Forbidden
Whitelist not found for company 404 Not found
Classic
Clone this wiki locally