Domains

Important

The API is a work in progress. GET requests have been implemented in the current version, but POST, UPDATE, and DELETE support is not yet complete.

Get list of domains

Description

This endpoint returns a list of all domains existing on the system for which the authenticated user has access to. In the case of an administrator, a list containing all domains will be returned. For other users, this will generally only include the domain they are a member of.

Request

GET /liveforms/api/domains

Response

Possible HTTP response codes:

Code

Description

200 OK

Success

401 UNAUTHORIZED

The username/password used for authentication was invalid.

500 SERVER ERROR

The request failed due to an internal server error.

If the request is successful, a JSON (default) or XML payload will be returned containing the requested information.

Example JSON response

{
   "title": "Domains",
   "link": {
      "rel": "self",
      "href": "/liveforms/api/domains"
   },
   "entry": [{
      "id": "1",
      "name": "demo",
      "description": "This is a demo domain",
      "link": [{
            "rel": "self",
            "href": "/liveforms/api/domains/demo"
         },
         {
            "rel": "users",
            "href": "/liveforms/api/domains/demo/users"
         },
         {
            "rel": "roles",
            "href": "/liveforms/api/domains/demo/roles"
         },
         {
            "rel": "apps",
            "href": "/liveforms/api/domains/demo/apps"
         }
      ]

   }]
}

Example XML response

<?xml version="1.0" encoding="UTF-8"?>
<feed>
   <title>Domains</title>
   <link rel="self" href="/liveforms/api/domains"/>
   <entry>
      <id>1</id>
      <name>demo</name>
      <description>This is a demo domain</description>
      <link rel="self" href="/liveforms/api/domains/demo"/>
      <link rel="users" href="/liveforms/api/domains/demo/users"/>
      <link rel="roles" href="/liveforms/api/domains/demo/roles"/>
      <link rel="apps" href="/liveforms/api/domains/demo/apps"/>
   </entry>
</feed>

Get domain by name

Description

This endpoint returns information representing the requested domain provided the authenticated user has access to it.

Request

GET /liveforms/api/domains/{domain}

parameter

description

domain

The name of a valid domain which the authenticated user has access to.

Response

Possible HTTP response codes:

Code

Description

200 OK

Success

401 UNAUTHORIZED

The username/password used for authentication was invalid.

403 FORBIDDEN

The authenticated user does not have permission to access this domain.

404 NOT FOUND

The domain does not exist.

500 SERVER ERROR

The request failed due to an internal server error.

If the request is successful, a JSON (default) or XML payload will be returned containing the requested information.

Example JSON response

{
     "id": "1",
     "name": "demo",
     "description": "This is a demo domain",
     "link": [{
                     "rel": "self",
                     "href": "/liveforms/api/domains/demo"
             },
             {
                     "rel": "users",
                     "href": "/liveforms/api/domains/demo/users"
             },
             {
                     "rel": "roles",
                     "href": "/liveforms/api/domains/demo/roles"
             },
             {
                     "rel": "apps",
                     "href": "/liveforms/api/domains/demo/apps"
             }
     ]
}

Example XML response

<?xml version="1.0" encoding="UTF-8"?>
<entry>
   <id>1</id>
   <name>demo</name>
   <description>This is a demo domain</description>
   <link rel="self" href="/liveforms/api/domains/demo"/>
   <link rel="users" href="/liveforms/api/domains/demo/users"/>
   <link rel="roles" href="/liveforms/api/domains/demo/roles"/>
   <link rel="apps" href="/liveforms/api/domains/demo/apps"/>
</entry>