Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Code Block
 
eidpid = an experimentproject name (string)
gid = a group name (string)
uid = a user name (string)
 
 
 
id = An integer uniquely identifying user or group
 
 
Keywords:
users, groups, experimentsprojects, subgroups, direct, indirect, exp
 
 , id
 
Reserved characters:
';' ','
  
No users, groups, or experimentsprojects 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=jim like *ian*
GET /users?firstname=*ian*


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


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


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

Get the groups a user belongs to in a given project.
GET /users/{uid}/{experimentpid}/groups               // Includes the groups the user is directly in and any children
GET /users/{uid}/{experimentpid}/groups;direct        // Includes only groups the user is directly in
GET /users/{uid}/{experimentpid}/groups;indirect      // Only groups the user is indirectly in.
["DatacatAdmin", "PipelineAdmin" ]
 
Get a the user list
GET /expprojects/{eidpid}/userlist
  
Creates a group
POST /expprojects/{eidpid}/groups


Get an experimentproject's groups
GET /expprojects/{eidpid}/groups


Create a group in an experimentproject
POST /expprojects/{eidpid}/groups
name=DatacatAdmin


Get an experimentproject's group
GET /expprojects/{eidpid}/groups/{gid}


Get an experimentproject's group
GET /expprojects/{eidpid}/groups/{gid}


Get all users in an experimentproject's group
GET /expprojects/{eidpid}/groups/{gid}/users


Add a user to a group
POST /expprojects/{eidpid}/groups/{gid}/users
name=jim


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


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


CheckGet ifchildren group isof in group
GET /expprojects/{eidpid}/groups/{gid}/subgroups/{gid}            // Group in this// groupAll, directlyincludes orchildren's indirectlychildren
GET /expprojects/{eidpid}/groups/{gid}/subgroups/{gid};direct     // Group is directly// inDirect this groupChildren
GET /expprojects/{eidpid}/groups/{gid}/subgroups/{gid};indirect      // GroupOnly is indirectly in this groupchildren's children
["DatacatAdmin", "PipelineAdmin"]


 
Get children ofCheck if group is in group
GET /expprojects/{eidpid}/groups/{gid}/subgroups/{gid}            // Group in //this All,group includesdirectly children'sor childrenindirectly
GET /expprojects/{eidpid}/groups/{gid}/subgroups/{gid};direct     // Group is // Direct Childrendirectly in this group
GET /expprojects/{eidpid}/groups/{gid}/subgroups/{gid};indirect   // Group is //indirectly Onlyin children'sthis children
["DatacatAdmin", "PipelineAdmin"]
group



NOTE:
/expprojects/{eidpid} may be omitted if x-srs-experimentproject header set in request.