Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • fusiondirectory-plugins fusiondirectory-plugins
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 63
    • Issues 63
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • fusiondirectoryfusiondirectory
  • fusiondirectory-pluginsfusiondirectory-plugins
  • Wiki
  • Restwebservice
  • createUser

createUser · Changes

Page history
Create RestWebservice/createUser authored May 21, 2019 by jswaelens's avatar jswaelens
Show whitespace changes
Inline Side-by-side
RestWebservice/createUser.md 0 → 100644
View page @ 3bfc4177
### Howto create an user
#### Login
```bash
$ curl -X POST "http://192.168.56.100/fusiondirectory/rest.php/v1/login" --data '{
"user": "fd-admin",
"password": "tester"
}' | jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 77 100 29 100 48 366 606 --:--:-- --:--:-- --:--:-- 600
"61o9679ov4741a2shgs7afpb70"
```
### Listing users (before create the new one)
```bash
$ curl -X GET -H "Session-Token: 61o9679ov4741a2shgs7afpb70" "http://192.168.56.100/fusiondirectory/rest.php/v1/objects/user" | jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 58 100 58 0 0 956 0 --:--:-- --:--:-- --:--:-- 966
{
"uid=fd-admin,ou=people,dc=my-domain,dc=com": "fd-admin"
}
```
### Create user
```bash
$ curl -X POST -H "Session-Token: 61o9679ov4741a2shgs7afpb70" "http://192.168.56.100/fusiondirectory/rest.php/v1/objects/user" --data '{ "attrs": { "user": { "uid": "toto", "sn": "tsn", "givenName": "tgn", "userPassword": "totopassword" } } }' | jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 148 100 41 100 107 418 1092 --:--:-- --:--:-- --:--:-- 1103
"uid=toto,ou=people,dc=my-domain,dc=com"
```
### Listing users (after create the new one)
```bash
$ curl -X GET -H "Session-Token: 61o9679ov4741a2shgs7afpb70" "http://192.168.56.100/fusiondirectory/rest.php/v1/objects/user" | jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 58 100 58 0 0 956 0 --:--:-- --:--:-- --:--:-- 966
{
"uid=fd-admin,ou=people,dc=my-domain,dc=com": "fd-admin",
"uid=toto,ou=people,dc=my-domain,dc=com": "toto"
}
```
### Logout
```bash
$ curl -X POST -H "Session-Token: 61o9679ov4741a2shgs7afpb70" "http://192.168.56.100/fusiondirectory/rest.php/v1/logout" | jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
```
\ No newline at end of file
Clone repository
  • FusiondirectoryIPAM
  • LSC
  • LdapAlias
  • Modifying group member types
  • RestWebservice
    • addUpdateUser
    • addUpdateUserMultivaluated
    • createUser
    • deleteUser
  • SupannSupport
  • UserReminder
  • deployment features
  • fd lsc backend
  • fd lsc zimbra
  • filters acl
View All Pages