Difference between revisions of "API Mobile Briefcase Users List"

From unroole CMS wiki
Jump to: navigation, search
(Response)
Line 75: Line 75:
 
| integer
 
| integer
 
| Total number of results that '''could''' be returned. This may not be the number of mobile briefcase users in the response, as it is truncated by ''limit'' parameter.
 
| Total number of results that '''could''' be returned. This may not be the number of mobile briefcase users in the response, as it is truncated by ''limit'' parameter.
 +
|}
 +
 +
== Examples ==
 +
 +
=== All mobile briefcase users on an account ===
 +
 +
{| class="wikitable"
 +
|-
 +
! Parameters
 +
! Values
 +
|-
 +
| token
 +
| 1f0qpLwoV5oIcfnU2yvO
 +
|}
 +
 +
{| class="wikitable collapsible collapsed"
 +
|-
 +
! JSON
 +
|-
 +
| <nowiki>http://api.unroole.com/accounts/1/mobile_briefcase_users.xml?token=1f0qpLwoV5oIcfnU2yvO</nowiki>
 +
|-
 +
| <blockquote>
 +
<nowiki>
 +
{ "http_status" : 200,
 +
  "result_length" : 5,
 +
  "users" : [ { "domain" : "Testing domain",
 +
        "id" : 1,
 +
        "username" : "sampleuser@test.com"
 +
      },
 +
      { "domain" : "Testing domain",
 +
        "id" : 2,
 +
        "username" : "another_user@test.com"
 +
      },
 +
      { "domain" : "North Pole - Santa's House",
 +
        "id" : 3,
 +
        "username" : "elf1@santa.com"
 +
      },
 +
      { "domain" : "North Pole - Santa's House",
 +
        "id" : 4,
 +
        "username" : "elf2@santa.com"
 +
      },
 +
      { "domain" : "North Pole - Santa's House",
 +
        "id" : 5,
 +
        "username" : "rudolph@santa-reindeers.com"
 +
      }
 +
    ]
 +
}
 +
</nowiki>
 +
</blockquote>
 +
|}
 +
 +
{| class="wikitable collapsible collapsed"
 +
|-
 +
! XML
 +
|-
 +
| <nowiki>http://api.unroole.com/accounts/1/mobile_briefcase_users.xml?token=1f0qpLwoV5oIcfnU2yvO</nowiki>
 +
|-
 +
| <blockquote>
 +
<nowiki>
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<hash>
 +
  <users type="array">
 +
    <user>
 +
      <id type="integer">1</id>
 +
      <username>sampleuser@test.com</username>
 +
      <domain>Testing domain</domain>
 +
    </user>
 +
    <user>
 +
      <id type="integer">2</id>
 +
      <username>another_user@test.com</username>
 +
      <domain>Testing domain</domain>
 +
    </user>
 +
    <user>
 +
      <id type="integer">3</id>
 +
      <username>elf1@santa.com</username>
 +
      <domain>North Pole - Santa's House</domain>
 +
    </user>
 +
    <user>
 +
      <id type="integer">4</id>
 +
      <username>elf2@santa.com</username>
 +
      <domain>North Pole - Santa's House</domain>
 +
    </user>
 +
    <user>
 +
      <id type="integer">5</id>
 +
      <username>rudolph@santa-reindeers.com</username>
 +
      <domain>North Pole - Santa's House</domain>
 +
    </user>
 +
  </users>
 +
  <result-length type="integer">5</result-length>
 +
  <http-status type="integer">200</http-status>
 +
</hash>
 +
</nowiki>
 +
</blockquote>
 +
|}
 +
 +
=== Search for domain 'santa' ===
 +
 +
{| class="wikitable"
 +
|-
 +
! Parameters
 +
! Values
 +
|-
 +
| token
 +
| 1f0qpLwoV5oIcfnU2yvO
 +
|}
 +
 +
{| class="wikitable collapsible collapsed"
 +
|-
 +
! JSON
 +
|-
 +
| <nowiki>http://api.unroole.com/accounts/1/mobile_briefcase_users.json?token=1f0qpLwoV5oIcfnU2yvO&search=santa</nowiki>
 +
|-
 +
| <blockquote>
 +
<nowiki>
 +
{ "http_status" : 200,
 +
  "result_length" : 3,
 +
  "users" : [ { "domain" : "North Pole - Santa's House",
 +
        "id" : 3,
 +
        "username" : "elf1@santa.com"
 +
      },
 +
      { "domain" : "North Pole - Santa's House",
 +
        "id" : 4,
 +
        "username" : "elf2@santa.com"
 +
      },
 +
      { "domain" : "North Pole - Santa's House",
 +
        "id" : 5,
 +
        "username" : "rudolph@santa-reindeers.com"
 +
      }
 +
    ]
 +
}
 +
</nowiki>
 +
</blockquote>
 +
|}
 +
 +
{| class="wikitable collapsible collapsed"
 +
|-
 +
! XML
 +
|-
 +
| <nowiki>http://api.unroole.com/accounts/1/mobile_briefcase_users.xml?token=1f0qpLwoV5oIcfnU2yvO&search=santa</nowiki>
 +
|-
 +
| <blockquote>
 +
<nowiki>
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<hash>
 +
  <users type="array">
 +
    <user>
 +
      <id type="integer">3</id>
 +
      <username>elf1@santa.com</username>
 +
      <domain>North Pole - Santa's House</domain>
 +
    </user>
 +
    <user>
 +
      <id type="integer">4</id>
 +
      <username>elf2@santa.com</username>
 +
      <domain>North Pole - Santa's House</domain>
 +
    </user>
 +
    <user>
 +
      <id type="integer">5</id>
 +
      <username>rudolph@santa-reindeers.com</username>
 +
      <domain>North Pole - Santa's House</domain>
 +
    </user>
 +
  </users>
 +
  <result-length type="integer">3</result-length>
 +
  <http-status type="integer">200</http-status>
 +
</hash>
 +
 +
</nowiki>
 +
</blockquote>
 
|}
 
|}

Revision as of 13:43, 25 June 2012

Summary

Allows querying for a list of assets. The query is a wildcard search on the asset's:

  • username
  • domain

URI

https://api.unroole.com/accounts/[account-id]/mobile_briefcase_users

HTTP Method

GET

Required Paramaters

Paramater Default Maximum Length Accepted Values Description
token API Persistence Token that identifies this user and its permissions.

Optional Paramaters

Paramater Default Maximum Length Accepted Values Description
search string The search terms to be used in the query.
limit TBD The maximum number of mobile briefcase users to return.

Response

Field Type Description
http_status integer API Status Code
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
error Rails default
users array of users Each user:
Field Type
id integer
username string
domain string
result_length integer Total number of results that could be returned. This may not be the number of mobile briefcase users in the response, as it is truncated by limit parameter.

Examples

All mobile briefcase users on an account

Parameters Values
token 1f0qpLwoV5oIcfnU2yvO

Search for domain 'santa'

Parameters Values
token 1f0qpLwoV5oIcfnU2yvO