Resource Definitions:Groups

From API Documentation

Revision as of 04:33, 3 August 2010 by WikiSysop (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The groups resource is a collection of all groups associated with your company account.

Example URI: http://api.rezora.com/v1/groups

Available methods are:

Contents

GET

Returns a list of groups. Each group record includes the following fields:

  • group_id
  • group_name
  • group_timestamp

Example Responses

XML Response

<?xml version="1.0" encoding="UTF-8"?>
<groups version="1.0">
 <group>
  <group_id>123</group_id>
  <group_name>East Branch Office</group_name>
  <group_timestamp>2010-07-21 16:28:52</group_timestamp>
 </group>
 ...
</groups>

JSON Response

[
 {
  "group_id":"123",
  "group_name":"East Branch Office",
  "group_timestamp":"2010-07-21 16:28:52"
 }
 ...
]

CSV Response

"group_id"|"group_name"|"group_timestamp"
"123"|"East Branch Office"|"2010-07-21 16:28:52"
...

POST

Adds a new group, and returns the new group ID. You may include the following fields (required fields marked with a red asterisk (*)):

  • group_name * - must be unique

Example Request Data

XML Request

<?xml version="1.0" encoding="UTF-8"?>
<data>
 <group_name>West Branch Office</group_name>
</data>

JSON Request

{
 "data":{
  "group_name":"West Branch Office"
 }
}

TEXT Request

group_name=West+Branch+Office

Example Response Data

XML Response

<?xml version="1.0" encoding="UTF-8"?>
<groups version="1.0">
 <group>
  <group_id>124</group_id>
 </group>
</groups>

JSON Response

[
 {
  "group_id":"124"
 }
]

CSV Response

"group_id"
"124"

DELETE

Permanently removes ALL groups and returns a success code.

Example Response Data

XML Response

<?xml version="1.0" encoding="UTF-8"?>
<groups version="1.0">
 <group>
  <status>200</status>
 </group>
</groups>

JSON Response

[
 {
  "status":"200"
 }
]

CSV Response

"status"
"200"
Personal tools