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

Description

The SaveGroup API allows the Account Owner to create or update a specified Group

 What is a Group?

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)

Name

Description

Required

Default

Possible Values

groupName

The group name to create.

Yes

 

Alphanumeric characters, "_" and "-"

Maximum length 243 characters

apsdb.update

Should be set to true in order to update existing group

No

False


True
False

newGroupName

This is sent when the user wishes to rename the group.

No

 

 

Specific Response Elements

(Refer to Common Response Elements)

Specific Logical Errors

(Refer to Common Logical Error Codes)

Error

Message

Status Code

PARAMETER_REQUIRED

 

400

DUPLICATE_GROUP_NAME

Group [ newGroupName ] already exists

400

INVALID_GROUP_NAME

Invalid group [" + groupName + "]. Group name should be alphanumeric (a-z A-Z 0-9) with dashes (-) and underscores (_). It should not be shorter than 1 character or exceed 128

400

GROUP_NOT_FOUND

Cannot find group [ groupName ]

404

Examples

Sample Request

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


POST parameters:

groupName = [group_name]


Sample XML Response

Success XML:

<response xmlns="http://www.apstrata.com/services/schemas/apstrata_database_response.xsd">
    <metadata>
        <requestId>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</requestId>
        <status>success</status>    
		<statusCode>200</statusCode>    
    </metadata>
</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>
        <errorDetail>[failMsg]</errorDetail>
    </metadata>
</response>



Sample JSON Response

{"response": {
  "metadata": {
    "requestId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "status": "success"
	"statusCode": "200"	
 }
}}


 

 

  • No labels