Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

and a plain text body:  "The token provided was invalid or expired."

API for Authorization

(Note, the URL may migrate from that of the repository services to a separate location.)

Create Group

Code Block

POST http://repositoryservice.sagebase.org/repo/v1/usergroup
{"name":"MyGroup", "creatableTypes":["type1","type2","type3"]}

Note: The group's name must be unique in the system.

Note: Only an administrator may specify the "creatableTypes" argument.  Other users must omit this field, or get an UnauthorizedException.

Retrieve Groups

Code Block

GET http://repositoryservice.sagebase.org/repo/v1/usergroup

Retrieve Group

Code Block

GET http://repositoryservice.sagebase.org/repo/v1/usergroup/{id}

Delete Group

Code Block

DELETE http://repositoryservice.sagebase.org/repo/v1/usergroup/{id}

Update Group

(shallow properties)

Code Block

PUT http://repositoryservice.sagebase.org/repo/v1/usergroup/{id}
{"name":"MyGroup", "creatableTypes":["type1","type2","type3"]}

Note: The group's name must be unique in the system.

Note: Only an administrator may specify the "creatableTypes" argument. Other users must omit this field, or get an UnauthorizedException.

Get the users in the system

Code Block

GET http://repositoryservice.sagebase.org/repo/v1/user

Note: This provides the {uid} values for the following requests.

Update a user's shallow properties

Code Block

PUT http://repositoryservice.sagebase.org/repo/v1/user/{uid}
{"userId":"mkellen", "iamAccessId":"asdfasfsf", "iamSecretKey":"asfsafsf"}

Note: It is not permissible to change the user's userId.
Note: The authentication services, above, manage the userId, password and other information complementary to these fields.

Add a user to the group

Code Block

POST http://repositoryservice.sagebase.org/repo/v1/usergroup/{gid}/users/{uid}

Remove a user from the group

Code Block

DELETE http://repositoryservice.sagebase.org/repo/v1/usergroup/{gid}/users/{uid}

Get all the users in a group

Code Block

GET http://repositoryservice.sagebase.org/repo/v1/usergroup/{gid}/users

Give a group access to a resource, specifying the allowable access types

...

Code Block
GET http://repositoryservice.sagebase.org/repo/v1/usergroup/{gid}/resources/{rid}

Give a group access to a group, specifying the allowable access types

Code Block

POST http://repositoryservice.sagebase.org/repo/v1/usergroup/{gid}/usergroup/{rid}
{"accessType":["READ","CHANGE","SHARE"]}

Remove all access to a group from a group

Code Block

DELETE http://repositoryservice.sagebase.org/repo/v1/usergroup/{gid}/usergroup/{rid}

Find out the access types a group has for a group

Code Block

GET http://repositoryservice.sagebase.org/repo/v1/usergroup/{gid}/usergroup/{rid}