ClearVAT User Management REST APIs API Reference
User Management APIs for create/update and search users within ClearVAT domain
API Endpoint
http://localhost:8080/
Terms of Service: Terms
Contact: support@clervat.org
Version: 1.0.1-SNAPSHOT
Authentication
basicAuth
security: logout
Provides /logout endpoints for spring security. Clear cached data, invalidate session and delete cookies.
Logout user, invalidate session and cookies.
OK
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
Logout user, invalidate session and cookies.
OK
Created
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
security: profile
Profile of logged in user. Setting merchant_id and shop_id into service's security context for admin users.
Logged in user's details
Only for administrators (members of MERCHANT_ADMIN and ADMIN). Read user's merchant_id and shop_id from the service's security context. If values are not set into security context then they are read from user's profile. If -1 is returned for shop_id or merchant_id then user has not merchant_id and shop_id configure.
OK
Unauthorized
Forbidden
Not Found
Response Content-Types: application/json
Response Example (200 OK)
{
"username": "P123456",
"email": "user@clearvat.org",
"password": "AaBbCc#42",
"first_name": "James",
"last_name": "Bond",
"merchant_id": 4,
"groups": [
"SHOP"
],
"send_email": false,
"mail_verified": false,
"is_cache_used": false,
"shop_id": 4711
}
Configure shop_id or/and merchant_id in security context. Only for admin users.
Logged in user's merchant_id. Only for ADMIN users.
Logged in user's shop_id. For ADMIN and MERCHANT_ADMIN users.
OK
Created
Unauthorized
Forbidden
Not Found
Response Content-Types: application/json
Response Example (200 OK)
{
"username": "P123456",
"email": "user@clearvat.org",
"password": "AaBbCc#42",
"first_name": "James",
"last_name": "Bond",
"merchant_id": 4,
"groups": [
"SHOP"
],
"send_email": false,
"mail_verified": false,
"is_cache_used": false,
"shop_id": 4711
}
configure
OK
No Content
Unauthorized
Forbidden
Response Content-Types: application/json
Response Example (200 OK)
{
"username": "P123456",
"email": "user@clearvat.org",
"password": "AaBbCc#42",
"first_name": "James",
"last_name": "Bond",
"merchant_id": 4,
"groups": [
"SHOP"
],
"send_email": false,
"mail_verified": false,
"is_cache_used": false,
"shop_id": 4711
}
Logged in user's details
Only for administrators (members of MERCHANT_ADMIN and ADMIN). Read user's merchant_id and shop_id from the service's security context. If values are not set into security context then they are read from user's profile. If -1 is returned for shop_id or merchant_id then user has not merchant_id and shop_id configure.
OK
Unauthorized
Forbidden
Not Found
Response Content-Types: application/json
Response Example (200 OK)
{
"username": "P123456",
"email": "user@clearvat.org",
"password": "AaBbCc#42",
"first_name": "James",
"last_name": "Bond",
"merchant_id": 4,
"groups": [
"SHOP"
],
"send_email": false,
"mail_verified": false,
"is_cache_used": false,
"shop_id": 4711
}
Configure shop_id or/and merchant_id in security context. Only for admin users.
Logged in user's merchant_id. Only for ADMIN users.
Logged in user's shop_id. For ADMIN and MERCHANT_ADMIN users.
OK
Created
Unauthorized
Forbidden
Not Found
Response Content-Types: application/json
Response Example (200 OK)
{
"username": "P123456",
"email": "user@clearvat.org",
"password": "AaBbCc#42",
"first_name": "James",
"last_name": "Bond",
"merchant_id": 4,
"groups": [
"SHOP"
],
"send_email": false,
"mail_verified": false,
"is_cache_used": false,
"shop_id": 4711
}
configure
OK
No Content
Unauthorized
Forbidden
Response Content-Types: application/json
Response Example (200 OK)
{
"username": "P123456",
"email": "user@clearvat.org",
"password": "AaBbCc#42",
"first_name": "James",
"last_name": "Bond",
"merchant_id": 4,
"groups": [
"SHOP"
],
"send_email": false,
"mail_verified": false,
"is_cache_used": false,
"shop_id": 4711
}
user-management-controller
User Management REST APIs. Search, create and update user's details.
Filtering users by search parameters: [email, group,country,last_name,merchant_id].
country
group
last_name
merchant_id
page_number
page_size
OK
Unauthorized
Forbidden
Not Found
Response Content-Types: application/json
Response Example (200 OK)
{
"current_page": "integer (int64)",
"from_index": "integer (int64)",
"number_of_pages": "integer (int64)",
"page_size": "integer (int64)",
"to_index": "integer (int64)",
"total_number_of_elements": "integer (int64)",
"values": [
{
"username": "P123456",
"email": "user@clearvat.org",
"password": "AaBbCc#42",
"first_name": "James",
"last_name": "Bond",
"merchant_id": 4,
"groups": [
"SHOP"
],
"send_email": false,
"mail_verified": false,
"is_cache_used": false,
"shop_id": 4711
}
]
}
Create new user in SAP IAM
user
Request Content-Types: application/json
Request Example
{
"username": "P123456",
"email": "user@clearvat.org",
"password": "AaBbCc#42",
"first_name": "James",
"last_name": "Bond",
"merchant_id": 4,
"groups": [
"SHOP"
],
"send_email": false,
"mail_verified": false,
"is_cache_used": false,
"shop_id": 4711
}
OK
Created
Unauthorized
Forbidden
Not Found
Response Content-Types: */*
Response Example (200 OK)
{
"body": "object",
"statusCode": "string",
"statusCodeValue": "integer (int32)"
}
Get user by username/user_id
userId
OK
Unauthorized
Forbidden
Not Found
Response Content-Types: application/json
Response Example (200 OK)
{
"username": "P123456",
"email": "user@clearvat.org",
"password": "AaBbCc#42",
"first_name": "James",
"last_name": "Bond",
"merchant_id": 4,
"groups": [
"SHOP"
],
"send_email": false,
"mail_verified": false,
"is_cache_used": false,
"shop_id": 4711
}
Update user's details: email, first_name, mail_sent, etc..
user
The value should match the username in request's body.
Request Content-Types: application/json
Request Example
{
"username": "P123456",
"email": "user@clearvat.org",
"password": "AaBbCc#42",
"first_name": "James",
"last_name": "Bond",
"merchant_id": 4,
"groups": [
"SHOP"
],
"send_email": false,
"mail_verified": false,
"is_cache_used": false,
"shop_id": 4711
}
OK
Created
Unauthorized
Forbidden
Not Found
Response Content-Types: application/json
Response Example (200 OK)
{
"username": "P123456",
"email": "user@clearvat.org",
"password": "AaBbCc#42",
"first_name": "James",
"last_name": "Bond",
"merchant_id": 4,
"groups": [
"SHOP"
],
"send_email": false,
"mail_verified": false,
"is_cache_used": false,
"shop_id": 4711
}
Schema Definitions
PagingDTO«UserDTO»: object
Example
{
"current_page": "integer (int64)",
"from_index": "integer (int64)",
"number_of_pages": "integer (int64)",
"page_size": "integer (int64)",
"to_index": "integer (int64)",
"total_number_of_elements": "integer (int64)",
"values": [
{
"username": "P123456",
"email": "user@clearvat.org",
"password": "AaBbCc#42",
"first_name": "James",
"last_name": "Bond",
"merchant_id": 4,
"groups": [
"SHOP"
],
"send_email": false,
"mail_verified": false,
"is_cache_used": false,
"shop_id": 4711
}
]
}
ResponseEntity: object
- body: object
- statusCode: string 100 CONTINUE, 101 SWITCHING_PROTOCOLS, 102 PROCESSING, 103 CHECKPOINT, 200 OK, 201 CREATED, 202 ACCEPTED, 203 NON_AUTHORITATIVE_INFORMATION, 204 NO_CONTENT, 205 RESET_CONTENT, 206 PARTIAL_CONTENT, 207 MULTI_STATUS, 208 ALREADY_REPORTED, 226 IM_USED, 300 MULTIPLE_CHOICES, 301 MOVED_PERMANENTLY, 302 FOUND, 302 MOVED_TEMPORARILY, 303 SEE_OTHER, 304 NOT_MODIFIED, 305 USE_PROXY, 307 TEMPORARY_REDIRECT, 308 PERMANENT_REDIRECT, 400 BAD_REQUEST, 401 UNAUTHORIZED, 402 PAYMENT_REQUIRED, 403 FORBIDDEN, 404 NOT_FOUND, 405 METHOD_NOT_ALLOWED, 406 NOT_ACCEPTABLE, 407 PROXY_AUTHENTICATION_REQUIRED, 408 REQUEST_TIMEOUT, 409 CONFLICT, 410 GONE, 411 LENGTH_REQUIRED, 412 PRECONDITION_FAILED, 413 PAYLOAD_TOO_LARGE, 413 REQUEST_ENTITY_TOO_LARGE, 414 URI_TOO_LONG, 414 REQUEST_URI_TOO_LONG, 415 UNSUPPORTED_MEDIA_TYPE, 416 REQUESTED_RANGE_NOT_SATISFIABLE, 417 EXPECTATION_FAILED, 418 I_AM_A_TEAPOT, 419 INSUFFICIENT_SPACE_ON_RESOURCE, 420 METHOD_FAILURE, 421 DESTINATION_LOCKED, 422 UNPROCESSABLE_ENTITY, 423 LOCKED, 424 FAILED_DEPENDENCY, 426 UPGRADE_REQUIRED, 428 PRECONDITION_REQUIRED, 429 TOO_MANY_REQUESTS, 431 REQUEST_HEADER_FIELDS_TOO_LARGE, 451 UNAVAILABLE_FOR_LEGAL_REASONS, 500 INTERNAL_SERVER_ERROR, 501 NOT_IMPLEMENTED, 502 BAD_GATEWAY, 503 SERVICE_UNAVAILABLE, 504 GATEWAY_TIMEOUT, 505 HTTP_VERSION_NOT_SUPPORTED, 506 VARIANT_ALSO_NEGOTIATES, 507 INSUFFICIENT_STORAGE, 508 LOOP_DETECTED, 509 BANDWIDTH_LIMIT_EXCEEDED, 510 NOT_EXTENDED, 511 NETWORK_AUTHENTICATION_REQUIRED
- statusCodeValue: integer (int32)
Example
{
"body": "object",
"statusCode": "string",
"statusCodeValue": "integer (int32)"
}
UserDTO: object
ClearVAT User object. Within ClearVAT security context we store UserDTO instance to authorize logged user and validate user's merchant and shop domains.
- username: string
-
SAP user name: PXXXXXX. Required when user's details are modified.
- email: string
-
User's email. Required when new user is registered.
- password: string
-
User's password. Required when new user is registered.
- first_name: string
-
Basic uses are allowed to see only data within defined shop(shop_id)
- last_name: string
-
Basic uses are allowed to see only data within defined shop(shop_id)
- merchant_id: integer (int64)
-
User's merchant id. Use is allowed to see data only within defined merchant' domain(merchant_id)
- groups: string[]
-
User's group are used for service authorization. Group hierarchy: SHOP < MERCHANT < MERCHANT_ADMIN < ADMIN.
-
string COMMENCE, SHOP, MERCHANT, MERCHANT_ADMIN, ADMIN - send_email: boolean
-
When property is
truethen password change link is sent to user's mail box. - mail_verified: boolean
-
When property is
truethen an email is sent from SAP IAM to user's email for verification. - is_cache_used: boolean
-
Only for ADMIN users. When property is
truethen user's merchant_id and shop_id are read straight from the application' security context instead of SAP IAM properties. - shop_id: integer (int64)
-
Basic uses are allowed to see only data within defined shop(shop_id)
Example
{
"username": "P123456",
"email": "user@clearvat.org",
"password": "AaBbCc#42",
"first_name": "James",
"last_name": "Bond",
"merchant_id": 4,
"groups": [
"SHOP"
],
"send_email": false,
"mail_verified": false,
"is_cache_used": false,
"shop_id": 4711
}