User API
Name | Type | Description | Example |
---|---|---|---|
createdAt | date-time | User creation date | "2015-01-01T12:00:00Z" |
externalId | string | User's external identifier | "user1" |
id | uuid | Unique user identifier | "01234567-89ab-cdef-0123-456789abcdef" |
path | string | User location | "/example/admin/" |
urn | string | User's Uniform Resource Name | "urn:iws:iam::user/example/admin/user1" |
Create a new user.
POST /api/v1/users
Name | Type | Description | Example |
---|---|---|---|
externalId | string | User's external identifier | "user1" |
path | string | User location | "/example/admin/" |
$ curl -n -X POST /api/v1/users \
-d '{
"externalId": "user1",
"path": "/example/admin/"
}' \
-H "Content-Type: application/json" \
-H "Authorization: Basic or Bearer XXX"
HTTP/1.1 201 Created
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"externalId": "user1",
"path": "/example/admin/",
"createdAt": "2015-01-01T12:00:00Z",
"urn": "urn:iws:iam::user/example/admin/user1"
}
Update an existing user.
PUT /api/v1/users/{user_externalID}
Name | Type | Description | Example |
---|---|---|---|
path | string | User location | "/example/admin/" |
$ curl -n -X PUT /api/v1/users/$USER_EXTERNALID \
-d '{
"path": "/example/admin/"
}' \
-H "Content-Type: application/json" \
-H "Authorization: Basic or Bearer XXX"
HTTP/1.1 200 OK
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"externalId": "user1",
"path": "/example/admin/",
"createdAt": "2015-01-01T12:00:00Z",
"urn": "urn:iws:iam::user/example/admin/user1"
}
Delete an existing user.
DELETE /api/v1/users/{user_externalID}
$ curl -n -X DELETE /api/v1/users/$USER_EXTERNALID \
-H "Content-Type: application/json" \
-H "Authorization: Basic or Bearer XXX"
HTTP/1.1 202 Accepted
Get an existing user.
GET /api/v1/users/{user_externalID}
$ curl -n /api/v1/users/$USER_EXTERNALID \
-H "Authorization: Basic or Bearer XXX"
HTTP/1.1 200 OK
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"externalId": "user1",
"path": "/example/admin/",
"createdAt": "2015-01-01T12:00:00Z",
"urn": "urn:iws:iam::user/example/admin/user1"
}
Name | Type | Description | Example |
---|---|---|---|
users | array | User identifiers | ["User1","User2"] |
List all users filtered by PathPrefix.
GET /api/v1/users?PathPrefix={optional_path_prefix}
$ curl -n /api/v1/users?PathPrefix=$OPTIONAL_PATH_PREFIX \
-H "Authorization: Basic or Bearer XXX"
HTTP/1.1 200 OK
{
"users": [
"User1",
"User2"
]
}
Name | Type | Description | Example |
---|---|---|---|
groups/name | string | Group name | "group1" |
groups/org | string | Group organization | "tecsisa" |
List all groups that a user is a member.
GET /api/v1/users/{user_externalId}/groups
$ curl -n /api/v1/users/$USER_EXTERNALID/groups \
-H "Authorization: Basic or Bearer XXX"
HTTP/1.1 200 OK
{
"groups": [
{
"org": "tecsisa",
"name": "group1"
}
]
}