1.1. Description
The QueryMembershipMethod method is used to determine the projects and the hosts for which the user have permission to access. If name parameter is not passed, the permission details of the initiating user will be displayed. Only CUBiT Domain Admins are permitted to query users other than themselves.
1.2. URL
/cubit_api/1/query_membership
1.3. Authentication
This method requires authentication using an API key.
1.4. Parameters
name ( zero or once )
The name of the user to get the permission details. This argument is optional, defaulting to the name of the user who you authenticate as. Only CUBiT Domain Admins are permitted to query users other than themselves.
Type: String
sig ( Required, once )
API authentication hash signature.
Type: String
userid ( Required, once )
The login name of the user initiating the request.
Type: String
1.5. Example Response
Here is a sample output where we query name=grue:
<?xml version='1.0'?>
<cubit version='1'>
<user name="grue">
<project name="testing">
<summary>Cubit Testing</summary>
<roles>CUBIT - Domain Admin</roles>
</project>
<project name="zim">
<summary>invador</summary>
<roles>CUBIT - Domain Admin</roles>
</project>
<project name="zork">
<summary>For dorks</summary>
<roles>CUBIT - Domain Admin</roles>
</project>
</user>
</cubit>
1.6. Response Codes
- 200 - ok
- 400 - Login failed / Insufficient permissions