Child pages
  • ListGroups
Skip to end of metadata
Go to start of metadata

Description

The ListGroups API allows the Account Owner to retrieve the list of all the Groups that were previously created. 

In apstrata, data read and write permissions are controlled using ACLs (from wikipedia: Access Control Lists). Each read or write ACL contains a list of Users and/or Groups specifying who can read or write the data for which the ACL is defined.

Users with the same privileges are set as members of the same Group. A user can belong to one or more Groups or no Group at all. Once a Group is created, it can be used in ACLs to define access permissions for more than one user at the same time. 

For specific details on the creation of a Group, please check the SaveGroup API.

For specific details on adding Users to a Group, please check the SaveUser API.

Specific Request Parameters

(Refer to Common Request Parameters)

Specific Response Elements

(Refer to Common Response Elements)

The following specific "result" element is a child of the common root element "response" and a sibling of the common "metadata" element:

{
	"result": {
		"groups": [{"name": "name of a group"},{"name": "name of another group"}]
	}
}

Specific Logical Errors

(Refer to Common Logical Error Codes)

Examples

Sample Request

Request URL: http://sandbox.apstrata.com/apsdb/rest/[authenticationkey]/ListGroups?apsws.time=[timestamp]&apsws.authSig=[signature] 



POST parameters:

None



Sample XML Response

Success XML:

<response xmlns="http://www.apstrata.com/services/schemas/apstrata_database_response.xsd">
  <metadata>
    <requestId>654adb13-1aad-4240-8b8e-a686bb712402</requestId>
    <status>success</status>
  </metadata>
  <result>
    <groups>
      <group name="developers"/>
      <group name="managers"/>
    </groups>
  </result>
</response>



Failure XML:

<response xmlns="http://www.apstrata.com/services/schemas/apstrata_database_response.xsd">
    <metadata>
        <requestId>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</requestId>
        <status>failure</status>
        <errorCode>[errorCode]</errorCode>
        <errorMessage>[failMsg]</errorMessage>
    </metadata>
</response>



Sample JSON Response

{"response": {
  "metadata": {
    "requestId": "c6b34006-e0d9-4223-9f74-53595da41a54",
    "status": "success"
  },
  "result": {
    "groups": [
      {
        "name": "developers"
      },
      {
        "name": "managers"
      }
    ]
  }
}}


  • No labels