From a99b526c2e2421c2bdc7128e91ee9a22b758cc2e Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Wed, 18 May 2022 10:07:32 +0200 Subject: [PATCH] beta-testplan: Adjust curl examples to use graph instead of accounts/ocs The abilitiy to add users via /ocs was removed in ocs. Also the accounts service no longer exists. --- docs/ocis/development/beta-testplan.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ocis/development/beta-testplan.md b/docs/ocis/development/beta-testplan.md index 1e3a8b4d1..5788b1b72 100644 --- a/docs/ocis/development/beta-testplan.md +++ b/docs/ocis/development/beta-testplan.md @@ -104,10 +104,10 @@ SHARE_API_PATH=ocs/v2.php/apps/files_sharing/api/v1/shares USER=admin PASSWORD=admin ``` -- create a new user `curl -k -u $USER:$PASSWORD $SERVER_URI/ocs/v2.php/cloud/users -d'userid=&password=&displayname=&username=&email='` +- create a new user `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/users -d '{"displayName": "", "mail": "", "onPremisesSamAccountName": "", "passwordProfile":{ "password": "" }}'` - give the user the "Admin" role 1. get the id of the admin role `curl -k -u $USER:$PASSWORD $SERVER_URI/api/v0/settings/roles-list -d"{}" | jq '.bundles[] | select (.name | test("admin")) | .id'` - 2. get the id of the user: `curl -k -u $USER:$PASSWORD $SERVER_URI/api/v0/accounts/accounts-list -d"{}" | jq '.accounts[] | select (.preferredName | test("")) | .id'` + 2. get the id of the user: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/users/" | jq '.id'` 3. assign role user to role: `curl -k -u $USER:$PASSWORD $SERVER_URI/api/v0/settings/assignments-add -d'{"account_uuid":"","role_id":""}` - create a space: `curl -k -u $USER:$PASSWORD "$SERVER_URI/$GRAPH_API_PATH/drives" -X POST -d'{"Name":"Space for finance","driveType":"project", "description":"we need some space"}'` - list spaces: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/me/drives`