REST API Documentation - Orodan/Hilary GitHub Wiki
- 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:trueorfalse, 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:trueorfalse. 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 [email protected] https://admin.oaeproject.org