REST API - Group

Get all

URL /api/rest/groups(.xml|.json)
Method GET
Returns 200 OK
401 Unauthorized
415 Unsupported Media Type

JSON Example

GET /api/rest/groups.json

{ groups: [
  {
    name: 'group1',
    members: [
      'hans', 'klaus', 'uwe'
    ]
  },
  {
    name: 'group2',
    members: [
      'peter', 'klaus', 'hans'
    ]
  }
]}
    

Get

URL /api/rest/groups/group name(.xml|.json)
Method GET
Returns 200 OK
401 Unauthorized
404 Not Found
415 Unsupported Media Type

JSON Example

GET /api/rest/groups/group name.json

{
  name: 'group1',
  members: [
    'hans', 'klaus', 'uwe'
  ]
}
    

Add

URL /api/rest/groups(.xml|.json)
Method POST
Returns 201 Created & Location
401 Unauthorized
415 Unsupported Media Type

JSON Example

POST /api/rest/groups.json

{
  name: 'group3',
  members: [
    'klaus', 'uwe'
  ]
}
    

Update

URL /api/rest/groups/group name(.xml|.json)
Method PUT
Returns 201 Created & Location
401 Unauthorized
404 Not Found
415 Unsupported Media Type

JSON Example

PUT /api/rest/groups/group3.json

{
  name: 'group3',
  members: [
    'hans', 'klaus', 'uwe'
  ]
}
    

Delete

URL /api/rest/groups/group name(.xml|.json)
Method DELETE
Returns 204 No Content
401 Unauthorized
404 Not Found