User API
Name | Type | Description | Example |
---|---|---|---|
createAt | 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/" |
updateAt | date-time | The date timestamp of the last update | "2015-01-01T12:00:00Z" |
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/",
"createAt": "2015-01-01T12:00:00Z",
"updateAt": "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/",
"createAt": "2015-01-01T12:00:00Z",
"updateAt": "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/",
"createAt": "2015-01-01T12:00:00Z",
"updateAt": "2015-01-01T12:00:00Z",
"urn": "urn:iws:iam::user/example/admin/user1"
}
Name | Type | Description | Example |
---|---|---|---|
limit | integer | The maximum number of items in the response (as set in the query or by default) | 20 |
offset | integer | The offset of the items returned (as set in the query or by default) | 0 |
total | integer | The total number of items available to return | 2 |
users | array | User identifiers | ["User1","User2"] |
List all users filtered, using optional query parameters.
GET /api/v1/users?PathPrefix={optional_path_prefix}&Offset={optional_offset}&Limit={optional_limit}&OrderBy={columnName-desc}
$ curl -n /api/v1/users?PathPrefix=$OPTIONAL_PATH_PREFIX&Offset=$OPTIONAL_OFFSET&Limit=$OPTIONAL_LIMIT&OrderBy=$COLUMNNAME-DESC \
-H "Authorization: Basic or Bearer XXX"
HTTP/1.1 200 OK
{
"users": [
"User1",
"User2"
],
"offset": 0,
"limit": 20,
"total": 2
}
Name | Type | Description | Example |
---|---|---|---|
groups/joined | date-time | When relationship was created | "2015-01-01T12:00:00Z" |
groups/name | string | Group name | "group1" |
groups/org | string | Group organization | "tecsisa" |
limit | integer | The maximum number of items in the response (as set in the query or by default) | 20 |
offset | integer | The offset of the items returned (as set in the query or by default) | 0 |
total | integer | The total number of items available to return | 1 |
List all groups that a user is a member.
GET /api/v1/users/{user_externalId}/groups?Offset={optional_offset}&Limit={optional_limit}&OrderBy={columnName-asc}
$ curl -n /api/v1/users/$USER_EXTERNALID/groups?Offset=$OPTIONAL_OFFSET&Limit=$OPTIONAL_LIMIT&OrderBy=$COLUMNNAME-ASC \
-H "Authorization: Basic or Bearer XXX"
HTTP/1.1 200 OK
{
"groups": [
{
"org": "tecsisa",
"name": "group1",
"joined": "2015-01-01T12:00:00Z"
}
],
"offset": 0,
"limit": 20,
"total": 1
}