-
Notifications
You must be signed in to change notification settings - Fork 96
REST API Documentation
Branden Visser edited this page Feb 13, 2014
·
4 revisions
- Creating a new global admin
- Making someone a tenant admin
- Importing a CSV file
POST /api/auth/createGlobalAdminUser
Server: Global Admin only Body Parameters:
-
username
: The username the admin user will login with -
password
: The password the admin user will login with (must be at least 6 characters) -
displayName
: The display name for the admin user
POST /api/user/:id/admin
Server: Global Admin or User Tenant Path Parameters:
-
id
: The id of the user to promote or demote
Body Parameters:
-
admin
:true
orfalse
, indicating whether or not the user should have admin privileges
POST /api/user/import
Server: Global Admin or User Tenant Body Parameters:
-
tenantAlias
(Global admin only): The tenant to which to import the users -
forceProfileUpdate
:true
orfalse
. Whentrue
, indicates all existing users should have their profiles updated with matching users in the CSV file. Iffalse
, displayNames and email addresses of users will be updated only if the existing users have not already explicitly set them -
authenticationStrategy
: The authentication strategy users will use to log in. Valid authentication strategies are:local
,shibboleth
,cas
,facebook
,google
,twitter
,ldap
,oauth
-
file
: The multi-part file data to submit with the request
Example:
# Get a session cookie
~$ ADMIN_COOKIE=$(curl -s -e "/" --cookie-jar - -d"username=<username>" -d"password=<password>" http://https://admin.oaeproject.org/api/auth/login | grep connect.sess | cut -f 7)
# Use that cookie to make the import request
~$ curl --cookie connect.sess=${ADMIN_COOKIE} -e "/" -F tenantAlias=cam -F forceProfileUpdate=false -F authenticationStrategy=local -F file=@csv-file-name.csv https://admin.oaeproject.org