Versions Compared

Key

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

...

Code Block
POST http://auth-sagebase-org.elasticbeanstalk.com/auth/v1/user
{"userId":"demouser", "email":"demouser@sagebase.org", "firstName":"demo", "lastName":"user", "displayName":"Demo User"}

...

Code Block
PUT http://auth-sagebase-org.elasticbeanstalk.com/auth/v1/user
sessionToken:<sessionToken>
{"userId":"demouser", "email":"demouser@sagebase.org", "firstName":"demo", "lastName":"user", "displayName":"Demo User"}

...

Code Block
POST http://auth-sagebase-org.elasticbeanstalk.com/auth/v1/userPasswordEmail
{"userIdemail":"demouser"}

Successful Response:

...

Code Block
POST http://auth-sagebase-org.elasticbeanstalk.com/auth/v1/session
{"userIdemail":"demouserdemouser@agebase.org", "password":"demouser-pw"}

...

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

API for Authorization

...

Create Access Control List for a Resource

Code Block
POST http://repositoryservice.sagebase.org/repo/v1/usergroupresource/{gidrid}/resources/{rid}acl
{"accessTypefoo":["READ","CHANGE","SHARE"bar"]}

...

This overrides the inheritance of permissions from an owner object, in favor of assigning permissions directly to the given object.

Get Access Control List for a Resource

Code Block
DELETEGET http://repositoryservice.sagebase.org/repo/v1/usergroupresource/{gidrid}/resources/{rid}

...

acl

Returns the ACL for the node responsible for the given node's permissions.

Update Access Control List for a Resource

Code Block
GETPUT http://repositoryservice.sagebase.org/repo/v1/resource/usergroup{rid}/{gid}/resourcesacl
{"foo":["bar"]}

Delete Access Control List for a Resource

Code Block

DELETE http://repositoryservice.sagebase.org/repo/v1/resource/{rid}/acl

This deletes the given object's ACL, restoring its dependence on its owner's permissions.