pid = an project name (string)
gid = a group name (string)
uid = a user name (string)
 
id = An integer uniquely identifying user or group
 
 
Keywords:
users, groups, projects, subgroups, direct, indirect, exp, id
 
Reserved characters:
';' ','
 
No users, groups, or projects may be named one of the keywords.
Names should not use HTTP reserved characters.
 
Users Resource

Create user
POST /users
firstname=brian
lastname=vanklaveren
email_primary=bvan@slac.stanford.edu
work_phone=650-123-4321
institution=SLAC
username=bvan                          // optional
projects=SRS,LSST-CAMERA,EXO           // optional


201 CREATED
id=432


Get user from user ID number
GET /users/id/{id}


Get users with name like brian
GET /users?firstname=brian


Get users with name like *ian*
GET /users?firstname=*ian*


Get users with name johnson
GET /users?lastname=johnson


Get all user groups (with projects)
GET /users/{uid}/groups
[
  {"project":"SRS",
   "groups":[
        "DatacatAdmin",
        "PipelineAdmin"
      ]
   },
  {"project":"EXO",
   "groups":[
        "DatacatAdmin",
        "PipelineAdmin"
      ]
   }
]


Get projects a user belongs to
GET /users/{uid}/projects
[ "SRS", "EXO" ]

Get the groups a user belongs to in a given project.
GET /users/{uid}/{pid}/groups               // Includes the groups the user is directly in and any children
GET /users/{uid}/{pid}/groups;direct        // Includes only groups the user is directly in
GET /users/{uid}/{pid}/groups;indirect      // Only groups the user is indirectly in.
["DatacatAdmin", "PipelineAdmin" ]

Get a the user list
GET /projects/{pid}/userlist
 
Creates a group
POST /projects/{pid}/groups


Get an project's groups
GET /projects/{pid}/groups

Create a group in an project
POST /projects/{pid}/groups
name=DatacatAdmin

Get an project's group
GET /projects/{pid}/groups/{gid}

Get an project's group
GET /projects/{pid}/groups/{gid}


Get all users in an project's group
GET /projects/{pid}/groups/{gid}/users

Add a user to a group
POST /projects/{pid}/groups/{gid}/users
name=jim

Check if user is in group
GET /projects/{pid}/groups/{gid}/users/{uid}                // User in this group directly or indirectly
GET /projects/{pid}/groups/{gid}/users/{uid};direct         // Directly in this group
GET /projects/{pid}/groups/{gid}/users/{uid};indirect       // Indirectly in this group

Add a group to a group (must already exist)
POST /projects/{pid}/groups/{gid}/subgroups
name=DatacatAdmin

Get children of group
GET /projects/{pid}/groups/{gid}/subgroups               // All, includes children's children
GET /projects/{pid}/groups/{gid}/subgroups;direct        // Direct Children
GET /projects/{pid}/groups/{gid}/subgroups;indirect      // Only children's children
["DatacatAdmin", "PipelineAdmin"]


 
Check if group is in group
GET /projects/{pid}/groups/{gid}/subgroups/{gid}            // Group in this group directly or indirectly
GET /projects/{pid}/groups/{gid}/subgroups/{gid};direct     // Group is directly in this group
GET /projects/{pid}/groups/{gid}/subgroups/{gid};indirect   // Group is indirectly in this group


NOTE:
/projects/{pid} may be omitted if x-srs-project header set in request.



 
  • No labels