Attention: open in a new window. PDFPrintE-mail

API Docs - Domains
All Applications and Users exist within developer Domains which define a unique user and application namespace for the developer such that all users in a Domain may access all Applications in the same Domain. 
 
Domains are created automatically for developers using the Developer Portal when Applications are created. When new users are created these users are created in the same Domain as the Application used to create them. Users are only able to GET details of the Domain that they are in.
 
The ribbit.com domain is the default Domain and is sometimes referred to as a "public" Domain, however all Domains are private.
 
The following example illustrates a Domain names:
  • www.example.net
  • www.mydomain.com
Each Domain has the following properties:
  • Can contain one or more Application
  • Can contain one or more Users
  • All users can access all Applications contained within the Domain
 

HTTP Methods

The following table lists the standard HTTP methods to create, retrieve and change Domain resources. 
 
Methods
Resource
Response
Notes
GET

/domains/<domainId>

(200) Domain Details

Retrieves details for a specified Domain.

GET/domains
(200) Domain Details
Retrieves details for all Domains.
GET
/domains/?filterBy=owner&filterValue=<ownerguid> 
(200) Domain Details
Setting the filter value as the owners GUID returns Domains owned by the user.
POST

/domains

(201) Create Domain
Creates a Domain.
 DELETE/domains
(204) No Content
Deletes a Domain.
 

Properties

The table below contains a list of properties that are returned when one of the above Methods is used.  

Name
Methods
Value
Notes
name
GET, POST
string
(req) A Domain name that relates to the impersonated user on the platform.
owner      
GET               
<guid>   
(req) The GUID of the owner of this Domain.
 

Examples

Retrieving Domain Details

In the example below using a GET/domains/<domainID returns information about the specified Domain.

<< GET /rest/1.0/domains/domainone

>> 200 OK
{ entry : [
{"name": "domaineone", "owner":2fb4c241-dft5-jhg5-8015-90fd70be469c"}
] }

Creating a Domain

To add a new Domain use the following POST method and set the owner to the requesting GUID.

<< POST /rest/1.0/domains/   
setHeader X-BTribbit-SP-UserId:<ownerguid>
{"name":"domaineone"}

>> 200 OK

Location /myhost.com/rest/1.0/domains/domainone
] }

Retrieving a Domain by Owner

As shown in the example below to retrieve Domains for a specified User filter by the owners GUID.

<< GET /rest/1.0/domains/?filterBy=owner&filterValue=2fb4c241-dft5-jhg5-8015-90fd70be469c   

>> 200 OK
{ entry : [
{"name": "domainone", "owner":2fb4c241-dft5-jhg5-8015-90fd70be469c"}]},

Deleting a Domain

To add a new Domain use the following POST method and set the owner to the requesting GUID.

DELETE /rest/1.0/domains/   
{"name":"domaineone",}

>> 204 No Content

Back to Top