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

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

 

 

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

The specified group already exists.

400

INVALID_GROUP_NAME

Group name should only contain the following characters: (0-9 A-Z a-z _).It should not exceed 128 characters.

400

GROUP_NOT_FOUND

Updating a group that does not exist

404

Examples

Sample Request

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



POST parameters:

groupName 



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>        
    </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"
  }
}}


 

Response Elements

(Refer to Common Response Elements)

Specific Errors

(Refer to API Error Codes)

Error

Message

Status Code

GROUP_NAME_REQUIRED

The request is missing the groups required parameter.

400

DUPLICATE_GROUP

The specified user already exists.

400

INVALID_GROUP_NAME

Group name should only contain the following characters: (0-9 A-Z a-z _).It should not exceed 128 characters.

400

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>        
    </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"
  }
}}


 

 

  • No labels