User Management API
The system of record for users — attributes, passkeys, factors and policy.
The User Management service is the system of record for identities. Manage users and their attributes, passkeys, PINs and factors; wire up authentication modules and broker connections; and enforce account-lockout and behavioral-auth policy.
63 endpoints
across 22 resource groups.
ECDSA-signed
every request is signed with your key pair.
JSON over HTTPS
predictable REST, conventional status codes.
OpenAPI 3.0
Base URL
All User Management endpoints are relative to your environment host. Examples on this page use the 1Kosmos pilot environment — swap in your production root when you go live.
Content type
Requests and responses use application/json.
curl -X GET 'https://pilot-root.1kosmos.net/users-mgmt/healthz' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
Authentication
User Management uses ECDSA key-pair authentication. Each request carries your credentials as
HTTP headers; verification-grade calls additionally sign the request body. Retrieve the system signing
key from /publickeys.
curl -X GET 'https://pilot-root.1kosmos.net/users-mgmt/healthz' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/healthz", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/users-mgmt/healthz",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())Errors
User Management uses conventional HTTP status codes: 2xx success, 4xx a problem
with the request, 5xx a service-side error.
| Status | Meaning | Description |
|---|---|---|
| 200 / 204 | OK | The request succeeded. |
| 400 | Bad Request | Validation failed. |
| 401 | Unauthorized | Missing or invalid credentials. |
| 403 | Forbidden | Authenticated, but not permitted. |
| 404 | Not Found | The resource does not exist. |
| 500 | Server Error | Something went wrong on our side. |
{
"statusCode": 400,
"error": "Bad Request",
"message": "Validation error"
}User Management
Core user create / read / update / delete.
Change user password (role = none and type = basic).
Change user password (role = none and type = basic).
- Only a system, service and service_ext key can be used.
- Auth module must be available and enabled for the community.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
data (required)
authModule, username and newPassword json, encrypted with ECDSA.
Returns
Returns empty response.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger.
{
"authModule": "ObjectId required, ID of auth module",
"username": "string required",
"newPassword": "string required",
"eventData": "object optional. Key: `mode` — string. Allowed values: email_link_with_otp, email_link, id_proofing, authenticator, other."
}| Field | Type | Description |
|---|---|---|
| data | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/admin/changepassword' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/admin/changepassword", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/admin/changepassword",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
},
)
print(res.json())// no response body
// no response body
// no response body
Authenticate user (password, otp, ktoken, or pin)
Authenticate a user using at least one of the following factors: password, otp, ktoken, or pin.
- Any valid community license key can be used.
- If an otp code is provided, it will be verified for username against {adminconsole}/r2 OTP apis.
- This API now generates "proof_of_authentication" which can be encrypted for a referrer using ECDSA
- IIF user type is basic - Auth module must be available and enabled for the community.
- PIN is compared as sha512 hash with the stored value.
- At least one factor is required.
- If PIN is validated, "user_pin" will be included in the JWT methods array.
- If OTP is generated by serviceName then pass serviceName as optional.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
Request body contains 'data' field with encrypted object below:
{
"authModule": "ObjectId optional, ID of auth module",
"authModules": ["ObjectId of auth module Optional"],
"username": "string optional",
"password": "string optional",
"ktoken": "string optional",
"otp": "string optional",
"pin": "string optional",
"referrerPublicKey": "string optional",
"scep": "boolean optional",
"serviceName": "string optional"
}| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger.
{
"authModule": "ObjectId optional, ID of auth module",
"authModules": ["ObjectId of auth module Optional"],
"username": "string optional",
"password": "string optional",
"ktoken": "string optional",
"otp": "string optional",
"pin": "string optional",
"referrerPublicKey": "string optional",
"scep": "boolean optional",
"serviceName": "string optional"
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/authenticate' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"authModule": "string", "authModules": ["string"], "username": "string", "password": "string", "ktoken": "string", "otp": "string", "pin": "string", "referrerPublicKey": "string", "scep": true, "serviceName": "string"}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/authenticate", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"authModule": "string",
"authModules": [
"string"
],
"username": "string",
"password": "string",
"ktoken": "string",
"otp": "string",
"pin": "string",
"referrerPublicKey": "string",
"scep": true,
"serviceName": "string"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/authenticate",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"authModule": "string",
"authModules": [
"string"
],
"username": "string",
"password": "string",
"ktoken": "string",
"otp": "string",
"pin": "string",
"referrerPublicKey": "string",
"scep": true,
"serviceName": "string"
}
},
)
print(res.json()){
"data": {
"username": "xxxxxx",
"uid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"dguid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "xxxxxx",
"roleValue": "xxxxx",
"type": "xxxxx",
"moduleId": "xxxxxx",
"onboarding_status": "tbd",
"email": "xxxxx",
"firstname": "xxxxx",
"lastname": "xxxxx",
"phone": "xxxxx",
"urn": "xxx:xxx:xxxxxxxxxxxx:xxx:xxxxxxxxxxxxxxxxxxxx:xxx:xxxxxxxxxxxxxx:xxx:xxxxxxxxxxx:xxx:xxxxxxxxxxxx",
"proof_of_authentication_jwt": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"publicKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}// no response body
// no response body
Change user password (role = none).
Change user password (role = none).
- Only a system, service, service_ext, app and app_ext key can be used.
- A user must provide an existing password OR an OTP code which can be verified against username with {adminconsole}/r2 OTP apis
- If APP or APP_EXT licenses provided, A caller should provide an user did AND user publicKey which can be verified against username PON data {adminconsole} fetch userinfo apis
- Auth module must be available and enabled for the community.
- User with role 'none' is allowed.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
data (required)
authModule, username, currentPassword and newPassword json, encrypted with ECDSA.
Returns
Returns empty response.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger.
{
"authModule": "ObjectId required, ID of auth module",
"username": "string required",
"currentPassword": "string optional: only one of currentPassword | otp is required",
"otp": "string optional: only one of currentPassword | otp is required",
"userDid": "string optional, required for app/app_ext authLevel keys",
"userPublicKey": "string optional, required for app/app_ext authLevel keys",
"newPassword": "string required"
"eventData": "object optional. Key: `mode` — string. Allowed values: email_link_with_otp, email_link, id_proofing, authenticator, other."
}| Field | Type | Description |
|---|---|---|
| data | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/changepassword' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/changepassword", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/changepassword",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
},
)
print(res.json())// no response body
// no response body
// no response body
Fetch single basic user.
Fetch single basic user.
- Any valid key can be used to fetch user.
- If scep is true, basic key cannot be used
- Auth module must be available and enabled for the community.
- Returned users will be the type of 'basic'.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
authModule (optional)
ID of auth module is optional. If authModule is provided, fetch users from that particular authModule only. If authModule is not provided OR is null OR empty string THEN
- fetch default AUTHSCHEME(enabled: true && isDefault: true) from AuthN
- If no authScheme found, return ZERO results in the response.
- If authScheme is found, collect authModules in following order
- dbModule goes at location 0.
- other modules: [] get added IN ORDER.
username (required)
attributes (optional)
This will drive response_user.dir_attributes.
checkAliases (optional)
If it's true, first it will be search w/ username and if it's not found, then search username as alias in user-properties. default is false
do_transformation (optional)
IF it's true, THEN only transaform user object. default is true
check_locks (optional)
IF it's true, THEN only it will check for user locks status in DB default is true
load_props (optional)
IF it's true, THEN only it will fetch user-properties default is true
includeProperties (optional)
IF it's true, THEN only it will fetch user-properties, default is false
Returns
Returns the single user.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains object below:
{
"authModule": "ObjectId optional, ID of authModule",
"username": "username of user required",
"attributes": "array of user attributes, optional",
"checkAliases": boolean optional - default false,
"do_transformation": boolean optional - default true,
"check_locks": boolean optional - default true,
"load_props": boolean optional - default true,
"includeProperties": boolean optional - default false
}| Field | Type | Description |
|---|---|---|
| authModule | string | — |
| username | string | — |
| attributes | array<object> | — |
| checkAliases | boolean | — |
| do_transformation | boolean | — |
| check_locks | boolean | — |
| load_props | boolean | — |
| includeProperties | boolean | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/fetch_single_user_by_username' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx", "username": "", "attributes": [], "checkAliases": false, "do_transformation": true, "check_locks": true, "load_props": true, "includeProperties": false}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/fetch_single_user_by_username", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx",
"username": "",
"attributes": [],
"checkAliases": false,
"do_transformation": true,
"check_locks": true,
"load_props": true,
"includeProperties": false
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/fetch_single_user_by_username",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx",
"username": "",
"attributes": [],
"checkAliases": false,
"do_transformation": true,
"check_locks": true,
"load_props": true,
"includeProperties": false
},
)
print(res.json()){
"data": {
"username": "xxxxx",
"uid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"dguid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "xxxxxx",
"roleValue": "xxxxx",
"type": "xxxxx",
"moduleId": "xxxxxx",
"onboarding_status": "tbd",
"email": "xxxxxx",
"firstname": "xxxxxx",
"lastname": "xxxxxx",
"phone": "xxxxxx",
"urn": "xxx:xxx:xxxxxxxxxxxx:xxx:xxxxxxxxxxxxxxxxxxxx:xxx:xxxxxxxxxxxxxx:xxx:xxxxxxxxxxx:xxx:xxxxxxxxxxxx",
"typing_phrase": "xxx",
"is_user_pin_enrolled": true,
"userProperties": {
"mobiles": [],
"landlines": [],
"aliases": {}
}
}
}// no response body
// no response body
// no response body
// no response body
scep credentials for user.
Obtain the scep credentials for given userName without password authentication.
- Only permit system or service key to request a user's scep credentials
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
data (required)
authModule, username json, encrypted with ECDSA.
Returns
Returns the ECDSA encrypted scep credentials.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger.
{
"authModule": "ObjectId required, ID of auth module",
"username": "string required"
}| Field | Type | Description |
|---|---|---|
| data | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/scepcredentials' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"authModule": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "username": "xxxxxxxxxx"}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/scepcredentials", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"authModule": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"username": "xxxxxxxxxx"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/scepcredentials",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"authModule": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"username": "xxxxxxxxxx"
},
)
print(res.json()){
"scepCredentials": {
"certificate": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx=",
"privatekey": "xxxxxxx/xxxxxxxxxxxxxxxxx=",
"publickey": "xx/xxxxxxxxxxxxx="
}
}// no response body
// no response body
Verify user password.
Verify user password.
- Any valid community license key can be used.
- This API now generates "proof_of_authentication" which can be encrypted for a referrer using ECDSA
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
data (required)
authModule, username, password encrypted with ECDSA.
Returns
Returns the ECDSA encrypted user, and public key.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger.
{
"authModule": "ObjectId required, ID of auth module",
"username": "string required",
"dn": "string optional",
"password": "string required"
}| Field | Type | Description |
|---|---|---|
| data | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/validate_user_password' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/validate_user_password", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/validate_user_password",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
},
)
print(res.json()){
"data": {
"username": "xxxxxx",
"moduleId": "xxxxxx",
"proof_of_authentication_jwt": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"publicKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}// no response body
// no response body
// no response body
// no response body
Verify user ktoken.
Verify user ktoken.
- Any valid community license key can be used.
- This API now generates "proof_of_authentication" which can be encrypted for a referrer using ECDSA
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
data (required)
ktoken, attributes encrypted with ECDSA.
Returns
Returns the ECDSA encrypted user, and public key.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger.
{
"ktoken": "string required",
"attributes": [] // optional
}| Field | Type | Description |
|---|---|---|
| data | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/verify_user_ktoken' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/verify_user_ktoken", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/verify_user_ktoken",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
},
)
print(res.json()){
"data": {
"username": "xxxxxx",
"moduleId": "xxxxxx",
"proof_of_authentication_jwt": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"publicKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}// no response body
// no response body
// no response body
// no response body
Count all basic users.
Count all basic users for AzureAD only.
- Any valid key can be used to count users.
- Auth module must be available for the community.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
authModule (required)
ID of auth module.
query (optional)
The query to filter users.
Returns
Returns the users with pagination.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains object below:
{
"authModule": "ObjectId required, ID of authModule",
"query": "query object optional",
}| Field | Type | Description |
|---|---|---|
| authModule | string | — |
| query | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/users/count' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx", "query": {}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/users/count", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx",
"query": {}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/users/count",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx",
"query": {}
},
)
print(res.json()){
"id": "xxxxx",
"type": "xxxxxxxx",
"count": "XX"
}// no response body
// no response body
Fetch all basic users.
Fetch all basic users.
- Any valid key can be used to fetch users.
- If scep is true, basic key cannot be used
- Auth module must be available and enabled for the community.
- If includeProperties is requested true, it will add userProperties in response.
- Returned users will be the type of 'basic'.
--- SCEP/JWT Mandate (effective Jan 20, 2026):
- When called with a system/service key, behavior is unchanged.
- When called with an service/app/app_ext key and
scep: true: - If current date is after Jan 20, 2026 (or the value of
scep_jwt_mandate_epochfrom CaaS config), a JWT is mandatory in the request body (data.jwt). - If JWT is missing or invalid, returns 401 Unauthorized.
- JWT is validated via
/authn/jwt/verifyTokenand must haveisAuthenticated: true. - If current date is before the mandate, JWT is not required and behavior is unchanged.
- Response format remains unchanged.
---
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
authModule (optional)
ID of auth module is optional. If authModule is provided, fetch users from that particular authModule only. If authModule is not provided OR is null OR empty string THEN
- fetch default AUTHSCHEME(enabled: true && isDefault: true) from AuthN
- If no authScheme found, return ZERO results in the response.
- If authScheme is found, collect authModules in following order
- dbModule goes at location 0.
- other modules: [] get added IN ORDER.
pIndex (optional)
The pIndex key is a cursor for the pagination.
pSize (optional)
A limit on the number of objects to be returned. The range between 1 to 100 and the default is 25.
query (optional)
The query to filter users.
attributes (optional)
This will drive response_user.dir_attributes.
scep (optional Boolean)
If scep provided true. then it will return scep if requested query contains only username or uid.
- For service/app/app_ext keys after mandate date, JWT is required in
data.jwt.
maximumCount (optional)
If maximumCount (>= 1) attribute is provided, then it will return quickly - as soon as it finds maximumCount number of users, without fetching all users count among all available directories(authSchemes)
includeBrokerConnectionId (optional)
If includeBrokerConnectionId is provided, then request should forward to that specific broker and fetch the user using that specific broker.
excludeBrokerConnectionId (optional)
If excludeBrokerConnectionId is provided, then request should not forward to that specific broker
includeProperties (optional)
If includeProperties is requested true, then it will return the user properties in response.
Returns
Returns the users with pagination.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains object below:
{
"authModule": "ObjectId optional, ID of authModule",
"pIndex": "number optional, default = 0",
"pSize": "number optional, default = 25, min = 1, max = 100",
"query": "query object optional",
"attributes": "array of user attributes, optional",
"scep": "boolean optional",
"maximumCount": "number optional",
"includeBrokerConnectionId": ["optional"],
"excludeBrokerConnectionId": ["optional"],
"checkAliases": boolean optional
"includeProperties": boolean optional,
"jwt": "string, required for app/app_ext keys with scep after mandate date"
}| Field | Type | Description |
|---|---|---|
| authModule | string | — |
| pIndex | number | — |
| pSize | number | — |
| query | object | — |
| attributes | array<object> | — |
| includeBrokerConnectionId | array<object> | — |
| excludeBrokerConnectionId | array<object> | — |
| checkAliases | boolean | — |
| includeProperties | boolean | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/users/fetch' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx", "pIndex": 0, "pSize": 25, "query": {}, "attributes": [], "includeBrokerConnectionId": [], "excludeBrokerConnectionId": [], "checkAliases": false, "includeProperties": false}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/users/fetch", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx",
"pIndex": 0,
"pSize": 25,
"query": {},
"attributes": [],
"includeBrokerConnectionId": [],
"excludeBrokerConnectionId": [],
"checkAliases": false,
"includeProperties": false
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/users/fetch",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx",
"pIndex": 0,
"pSize": 25,
"query": {},
"attributes": [],
"includeBrokerConnectionId": [],
"excludeBrokerConnectionId": [],
"checkAliases": false,
"includeProperties": false
},
)
print(res.json()){
"page": {
"index": 0,
"total": 50,
"size": 25
},
"publicKey": "xxxxxxx",
"data": [
{
"username": "xxxxx",
"uid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"dguid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "xxxxxx",
"roleValue": "xxxxx",
"type": "xxxxx",
"moduleId": "xxxxxx",
"onboarding_status": "tbd",
"email": "xxxxxx",
"firstname": "xxxxxx",
"lastname": "xxxxxx",
"phone": "xxxxxx",
"urn": "xxx:xxx:xxxxxxxxxxxx:xxx:xxxxxxxxxxxxxxxxxxxx:xxx:xxxxxxxxxxxxxx:xxx:xxxxxxxxxxx:xxx:xxxxxxxxxxxx",
"typing_phrase": "xxx",
"is_user_pin_enrolled": true,
"userProperties": {
"mobiles": [],
"landlines": [],
"aliases": {}
}
}
]
}// no response body
// no response body
Create bulk users.
Create bulk users.
- Only a system, service and service_ext key can be used to create bulk users.
- A app, app_ext key can be used to create single user as long as an otp is provided.
- Use app | app_ext key w/ OTP to support "self-registration" from an app (eg: mobile app)
- User {adminconsole}/r2 OTP api to request an otp for the user
- Created users will be the type of basic with the role none.
- Auth module must be available and enabled for the community.
- Username is unique by community.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
authModule (required)
ID of auth module.
users (required)
List of users to import.
Returns
Returns the counts of requested, created, failed, and the number of errors.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains below fields to create users.
{
"authModule": "ObjectId required, ID of auth module.",
"users": [
{
"username": "string required",
"password": "string required",
"status": "string optional - active or locked or disabled, default = active",
"firstname": "string required",
"middlename": "string optional",
"lastname": "string required",
"email1": "string required - valid email address",
"email1_verified": "boolean optional",
"email2": "string optional - valid email address",
"email2_verified": "boolean optional",
"phone1": "string optional - only digits",
"phone1_verified": "boolean optional",
"address": {
"house": "string optional",
"streetname": "string optional",
"city": "string optional",
"state": "string optional",
"country": "string optional",
"zip": "string optional"
},
"address_verified": "boolean optional",
"disabled": "boolean optional",
"otp": "string optional",
"idpId": "string optional"
}
]
}| Field | Type | Description |
|---|---|---|
| authModule | string | — |
| users | array<object> | — |
curl -X PUT 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/users/create' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx", "users": [{"username": "string", "password": "string", "status": "string", "firstname": "string", "middlename": "string-optional", "lastname": "string", "email1": "string", "email1_verified": true, "email2": "string-optional", "email2_verified": true, "phone1": "string-only-digits", "phone1_verified": true, "address": {}, "address_verified": true, "disabled": false, "idpId": "string"}]}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/users/create", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx",
"users": [
{
"username": "string",
"password": "string",
"status": "string",
"firstname": "string",
"middlename": "string-optional",
"lastname": "string",
"email1": "string",
"email1_verified": true,
"email2": "string-optional",
"email2_verified": true,
"phone1": "string-only-digits",
"phone1_verified": true,
"address": {},
"address_verified": true,
"disabled": false,
"idpId": "string"
}
]
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/users/create",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx",
"users": [
{
"username": "string",
"password": "string",
"status": "string",
"firstname": "string",
"middlename": "string-optional",
"lastname": "string",
"email1": "string",
"email1_verified": true,
"email2": "string-optional",
"email2_verified": true,
"phone1": "string-only-digits",
"phone1_verified": true,
"address": {},
"address_verified": true,
"disabled": false,
"idpId": "string"
}
]
},
)
print(res.json()){
"requested": 10,
"created": 10,
"failed": 0,
"errors": []
}// no response body
// no response body
// no response body
Update user by username.
Update user by username.
- Only a system, service and service_ext key can be used to update user.
- Auth module must be available and enabled for the community.
- Only basic user will be updated.
- roleValue, uid, username, password cannot be updated.
- Only provided attributes will be updated.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
authModule (required)
ID of auth module.
username (required)
Username of user, used to identify user.
type (optional)
This key sets the type of a user. The type key only accept these values ("systemuser", "basic").
status (optional)
This key sets the status of a user. The type key only accept these values ("active", "locked", "disabled").
firstname (optional)
This key sets the first name of a user.
middlename (optional)
This key sets the middle name of a user.
lastname (optional)
This key sets the last name of a user.
email1 (optional)
This key sets the first email of a user.
email1_verified (optional)
This key sets the verification status of the first email.
email2 (optional)
This key sets the second email of the user.
emaild_verified (optional)
This key sets the verification status of the second email.
phone1 (optional)
This key sets the phone number of a user.
phone1_verified (optional)
This key sets the verification status of the phone number.
address (optional object)
This key sets the address of the user.
address_verified (optional)
This key sets the verification status of the address.
disabled (optional)
This key set disabled status of a user. The disabled key only accept these values (true, false).
attributes (optional)
This key accepts an array of attributes that need to return in the response.
Returns
Returns the updated system user.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains below fields to update user.
{
"authModule": "string required, ObjectId of auth module",
"username": "string required",
"type": "string optional - systemuser or basic",
"status": "string optional - active or locked or disabled",
"firstname": "string optional",
"middlename": "string optional",
"lastname": "string optional",
"email1": "string optional - valid email address",
"email1_verified": "boolean optional",
"email2": "string optional - valid email address",
"email2_verified": "boolean optional",
"phone1": "string optional - only digits",
"phone1_verified": "boolean optional",
"address": {
"house": "string optional",
"streetname": "string optional",
"city": "string optional",
"state": "string optional",
"country": "string optional",
"zip": "string optional"
},
"address_verified": "boolean optional",
"disabled": "boolean optional"
"attributes": []
}| Field | Type | Description |
|---|---|---|
| authModule | string | — |
| username | string | — |
| type | string | — |
| status | string | — |
| firstname | string | — |
| middlename | string | — |
| lastname | string | — |
| email1 | string | — |
| email1_verified | string | — |
| email2 | string | — |
| email2_verified | string | — |
| phone1 | string | — |
| phone1_verified | string | — |
| address | string | — |
| address_verified | string | — |
| disabled | string | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/update' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx", "username": "xxxxx", "status": "xxxxxx", "firstname": "xxxxxxxx", "middlename": "xxxxxxxx", "lastname": "xxxxxxxx", "email1": "xxxxx@xxxxxxxx.xxx", "email1_verified": true, "email2": "xxxxx@xxxxxxxx.xxx", "email2_verified": true, "phone1": "xxxxxxxxxx", "phone1_verified": true, "address": {}, "address_verified": false, "disabled": false}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/update", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx",
"username": "xxxxx",
"status": "xxxxxx",
"firstname": "xxxxxxxx",
"middlename": "xxxxxxxx",
"lastname": "xxxxxxxx",
"email1": "xxxxx@xxxxxxxx.xxx",
"email1_verified": true,
"email2": "xxxxx@xxxxxxxx.xxx",
"email2_verified": true,
"phone1": "xxxxxxxxxx",
"phone1_verified": true,
"address": {},
"address_verified": false,
"disabled": false
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/update",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"authModule": "xxxxxxxxxxxxxxxxxxxxxxxx",
"username": "xxxxx",
"status": "xxxxxx",
"firstname": "xxxxxxxx",
"middlename": "xxxxxxxx",
"lastname": "xxxxxxxx",
"email1": "xxxxx@xxxxxxxx.xxx",
"email1_verified": true,
"email2": "xxxxx@xxxxxxxx.xxx",
"email2_verified": true,
"phone1": "xxxxxxxxxx",
"phone1_verified": true,
"address": {},
"address_verified": false,
"disabled": false
},
)
print(res.json()){
"uid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tenantId": "xxxxxxxxxx",
"communityId": "xxxxxxxxxxxxxxxxxxxxxxxx",
"username": "xxxxxx",
"type": "xxxxx",
"roleValue": "xxxxx",
"status": "xxxxxx",
"firstname": "xxxxxxxx",
"middlename": "xxxxxxxx",
"lastname": "xxxxxxxx",
"email1": "xxxxx@xxxxxxxx.xxx",
"email1_verified": true,
"email2": "xxxxx@xxxxxxxx.xxx",
"email2_verified": true,
"phone1": "xxxxxxxxxx",
"phone1_verified": true,
"address": {},
"address_verified": false,
"disabled": false,
"urn": "xxx:xxx:xxxxxxxxxxxx:xxx:xxxxxxxxxxxxxxxxxxxx:xxx:xxxxxxxxxxxxxx:xxx:xxxxxxxxxxx:xxx:xxxxxxxxxxxx"
}// no response body
// no response body
// no response body
// no response body
Auth Module
Per-user authentication modules.
Get auth module by moduleId.
Get auth module by moduleId.
- Key must be authorized for community.
- Only a system, service and service_ext key can be used to fetch auth module.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Parameters
No Parameters
Returns
Returns the auth module, encrypted with ECDSA and public key.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | — |
| communityIdrequired | string | — |
| moduleIdrequired | string | — |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx", {
method: "GET",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
}// no response body
// no response body
// no response body
Get password policy by moduleId.
Get password policy by moduleId.
- Any license.
Returns
Password policy rules with descriptions.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | — |
| communityIdrequired | string | — |
| moduleIdrequired | string | — |
| Name | Type | Description |
|---|---|---|
| requestid | string | JSON string |
curl -X GET 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/pwd-policy' \ -H 'requestid: <ecdsa-requestid>'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/pwd-policy", {
method: "GET",
headers: {
"requestid": "<ecdsa-requestid>"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/pwd-policy",
headers={
"requestid": "<ecdsa-requestid>"
}
)
print(res.json()){
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
}// no response body
// no response body
test auth module.
test auth module.
- Key must be authorized for community.
- Only a system, service and service_ext key can be used to update auth module.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Returns
Returns the updated auth module, encrypted with ECDSA and public key.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| moduleIdrequired | string | ID of module |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/test-connection' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/test-connection", {
method: "GET",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/test-connection",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
}// no response body
// no response body
Update auth module hosts status
Update the status of hosts in an auth module.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | — |
| communityIdrequired | string | — |
| moduleIdrequired | string | — |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | — |
| requestidrequired | string | — |
| publickeyrequired | string | — |
| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxxxxxxxxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/update-hosts-status' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"hosts": {"attempts": [{"host": {"server": "ldap.example.com", "port": "389"}, "status": "failed", "ts": "2025-12-05T10:30:00Z"}]}, "app_name": "My Application", "app_id": "app-123456"}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxxxxxxxxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/update-hosts-status", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"hosts": {
"attempts": [
{
"host": {
"server": "ldap.example.com",
"port": "389"
},
"status": "failed",
"ts": "2025-12-05T10:30:00Z"
}
]
},
"app_name": "My Application",
"app_id": "app-123456"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxxxxxxxxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/update-hosts-status",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"hosts": {
"attempts": [
{
"host": {
"server": "ldap.example.com",
"port": "389"
},
"status": "failed",
"ts": "2025-12-05T10:30:00Z"
}
]
},
"app_name": "My Application",
"app_id": "app-123456"
}
},
)
print(res.json()){
"message": "success"
}// no response body
// no response body
// no response body
Fetch all auth modules.
Fetch all auth modules.
- Key must be authorized for community.
- Only a system, service and service_ext key can be used to fetch auth modules.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Parameters
No Parameters
Returns
Returns all auth modules, encrypted with ECDSA and public key.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | — |
| communityIdrequired | string | — |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/modules/fetch' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/modules/fetch", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/modules/fetch",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={},
)
print(res.json()){
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
}// no response body
// no response body
// no response body
Create auth module.
Create auth module.
- Only a system, service and service_ext key can be used to create auth module.
- Key must be authorized for community.
- Uniquey by type and community.
- A keytab_uuid is issued if and when a kerberos.keytab_file is added
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
data (required)
Auth module data encrypted with ECDSA.
Returns
Returns the created auth module, encrypted with ECDSA and public key.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger.
for type db:
{
"type": "db",
"subtype": "datastore",
"method": "authn",
"name": "string required",
"enabled": true,
"mode": "direct",
"config": {
"passwordPolicy": {
"authtype": "string required", // Face | Fingerprint
"rules": {
"min": "number required",
"min_enabled": boolean required,
"min_special": "number required",
"min_special_enabled": boolean required,
"min_numbers": "number required",
"min_numbers_enabled": boolean required,
"special_chars_allowed": "string required",
"special_chars_allowed_enabled": boolean required,
"min_alpha_caps": "number required",
"min_alpha_caps_enabled": boolean required,
"noUsername": boolean required,
"noUsername_enabled": boolean required,
"allowInRow": "number required",
"allowInRow_enabled": boolean required
},
"descriptions": [
"string required"
]
}
}
}
for direct ad/ldap:
{
"type": "ad/ldap",
"subtype": "directory",
"method": "authn",
"name": "string required",
"enabled": true,
"mode": "direct",
"config": {
"hosts": [{
"server": "string optional",
"port": "string optional",
}],
"hostTimeoutSeconds": "number optional - default = 10s",
"hostRetryAfterMinutes": "number optional - default = 30m",
"caList": [{
"cert_template": "string optional",
"dc_dns": "string optional",
"dc_ca": "string optional"
}],
"caTimeoutSeconds": "number optional - default = 10s",
"caRetryAfterMinutes": "number optional - default = 30m",
"serverprotocol": "string required - ldap or ldaps",
"server": "string required",
"serverport": "string required",
"binddn": "string required",
"bindpassword": "string required",
"basedn": "string required",
"securityauthentication": "string required - Simple or Secure or Sealing or Encryption or SecureSocketLayer or ServerBind",
"forcePasswordResetEnabled": "boolean optional",
"filter": "string required",
"serviceacctreadonly": "boolean required",
"ldapqueryfilter": "string optional",
"passwordPolicy": {
"authtype": "string required", // Face | Fingerprint
"rules": {
"min": "number required",
"min_enabled": boolean required,
"min_special": "number required",
"min_special_enabled": boolean required,
"min_numbers": "number required",
"min_numbers_enabled": boolean required,
"special_chars_allowed": "string required",
"special_chars_allowed_enabled": boolean required,
"min_alpha_caps": "number required",
"min_alpha_caps_enabled": boolean required,
"noUsername": boolean required,
"noUsername_enabled": boolean required,
"allowInRow": "number required",
"allowInRow_enabled": boolean required
},
"descriptions": [
"string required"
]
}
}
}
for direct azuread:
{
"type": "azuread",
"subtype": "directory",
"method": "authn",
"name": "string required",
"enabled": true,
"mode": "direct",
"config": {
"appName": "string required",
"tenantId": "string required",
"tenantName": "string required",
"clientId": "string required",
"clientSecret": "string required",
"loginBasePath": "string required",
"graphApiBasePath": "string required"
}
}
for broker ad/ldap:
{
"type": "ad/ldap",
"subtype": "directory",
"method": "authn",
"name": "string required",
"enabled": true,
"mode": "broker",
"config": {
"hosts": [{
"server": "string optional",
"port": "string optional",
}],
"hostTimeoutSeconds": "number optional - default = 10s",
"hostRetryAfterMinutes": "number optional - default = 30m",
"caList": [{
"cert_template": "string optional",
"dc_dns": "string optional",
"dc_ca": "string optional"
}],
"caTimeoutSeconds": "number optional - default = 10s",
"caRetryAfterMinutes": "number optional - default = 30m",
"serverprotocol": "string optional - ldap or ldaps",
"server": "string optional",
"serverport": "string optional",
"binddn": "string optional",
"basedn": "string optional",
"securityauthentication": "string optional - Simple or Secure or Sealing or Encryption or SecureSocketLayer or ServerBind",
"forcePasswordResetEnabled": "boolean optional",
"filter": "string optional",
"serviceacctreadonly": "boolean optional",
"scepenabled": "boolean optional",
"scepurl": "string optional",
"challengeurl": "string optional",
"scepagent": "string optional",
"cert_enabled": "boolean optional",
"cert_template": "string optional", // Alphabets, numerals, spaces, special characters allowed
"dc_dns": "string optional", // DNS names can contain only alphabetic characters (A-Z, a-z), numeric characters (0-9), the minus sign (-), and the period (.)
"dc_ca": "string optional", // up to 64 characters, ANSI character set
"ldapqueryfilter": "string optional",
"transformationJSB64": "string optional",
"logfilesizemb": number optional, // default is 10, it's only for BROKER
"logfilecount": number optional, // default is 10, it's only for BROKER, floating values like 0.2 or 10.3 will be considered 0 or 10 respectively
"notificationAfterNoOfMinsDisconnect": "number optional", // default 5
"brokerDisconnectNotificationTo": "array optional",
"brokerNotificationsEnabled": "boolean optional", // default false
"hostStatusChangeNotificationsTo": "array optional",
"hostStatusChangeNotificationsEnabled": "boolean optional", // default false
"caStatusChangeNotificationsTo": "array optional",
"caStatusChangeNotificationsEnabled": "boolean optional", // default false
"passwordPolicy": {
"authtype": "string required", // Face | Fingerprint
"rules": {
"min": "number required",
"min_enabled": boolean required,
"min_special": "number required",
"min_special_enabled": boolean required,
"min_numbers": "number required",
"min_numbers_enabled": boolean required,
"special_chars_allowed": "string required",
"special_chars_allowed_enabled": boolean required,
"min_alpha_caps": "number required",
"min_alpha_caps_enabled": boolean required,
"noUsername": boolean required,
"noUsername_enabled": boolean required,
"allowInRow": "number required",
"allowInRow_enabled": boolean required
},
"descriptions": [
"string required"
]
}
},
"kerberos_config": {
"enabled": "boolean, required if kerberos_config is included",
"keytab_file": "string (base64) required if kerberos_config is included",
}
}| Field | Type | Description |
|---|---|---|
| data | string | — |
curl -X PUT 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/create' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/create", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/create",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
},
)
print(res.json()){
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
}// no response body
// no response body
Update auth module.
Update auth module.
- Key must be authorized for community.
- Only a system, service and service_ext key can be used to update auth module.
- A keytab_uuid is issued if and when a kerberos.keytab_file is added
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
data (required)
Auth module data encrypted with ECDSA.
Returns
Returns the updated auth module, encrypted with ECDSA and public key.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| moduleIdrequired | string | — |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger.
IMPORTANT - you can set enabled = true only if config is valid
for type db:
{
"name": "string optional",
"enabled": true,
"config": {
"passwordPolicy": {
"authtype": "string required", // Face | Fingerprint
"rules": {
"min": "number required",
"min_enabled": boolean required,
"min_special": "number required",
"min_special_enabled": boolean required,
"min_numbers": "number required",
"min_numbers_enabled": boolean required,
"special_chars_allowed": "string required",
"special_chars_allowed_enabled": boolean required,
"min_alpha_caps": "number required",
"min_alpha_caps_enabled": boolean required,
"noUsername": boolean required,
"noUsername_enabled": boolean required,
"allowInRow": "number required",
"allowInRow_enabled": boolean required
},
"descriptions": [
"string required"
]
}
}
}
for direct ad/ldap:
{
"name": "string optional",
"enabled": true,
"config": {
"hosts": [{
"server": "string optional",
"port": "string optional",
}],
"hostTimeoutSeconds": "number optional - default = 10s",
"hostRetryAfterMinutes": "number optional - default = 30m",
"serverprotocol": "string required - ldap or ldaps",
"server": "string required",
"serverport": "string required",
"binddn": "string required",
"bindpassword": "string required",
"basedn": "string required",
"securityauthentication": "string required - Simple or Secure or Sealing or Encryption or SecureSocketLayer or ServerBind",
"forcePasswordResetEnabled": "boolean optional",
"filter": "string required",
"serviceacctreadonly": "boolean required",
"ldapqueryfilter": "string optional",
"passwordPolicy": {
"authtype": "string required", // Face | Fingerprint
"rules": {
"min": "number required",
"min_enabled": boolean required,
"min_special": "number required",
"min_special_enabled": boolean required,
"min_numbers": "number required",
"min_numbers_enabled": boolean required,
"special_chars_allowed": "string required",
"special_chars_allowed_enabled": boolean required,
"min_alpha_caps": "number required",
"min_alpha_caps_enabled": boolean required,
"noUsername": boolean required,
"noUsername_enabled": boolean required,
"allowInRow": "number required",
"allowInRow_enabled": boolean required
},
"descriptions": [
"string required"
]
}
}
}
for direct azuread:
{
"name": "string optional",
"enabled": true,
"config": {
"appName": "string",
"tenantId": "string",
"tenantName": "string",
"clientId": "string",
"clientSecret": "string",
"loginBasePath": "string",
"graphApiBasePath": "string"
}
}
for type broker ad/ldap:
{
"name": "string optional",
"enabled": true,
"config": {
"hosts": [{
"server": "string optional",
"port": "string optional",
}],
"hostTimeoutSeconds": "number optional - default = 10s",
"hostRetryAfterMinutes": "number optional - default = 30m",
"caList": [{
"cert_template": "string optional",
"dc_dns": "string optional",
"dc_ca": "string optional"
}],
"caTimeoutSeconds": "number optional - default = 10s",
"caRetryAfterMinutes": "number optional - default = 30m",
"serverprotocol": "string optional - ldap or ldaps",
"server": "string optional",
"serverport": "string optional",
"binddn": "string optional",
"basedn": "string optional",
"securityauthentication": "string optional - Simple or Secure or Sealing or Encryption or SecureSocketLayer or ServerBind",
"forcePasswordResetEnabled" : "boolean optional",
"filter": "string optional",
"serviceacctreadonly": "boolean optional",
"scepenabled": "boolean optional",
"scepurl": "string optional",
"challengeurl": "string optional",
"scepagent": "string optional",
"cert_enabled": "boolean optional",
"cert_template": "string optional", // Alphabets, numerals, spaces, special characters allowed
"dc_dns": "string optional", // DNS names can contain only alphabetic characters (A-Z, a-z), numeric characters (0-9), the minus sign (-), and the period (.)
"dc_ca": "string optional", // up to 64 characters, ANSI character set
"ldapqueryfilter": "string optional",
"transformationJSB64": "string optional",
"logfilesizemb": number optional, // default is 10, it's only for BROKER
"logfilecount": number optional, // default is 10, it's only for BROKER
"notificationAfterNoOfMinsDisconnect": "number optional", // default 5
"brokerDisconnectNotificationTo": "array optional",
"brokerNotificationsEnabled": "boolean optional", // default false
"hostStatusChangeNotificationsTo": "array optional",
"hostStatusChangeNotificationsEnabled": "boolean optional", // default false
"caStatusChangeNotificationsTo": "array optional",
"caStatusChangeNotificationsEnabled": "boolean optional", // default false
"passwordPolicy": {
"authtype": "string required", // Face | Fingerprint
"rules": {
"min": "number required",
"min_enabled": boolean required,
"min_special": "number required",
"min_special_enabled": boolean required,
"min_numbers": "number required",
"min_numbers_enabled": boolean required,
"special_chars_allowed": "string required",
"special_chars_allowed_enabled": boolean required,
"min_alpha_caps": "number required",
"min_alpha_caps_enabled": boolean required,
"noUsername": boolean required,
"noUsername_enabled": boolean required,
"allowInRow": "number required",
"allowInRow_enabled": boolean required
},
"descriptions": [
"string required"
]
}
},
"kerberos_config": {
"enabled": "boolean optional",
"keytab_file": "base64 string optional"
}
}| Field | Type | Description |
|---|---|---|
| data | string | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
},
)
print(res.json()){
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
}// no response body
// no response body
Delete auth module by moduleId.
Delete auth module by moduleId.
- Key must be authorized for community.
- Only a system, service and service_ext key can be used to delete auth modules.
- <b>WARNING: When deleting auth module of type db, All users of the related community will be deleted from DB.</b>
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Parameters
No Parameters
Returns
No content.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantId | string | — |
| communityIdrequired | string | — |
| moduleIdrequired | string | — |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X DELETE 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx", {
method: "DELETE",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())// no response body
// no response body
// no response body
// no response body
User Attribute
Manage user attributes.
Get attributes shared authModule with attributeId.
Get all user attributes of the same directory/authModule as to the attribute identified by attributId.
- Key must be authorized for community.
- Only a system, service and service_ext key can be used to create user attributes.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Returns
Returns all user attributes of auth module.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| attributeIdrequired | string | ID of an User Attribute |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attribute/xxxxxxxxxxxxxxxxxxxxxxxx/attributes' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attribute/xxxxxxxxxxxxxxxxxxxxxxxx/attributes", {
method: "GET",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attribute/xxxxxxxxxxxxxxxxxxxxxxxx/attributes",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())[
{
"_id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "xxxx",
"attribute": "xxxx",
"moduleId": "xxxxxxxxxxxxxxxxxxxxxxxx"
}
]// no response body
// no response body
Get all user attribute of auth module.
Get all user attribute for auth module.
- Key must be authorized for community.
- Only a system, service and service_ext key can be used to create user attributes.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Returns
Returns all user attributes of auth module.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| moduleIdrequired | string | ID of auth module |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attributes?moduleId=xxxxxxxxxxxxxxxxxxxxxxxx' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attributes?moduleId=xxxxxxxxxxxxxxxxxxxxxxxx", {
method: "GET",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attributes?moduleId=xxxxxxxxxxxxxxxxxxxxxxxx",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())[
{
"_id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "xxxx",
"attribute": "xxxx",
"moduleId": "xxxxxxxxxxxxxxxxxxxxxxxx"
}
]// no response body
// no response body
Get Directory Attributes for the auth module.
Get directory attributes for the auth module.
- Key must be authorized for community.
- Only a system, service and service_ext key can be used to create user attributes.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
pIndex (optional)
The pIndex key is a cursor for the pagination.
pSize (optional)
A limit on the number of objects to be returned. The range between 1 to 100 and the default is 25.
Returns
Returns directory attributes of auth module.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| moduleIdrequired | string | ID of auth module |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains object below:
{
"pIndex": "number optional, default = 0",
"pSize": "number optional, default = 25, min = 1, max = 100"
}| Field | Type | Description |
|---|---|---|
| pIndex | number | — |
| pSize | number | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/directoryattributes?moduleId=xxxxxxxxxxxxxxxxxxxxxxxx' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"pIndex": 0, "pSize": 25}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/directoryattributes?moduleId=xxxxxxxxxxxxxxxxxxxxxxxx", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"pIndex": 0,
"pSize": 25
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/directoryattributes?moduleId=xxxxxxxxxxxxxxxxxxxxxxxx",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"pIndex": 0,
"pSize": 25
},
)
print(res.json()){
"page": {
"index": 0,
"total": 50,
"size": 25
},
"data": [
"attr1",
"attr2"
]
}// no response body
// no response body
// no response body
Create user attribute for auth module.
Create user attribute for auth module.
- Key must be authorized for community.
- Only a system, service and service_ext key can be used to create user attributes.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
attributes (required)
List of user attributes to add for auth module.
Returns
Returns the created user attributes and errors if any.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| moduleIdrequired | string | ID of auth module |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
List of user attributes to add for auth module.
{
"attributes": [
{
"name": "string required, name of attribute",
"attribute": "string required, attribute in data source"
}
]
}| Field | Type | Description |
|---|---|---|
| attributes | array<object> | — |
curl -X PUT 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attributes?moduleId=xxxxxxxxxxxxxxxxxxxxxxxx' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"attributes": [{"name": "xxxx", "attribute": "xxxx"}]}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attributes?moduleId=xxxxxxxxxxxxxxxxxxxxxxxx", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"attributes": [
{
"name": "xxxx",
"attribute": "xxxx"
}
]
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attributes?moduleId=xxxxxxxxxxxxxxxxxxxxxxxx",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"attributes": [
{
"name": "xxxx",
"attribute": "xxxx"
}
]
},
)
print(res.json()){
"created": [
{
"_id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "xxxx",
"attribute": "xxxx",
"moduleId": "xxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"_id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "xxxx",
"attribute": "xxxx",
"moduleId": "xxxxxxxxxxxxxxxxxxxxxxxx"
}
],
"errors": [
{
"code": 401,
"message": "xxxxxxxxxxx"
}
]
}// no response body
// no response body
Update user attribute.
Update user attribute.
- Key must be authorized for community.
- Only a system, service and service_ext key can be used to create user attributes.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
name (optional)
Name of attribute.
attribute (optional)
Identifier of attribute
Returns
Returns the updated user attributes.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| attributeIdrequired | string | ID of user attribute |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
User attribute fields to update.
{
"name": "string required, name of attribute",
"attribute": "string required, attribute in data source"
}| Field | Type | Description |
|---|---|---|
| name | string | — |
| attribute | string | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attribute/xxxxxxxxxxxxxxxxxxxxxxxx' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"name": "xxxx", "attribute": "xxxx"}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attribute/xxxxxxxxxxxxxxxxxxxxxxxx", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"name": "xxxx",
"attribute": "xxxx"
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attribute/xxxxxxxxxxxxxxxxxxxxxxxx",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"name": "xxxx",
"attribute": "xxxx"
},
)
print(res.json()){
"_id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "xxxx",
"attribute": "xxxx",
"moduleId": "xxxxxxxxxxxxxxxxxxxxxxxx"
}// no response body
// no response body
// no response body
Bulk update user attributes.
Bulk update user attributes.
- Key must be authorized for community.
- Only a system, service and service_ext key can be used to update user attributes.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Returns
Returns updated attributes of auth module and errors (if any).
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
List of user attributes to add for auth module.
{
"attributes": [
{
"id": "string required",
"name": "string required, name of attribute",
"attribute": "string required, attribute in data source"
}
]
}
| Field | Type | Description |
|---|---|---|
| attributes | array<object> | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attributes' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"attributes": [{"id": "xxxx", "name": "xxxx", "attribute": "xxxx"}]}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attributes", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"attributes": [
{
"id": "xxxx",
"name": "xxxx",
"attribute": "xxxx"
}
]
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attributes",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"attributes": [
{
"id": "xxxx",
"name": "xxxx",
"attribute": "xxxx"
}
]
},
)
print(res.json()){
"updated": [
{
"_id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "xxxx",
"attribute": "xxxx",
"moduleId": "xxxxxxxxxxxxxxxxxxxxxxxx"
},
{
"_id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "xxxx",
"attribute": "xxxx",
"moduleId": "xxxxxxxxxxxxxxxxxxxxxxxx"
}
],
"errors": [
{
"code": 401,
"message": "xxxxxxxxxxx"
}
]
}// no response body
// no response body
// no response body
Delete user attribute.
Remove user attribute.
- Key must be authorized for community.
- Only a system, service and service_ext key can be used to create user attributes.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
name (optional)
Name of attribute.
attribute (optional)
Identifier of attribute
Returns
No content.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| attributeIdrequired | string | ID of user attribute |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X DELETE 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attribute/xxxxxxxxxxxxxxxxxxxxxxxx' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attribute/xxxxxxxxxxxxxxxxxxxxxxxx", {
method: "DELETE",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/attribute/xxxxxxxxxxxxxxxxxxxxxxxx",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())// no response body
// no response body
// no response body
// no response body
System User
System User endpoints.
Verify system user password.
Verify system user password.
- Any valid key can be used to verify system user password.
- Only systemuser type user will be verified.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
data (required)
username and password json, encrypted with ECDSA.
Returns
Returns the verification status.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger.
{
"username": "string required",
"password": "string required"
}| Field | Type | Description |
|---|---|---|
| data | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/systemuser/authenticate' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/systemuser/authenticate", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/systemuser/authenticate",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
},
)
print(res.json()){
"status": true
}// no response body
// no response body
Change system user password.
Change system user password.
- Only a system and a service key can be used to change system user password.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
data (required)
username and newPassword json, encrypted with ECDSA.
Returns
Returns empty response.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger.
{
"username": "string required",
"newPassword": "string required"
}| Field | Type | Description |
|---|---|---|
| data | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/systemuser/changepassword' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/systemuser/changepassword", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/systemuser/changepassword",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
},
)
print(res.json())// no response body
// no response body
// no response body
Fetch all system users.
Fetch all system users.
- Only a system and a service key can be used to fetch system users.
- Returned users will be the type of 'systemuser'.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
pIndex (optional)
The pIndex key is a cursor for the pagination. Default is 0.
pSize (optional)
A limit on the number of objects to be returned. The range between 1 to 100 and the default is 25.
query (optional)
The query to filter users.
attributes (optional)
This will drive response_user.dir_attributes.
authModule (optional)
This tells what auth module should be used for attribute mapping.
Returns
Returns the system users with pagination.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains object below:
{
"pIndex": "number optional, default = 0",
"pSize": "number optional, default = 25, min = 1, max = 100",
"query": "query object optional",
"attributes": "array of attributes, optional",
"authModule": "string optional"
}| Field | Type | Description |
|---|---|---|
| pIndex | number | — |
| pSize | number | — |
| query | object | — |
| attributes | array<object> | — |
| authModule | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/systemusers/fetch' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"pIndex": 0, "pSize": 25, "query": {}, "attributes": [], "authModule": "xxxxxxxxxxx"}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/systemusers/fetch", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"pIndex": 0,
"pSize": 25,
"query": {},
"attributes": [],
"authModule": "xxxxxxxxxxx"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/systemusers/fetch",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"pIndex": 0,
"pSize": 25,
"query": {},
"attributes": [],
"authModule": "xxxxxxxxxxx"
},
)
print(res.json()){
"page": {
"index": 0,
"total": 50,
"size": 25
},
"data": [
{
"username": "xxxxx",
"uid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"dguid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "xxxxxx",
"roleValue": "xxxxx",
"type": "xxxxx",
"moduleId": "xxxxxx",
"onboarding_status": "tbd",
"email": "xxxxxx",
"firstname": "xxxxxx",
"lastname": "xxxxxx",
"phone": "xxxxxx"
}
]
}// no response body
// no response body
Create system user.
Create system user.
- Only a system and a service key can be used to create a system user.
- Created user will be the type of 'systemuser'.
- The communityId will be set to 'any' for the created user.
- The roleValue will be set to 'none'
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
data (required)
User data encrypted with ECDSA
Returns
Returns the created system user, encrypted with ECDSA and public key.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger.
{
"tenantId": "string required",
"username": "string required",
"password": "string required",
"status": "string optional - active or locked or disabled, default = active",
"firstname": "string required",
"middlename": "string optional",
"lastname": "string required",
"email1": "string required - valid email address",
"email1_verified": "boolean required",
"email2": "string optional - valid email address",
"email2_verified": "boolean optional",
"phone1": "string optional - only digits",
"phone1_verified": "boolean optional",
"address": {
"house": "string optional",
"streetname": "string optional",
"city": "string optional",
"state": "string optional",
"country": "string optional",
"zip": "string optional"
},
"address_verified": "boolean optional",
"disabled": "boolean optional",
"roleValue": "string optional"
}| Field | Type | Description |
|---|---|---|
| data | string | — |
curl -X PUT 'https://pilot-root.1kosmos.net/users-mgmt/systemuser' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/systemuser", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/users-mgmt/systemuser",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
},
)
print(res.json()){
"data": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
}// no response body
// no response body
Update system user.
Update system user.
- Only a system and a service key can be used to update system user.
- Only systemuser user will be updated.
- roleValue, uid, username, password cannot be updated.
- Only provided attributes will be updated.
Parameters
uid (required)
The uid of system user.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
tenantId (optional)
This key sets the tenant id of a user.
type (optional)
This key sets the type of a user. The type key only accept these values ("systemuser", "basic").
status (optional)
This key sets the status of a user. The type key only accept these values ("active", "locked", "disabled").
firstname (optional)
This key sets the first name of a user.
middlename (optional)
This key sets the middle name of a user.
lastname (optional)
This key sets the last name of a user.
email1 (optional)
This key sets the first email of a user.
email1_verified (optional)
This key sets the verification status of the first email.
email2 (optional)
This key sets the second email of the user.
emaild_verified (optional)
This key sets the verification status of the second email.
phone1 (optional)
This key sets the phone number of a user.
phone1_verified (optional)
This key sets the verification status of the phone number.
address (optional object)
This key sets the address of the user.
address_verified (optional)
This key sets the verification status of the address.
disabled (optional)
This key sets disabled status of a user. The disabled key only accept these values (true, false).
roleValue (optional)
This key sets roleValue of the user
Returns
Returns the updated system user.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| uidrequired | string | UID of user. |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains below fields to update system user.
{
"tenantId": "string optional",
"type": "string optional - systemuser or basic",
"status": "string optional - active or locked or disabled",
"firstname": "string optional",
"middlename": "string optional",
"lastname": "string optional",
"email1": "string optional - valid email address",
"email1_verified": "boolean optional",
"email2": "string optional - valid email address",
"email2_verified": "boolean optional",
"phone1": "string optional - only digits",
"phone1_verified": "boolean optional",
"address": {
"house": "string optional",
"streetname": "string optional",
"city": "string optional",
"state": "string optional",
"country": "string optional",
"zip": "string optional"
},
"address_verified": "boolean optional",
"disabled": "boolean optional",
"roleValue": "none"
}| Field | Type | Description |
|---|---|---|
| tenantId | string | — |
| status | string | — |
| firstname | string | — |
| middlename | string | — |
| lastname | string | — |
| email1 | string | — |
| email1_verified | string | — |
| email2 | string | — |
| email2_verified | string | — |
| phone1 | string | — |
| phone1_verified | string | — |
| address | string | — |
| address_verified | string | — |
| disabled | string | — |
| roleValue | string | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/users-mgmt/systemuser/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"tenantId": "xxxxxxxxxx", "status": "xxxxxx", "firstname": "xxxxxxxx", "middlename": "xxxxxxxx", "lastname": "xxxxxxxx", "email1": "xxxxx@xxxxxxxx.xxx", "email1_verified": true, "email2": "xxxxx@xxxxxxxx.xxx", "email2_verified": true, "phone1": "xxxxxxxxxx", "phone1_verified": true, "address": {}, "address_verified": false, "disabled": false, "roleValue": "xxxxxx"}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/systemuser/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"tenantId": "xxxxxxxxxx",
"status": "xxxxxx",
"firstname": "xxxxxxxx",
"middlename": "xxxxxxxx",
"lastname": "xxxxxxxx",
"email1": "xxxxx@xxxxxxxx.xxx",
"email1_verified": true,
"email2": "xxxxx@xxxxxxxx.xxx",
"email2_verified": true,
"phone1": "xxxxxxxxxx",
"phone1_verified": true,
"address": {},
"address_verified": false,
"disabled": false,
"roleValue": "xxxxxx"
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/users-mgmt/systemuser/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"tenantId": "xxxxxxxxxx",
"status": "xxxxxx",
"firstname": "xxxxxxxx",
"middlename": "xxxxxxxx",
"lastname": "xxxxxxxx",
"email1": "xxxxx@xxxxxxxx.xxx",
"email1_verified": true,
"email2": "xxxxx@xxxxxxxx.xxx",
"email2_verified": true,
"phone1": "xxxxxxxxxx",
"phone1_verified": true,
"address": {},
"address_verified": false,
"disabled": false,
"roleValue": "xxxxxx"
},
)
print(res.json()){
"uid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tenantId": "xxxxxxxxxx",
"communityId": "xxxxxxxxxxxxxxxxxxxxxxxx",
"username": "xxxxxx",
"type": "xxxxx",
"roleValue": "xxxxx",
"status": "xxxxxx",
"firstname": "xxxxxxxx",
"middlename": "xxxxxxxx",
"lastname": "xxxxxxxx",
"email1": "xxxxx@xxxxxxxx.xxx",
"email1_verified": true,
"email2": "xxxxx@xxxxxxxx.xxx",
"email2_verified": true,
"phone1": "xxxxxxxxxx",
"phone1_verified": true,
"address": {},
"address_verified": false,
"disabled": false
}// no response body
// no response body
// no response body
Behavior Auth
Behavior Auth endpoints.
Fetch random phrase for behavior authentication
Fetch a random phrase for behavior authentication.
Authorization:
- System and infra_license_key callers do not require a JWT.
- All other license auth levels (service, app, app_ext, etc.) must include a valid JWT.
Encrypted payload:
Request body must contain a data field (encrypted string) and a decrypted preview:
{
"data": {
"jwt": "string (optional — required for non-system/non-infra license)",
"language": "string (optional — one of: en, es, pt, fr, de. Defaults to en if not provided)"
}
}
- If JWT is required, it must be verified and have "isAuthenticated: true".
- If language is not provided or unsupported, defaults to "en". Empty string is not accepted.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | — |
| communityIdrequired | string | — |
| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/behavior_auth/random_phrase/fetch' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"jwt": "string", "language": "en"}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/behavior_auth/random_phrase/fetch", {
method: "POST",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"jwt": "string",
"language": "en"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/behavior_auth/random_phrase/fetch",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"jwt": "string",
"language": "en"
}
},
)
print(res.json()){
"data": {
"phrase": "string",
"user_token": "string",
"language": "string"
},
"publicKey": "string"
}// no response body
// no response body
Register behavior authentication (phrase/pattern)
Register a phrase and typing pattern for a user.
Authorization:
- Requires system/service level key.
- If app/app_ext/service_ext key is used, request body must include a valid JWT.
Encrypted payload:
Request body must contain a data field (encrypted string) and a decrypted preview:
{
"authModule": "string (required)",
"username": "string (required)",
"phrase": "string (required)",
"pattern": "string (base64, required)",
"jwt": "string (required for app/app_ext/service_ext)",
"user_token": "string (required)",
"eventInfo": {
"clientIp": "string (optional)",
"userAgent": "string (optional)"
}
}
- JWT must be verified and have "isAuthenticated: true".
- Username in JWT must match username in request body.
- user_token must be valid (private decryption).
- If user already has a phrase registered, call fails (NOT_ALLOWED).
- If first attempt, user-token.attempts = 0.
- Calls Typing to delete and register pattern.
- If attempts === required attempts (from CaaS config), updates user props.
- If more attempts needed, bakes new user token.
- Returns next_step: done | try again, user_token: encrypted.
- Optional
eventInfoallows passing custom client IP and user agent for event logging.
- Emits E_BEHAVIOR_AUTH_ENROLLED event on success.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | — |
| communityIdrequired | string | — |
| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/behavior_auth/register' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"authModule": "string", "username": "string", "phrase": "string", "pattern": "string", "jwt": "string", "user_token": "string", "eventInfo": {"clientIp": "string", "userAgent": "string"}}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/behavior_auth/register", {
method: "POST",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"authModule": "string",
"username": "string",
"phrase": "string",
"pattern": "string",
"jwt": "string",
"user_token": "string",
"eventInfo": {
"clientIp": "string",
"userAgent": "string"
}
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/behavior_auth/register",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"authModule": "string",
"username": "string",
"phrase": "string",
"pattern": "string",
"jwt": "string",
"user_token": "string",
"eventInfo": {
"clientIp": "string",
"userAgent": "string"
}
}
},
)
print(res.json()){
"next_step": "done",
"user_token": "string"
}// no response body
// no response body
// no response body
Validate behavior authentication (typing pattern)
Validate a user's typing pattern for behavior authentication.
Authorization:
- Any valid community license key can be used.
Encrypted payload:
Request body must contain a data field (encrypted string) and a decrypted preview:
{
"authModule": "string (required)",
"username": "string (required)",
"pattern": "string (base64, required)",
"eventInfo": {
"clientIp": "string (optional)",
"userAgent": "string (optional)"
}
}
- Validates caller and user (must not be locked or disabled).
- Calls Typing to validate pattern using userId = SHA512(user.urn).
- On any validation failure, returns 401 Unauthorized.
- On success, returns same payload as user authenticate API, with JWT containing
"methods": ["behavior_auth"].
- Optional
eventInfoallows passing custom client IP and user agent for event logging.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | — |
| communityIdrequired | string | — |
| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/behavior_auth/validate' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"authModule": "string", "username": "string", "pattern": "string", "eventInfo": {"clientIp": "string", "userAgent": "string"}}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/behavior_auth/validate", {
method: "POST",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"authModule": "string",
"username": "string",
"pattern": "string",
"eventInfo": {
"clientIp": "string",
"userAgent": "string"
}
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/behavior_auth/validate",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"authModule": "string",
"username": "string",
"pattern": "string",
"eventInfo": {
"clientIp": "string",
"userAgent": "string"
}
}
},
)
print(res.json()){
"data": {
"jwt": "string",
"user": {},
"methods": [
"string"
]
},
"publicKey": "string"
}// no response body
// no response body
Deregister (unenroll) behavior authentication for a user
Deregisters (unenrolls) a user's behavior authentication (typing phrase/pattern).
Authorization:
- Requires system/service key for the community, OR
- A valid JWT in the request body (with
isAuthenticated: true) and service_ext/app/app_ext license key.
Encrypted payload:
Request body must contain a data field (encrypted string) and a decrypted preview:
{
"authModule": "string (required)",
"username": "string (required)",
"jwt": "string (required for app/app_ext license)",
"eventInfo": {
"clientIp": "string (optional)",
"userAgent": "string (optional)",
"initiatedBy": "string (optional, username of the initiator)"
}
}
- If JWT is required, it must be present, valid (via AuthN), and have
isAuthenticated: true.
- Optional
eventInfo.initiatedByspecifies the username who initiated the action (for event logging).
- Calls Typing to delete pattern using userId = SHA512(user.urn).
- If no phrase is registered, returns 204 No Content.
- If phrase is registered, deletes and returns 204 No Content.
- Optional
eventInfoallows passing custom client IP and user agent for event logging.
- Emits
E_BEHAVIOR_AUTH_UNENROLLEDevent with full context.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | — |
| communityIdrequired | string | — |
| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X DELETE 'https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/behavior_auth/deregister' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"authModule": "string", "username": "string", "jwt": "string", "eventInfo": {"clientIp": "string", "userAgent": "string", "initiatedBy": "string"}}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/behavior_auth/deregister", {
method: "DELETE",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"authModule": "string",
"username": "string",
"jwt": "string",
"eventInfo": {
"clientIp": "string",
"userAgent": "string",
"initiatedBy": "string"
}
}
})
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/behavior_auth/deregister",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"authModule": "string",
"username": "string",
"jwt": "string",
"eventInfo": {
"clientIp": "string",
"userAgent": "string",
"initiatedBy": "string"
}
}
},
)
print(res.json())// no response body
// no response body
// no response body
Broker Connection
Broker Connection endpoints.
Fetch Broker Connections by CommunityId and AuthModuleId
Fetch Broker Connections by CommunityId and AuthModuleId
- License Key must be authorized for community.
- Only a system and service key can be used to fetch brokerConnection of communityId and authModuleId.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Returns
Returns all broker connections of community and authModule.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| moduleIdrequired | string | ID of auth module |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/broker/fetch' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/broker/fetch", {
method: "GET",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/broker/fetch",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())[
{
"_id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"uid": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "xxxxxx",
"communityId": "xxxxxxxxxxxxxxxxxxxxxxxx",
"authModuleId": "xxxxxxxxxxxxxxxxxxxxxxxx",
"enabled": true,
"authorized": true,
"connected": true,
"version": "xxxxx",
"connectedAt": "xxxx-xx-xxTxx:xx:xx.xxxx",
"lastPingAt": "xxxx-xx-xxTxx:xx:xx.xxxx",
"lastDisconnectedAt": "xxxx-xx-xxTxx:xx:xx.xxxx",
"lastNotificationSentAt": "xxxx-xx-xxTxx:xx:xx.xxxx",
"ip": "xxxxx",
"port": "xxxxx"
}
]// no response body
// no response body
enable/disable broker by the community & auth module & uid
enable/disable broker by the community & auth module & uid.
- Key must be authorized for community.
- Only a system and service key can be used to enable/disable broker by the community & auth module & uid.
- Broker with requested uid must be for requested community/authModule.
- Only Authorized brokers (authorized = true) can be enabled.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
uuid (required)
UUID of broker connection.
enabled (required)
This key sets the enable status of broker connection.
Returns
Returns the updated broker connection.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| moduleIdrequired | string | ID of auth module |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Broker connection status to update.
{
"uid": "required"
"enabled": "boolean, true or false"
}| Field | Type | Description |
|---|---|---|
| uid | string | — |
| enabled | boolean | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/broker/changestatus' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"uid": "xxxxxxxxxxxxxxxxxxxxxxxx", "enabled": true}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/broker/changestatus", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"uid": "xxxxxxxxxxxxxxxxxxxxxxxx",
"enabled": true
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/broker/changestatus",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"uid": "xxxxxxxxxxxxxxxxxxxxxxxx",
"enabled": true
},
)
print(res.json()){
"_id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"uid": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "xxxxxx",
"communityId": "xxxxxxxxxxxxxxxxxxxxxxxx",
"authModuleId": "xxxxxxxxxxxxxxxxxxxxxxxx",
"enabled": true,
"authorized": true,
"connected": true,
"version": "xxxxx",
"connectedAt": "xxxx-xx-xxTxx:xx:xx.xxxx",
"lastPingAt": "xxxx-xx-xxTxx:xx:xx.xxxx",
"lastDisconnectedAt": "xxxx-xx-xxTxx:xx:xx.xxxx",
"lastNotificationSentAt": "xxxx-xx-xxTxx:xx:xx.xxxx",
"ip": "xxxxx",
"port": "xxxxx"
}// no response body
// no response body
// no response body
// no response body
Update broker connection name.
Update broker connection name.
- Key must be authorized for community.
- Only a system and service key can be used to enable/disable broker by the community & auth module & uid.
- Broker with requested uid must be for requested community/authModule.
- Only broker name can be edited via this API.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
uuid (required)
UUID of broker connection.
name (required)
Name of broker connection.
Returns
Returns the updated broker connection.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| moduleIdrequired | string | ID of auth module |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Broker connection name to update.
{
"uid": "required",
"name": "string required"
}| Field | Type | Description |
|---|---|---|
| uid | string | — |
| name | string | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/broker/update' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"uid": "xxxxxxxxxxxxxxxxxxxxxxxx", "name": "xxxxxx"}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/broker/update", {
method: "PATCH",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"uid": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "xxxxxx"
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/broker/update",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"uid": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "xxxxxx"
},
)
print(res.json()){
"_id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"uid": "xxxxxxxxxxxxxxxxxxxxxxxx",
"name": "xxxxxx",
"communityId": "xxxxxxxxxxxxxxxxxxxxxxxx",
"authModuleId": "xxxxxxxxxxxxxxxxxxxxxxxx",
"enabled": true,
"authorized": true,
"connected": true,
"version": "xxxxx",
"connectedAt": "xxxx-xx-xxTxx:xx:xx.xxxx",
"lastPingAt": "xxxx-xx-xxTxx:xx:xx.xxxx",
"lastDisconnectedAt": "xxxx-xx-xxTxx:xx:xx.xxxx",
"lastNotificationSentAt": "xxxx-xx-xxTxx:xx:xx.xxxx",
"ip": "xxxxx",
"port": "xxxx"
}// no response body
// no response body
// no response body
// no response body
Delete broker connection by communityId and authModuleId and uid of broker.
Delete broker connection by communityId and authModuleId and uid of broker.
- License Key must be authorized for community.
- Only a system and service key can be used to delete brokerConnection of communityId and authModuleId and uid of broker.
- Broker with requested uid must be for requested community/authModule.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Returns
No content.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| moduleIdrequired | string | ID of auth module |
| uidrequired | string | UID of broker connection |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
curl -X DELETE 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/broker/xxxxxxxxxxxxxxxxxxxxxxxx' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/broker/xxxxxxxxxxxxxxxxxxxxxxxx", {
method: "DELETE",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/module/xxxxxxxxxxxxxxxxxxxxxxxx/broker/xxxxxxxxxxxxxxxxxxxxxxxx",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())// no response body
// no response body
// no response body
// no response body
Account Lockout
Lockout policy & state.
get user status.
get user status.
- Only a system, service and service_ext key can be used to fetch a user status.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
username (required)
username.
Returns
Returns get user statuses response.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains below fields to lock user.
{
"username": "string required"
}| Field | Type | Description |
|---|---|---|
| username | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/status' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"username": "xxxxxx"}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/status", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"username": "xxxxxx"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/status",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"username": "xxxxxx"
},
)
print(res.json())"string"
// no response body
// no response body
// no response body
lock a user.
lock a user.
- Only a system, service and service_ext key can be used to lock a user.
- lock reason can be ['Admin Action'].
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
username (required)
username.
reason (required)
reasonCode: 0 and message: ['Admin Action'].
initiatedby (required)
initiatedby: [system]
Returns
Returns empty response.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains below fields to lock user.
{
"username": "string required",
"reason": {
"reasonCode": number required, // 0 - Admin Action
"message": "string required" // ['Admin Action']
},
initiatedby: "string required"
}| Field | Type | Description |
|---|---|---|
| username | string | — |
| reason | object | — |
| initiatedby | string | — |
curl -X PUT 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/lock' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"username": "xxxxxx", "reason": {"reasonCode": 0, "message": "Admin Action"}, "initiatedby": "xxxxxxxx"}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/lock", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"username": "xxxxxx",
"reason": {
"reasonCode": 0,
"message": "Admin Action"
},
"initiatedby": "xxxxxxxx"
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/lock",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"username": "xxxxxx",
"reason": {
"reasonCode": 0,
"message": "Admin Action"
},
"initiatedby": "xxxxxxxx"
},
)
print(res.json())// no response body
// no response body
// no response body
// no response body
unlock a user.
unlock a user.
- Only a system, service and service_ext key can be used to unlock a user.
- lock reason can be ['Admin Action'].
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
username (required)
username.
reason (required)
reasonCode: 0/1 and message: ['Admin Action'].
initiatedby (required)
initiatedby: [system]
Returns
Returns empty response.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains below fields to lock user.
{
"username": "string required",
"reason": {
"reasonCode": number required, // 0 - Admin Action
"message": "string required" // ['Admin Action']
},
initiatedby: "string required"
}| Field | Type | Description |
|---|---|---|
| username | string | — |
| reason | object | — |
| initiatedby | string | — |
curl -X PUT 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/unlock' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"username": "xxxxxx", "reason": {"reasonCode": 0, "message": "Admin Action"}, "initiatedby": "xxxxxxxx"}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/unlock", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"username": "xxxxxx",
"reason": {
"reasonCode": 0,
"message": "Admin Action"
},
"initiatedby": "xxxxxxxx"
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/unlock",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"username": "xxxxxx",
"reason": {
"reasonCode": 0,
"message": "Admin Action"
},
"initiatedby": "xxxxxxxx"
},
)
print(res.json())// no response body
// no response body
// no response body
// no response body
Account Lockout V 2
Account Lockout V 2 endpoints.
get user account status.
get user status.
- Only a system and service key can be used to fetch a user status.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
userId (required)
userId.
Returns
Returns get user statuses response.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains below fields to lock user.
{
"userId": "string required"
}| Field | Type | Description |
|---|---|---|
| userId | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/v2/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/lock/status' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"userId": "xxxxxx"}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/v2/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/lock/status", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"userId": "xxxxxx"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/v2/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/lock/status",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"userId": "xxxxxx"
},
)
print(res.json()){
"_id": "xxxxxxxxx",
"tenantId": "xxxxxxxx",
"communityId": "xxxxxxxxx",
"userId": "xxxxxx",
"message": "Admin Action",
"lockedBy": "xxxxxxxx",
"locked": "true,",
"lockedAt": "xxxxxxxxxxx",
"expiresDate": "xxxxxxxxxxx",
"updatedAt": "xxxxxxxxxxx"
}// no response body
// no response body
// no response body
lock a user account.
lock a user account.
- Only a system and service key can be used to lock a user.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
userId (required)
userId.
message (optinal)
message: 'Admin Action'.
initiatedby (required)
initiatedby: [Admin userId]
expiryInMunites (optional)
expiryInMunites: Auto expiry time // expiryInMunites must be greater than current time. If Admin dont want to set auto expiry time then pass 0
Returns
Returns success message response.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains below fields to lock user.
{
"userId": "string required",
"message": "string optinal", // ['Admin Action']
"initiatedby": "string required",
"expiryInMunites": 60
}| Field | Type | Description |
|---|---|---|
| userId | string | — |
| message | string | — |
| initiatedby | string | — |
| expiryInMunites | string | — |
curl -X PUT 'https://pilot-root.1kosmos.net/users-mgmt/v2/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/lock' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"userId": "xxxxxx", "message": "Admin Action", "initiatedby": "xxxxxxxx", "expiryInMunites": 30}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/v2/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/lock", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"userId": "xxxxxx",
"message": "Admin Action",
"initiatedby": "xxxxxxxx",
"expiryInMunites": 30
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/users-mgmt/v2/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/lock",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"userId": "xxxxxx",
"message": "Admin Action",
"initiatedby": "xxxxxxxx",
"expiryInMunites": 30
},
)
print(res.json()){
"message": "xxxxxxxxxxx"
}// no response body
// no response body
// no response body
unlock a user account.
unlock a user.
- Only a system and service key can be used to unlock a user.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
userId (required)
userId.
message (optinal)
message: 'Admin Action'.
initiatedby (required)
initiatedby: [system]
Returns
Returns success response.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains below fields to lock user.
{
"userId": "string required",
"message": "string optinal" // ['Admin Action']
"initiatedby": "string required"
}| Field | Type | Description |
|---|---|---|
| userId | string | — |
| message | string | — |
| initiatedby | string | — |
curl -X PUT 'https://pilot-root.1kosmos.net/users-mgmt/v2/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/unlock' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"userId": "xxxxxx", "message": "Admin Action", "initiatedby": "xxxxxxxx"}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/v2/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/unlock", {
method: "PUT",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"userId": "xxxxxx",
"message": "Admin Action",
"initiatedby": "xxxxxxxx"
})
});
const data = await res.json();import requests
res = requests.put(
"https://pilot-root.1kosmos.net/users-mgmt/v2/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user/unlock",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"userId": "xxxxxx",
"message": "Admin Action",
"initiatedby": "xxxxxxxx"
},
)
print(res.json()){
"message": "xxxxxxxxxxx"
}// no response body
// no response body
// no response body
User PIN
User PIN endpoints.
Register User PIN
Register a new PIN for a user.
- Only a system, service, service_ext, app, app_ext, or basic key can be used.
- system, service, and service_ext keys can register PIN without JWT.
- For app/app_ext/basic keys, a valid JWT is required.
- PIN is stored as SHA512 hash.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unencrypted data as well, it is only a preview available in Swagger.
{
"data": {
"user": {
"username": "string (required)",
"authModule": "string (required)"
},
"pin": "string (required)",
"jwt": "string (optional, required for app/app_ext/basic)"
}
}| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | — |
| communityIdrequired | string | — |
| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/user_pin/register' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"user": {"username": "string", "authModule": "string"}, "pin": "string", "jwt": "string"}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/user_pin/register", {
method: "POST",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"user": {
"username": "string",
"authModule": "string"
},
"pin": "string",
"jwt": "string"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/user_pin/register",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"user": {
"username": "string",
"authModule": "string"
},
"pin": "string",
"jwt": "string"
}
},
)
print(res.json()){
"status": true
}// no response body
// no response body
// no response body
Update User PIN
Update a user's PIN.
- system, service, or service_ext keys can update PIN without further checks.
- For all other key types, one of the following is required:
• A valid JWT (must be present and pass verification)
• OR the correct currentPin (must match the user's existing PIN)
- PIN is stored as SHA512 hash.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unencrypted data as well, it is only a preview available in Swagger.
{
"data": {
"user": {
"username": "string (required)",
"authModule": "string (required)"
},
"currentPin": "string (optional, required if no JWT)",
"newPin": "string (required)",
"jwt": "string (optional, required for app/app_ext/basic)"
}
}| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | — |
| communityIdrequired | string | — |
| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X PATCH 'https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/user_pin/update' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"user": {"username": "string", "authModule": "string"}, "currentPin": "string", "newPin": "string", "jwt": "string"}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/user_pin/update", {
method: "PATCH",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"user": {
"username": "string",
"authModule": "string"
},
"currentPin": "string",
"newPin": "string",
"jwt": "string"
}
})
});
const data = await res.json();import requests
res = requests.patch(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/user_pin/update",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"user": {
"username": "string",
"authModule": "string"
},
"currentPin": "string",
"newPin": "string",
"jwt": "string"
}
},
)
print(res.json()){
"status": true
}// no response body
// no response body
// no response body
Delete User PIN
Delete (unenroll) a user's PIN.
- system, service, or service_ext keys can delete PIN without further checks.
- For all other key types, one of the following is required:
• A valid JWT (must be present and pass verification)
• OR the correct currentPin (must match the user's existing PIN)
- Emits E_USER_PIN_UNENROLLED event.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
Request body contains 'data' field with encrypted object below:
{
"data": {
"user": {
"username": "string (required)",
"authModule": "string (required)"
},
"currentPin": "string (optional, required if no JWT)",
"jwt": "string (optional, required for app/app_ext/basic)",
"eventInfo": {
"clientIp": "string (optional)",
"userAgent": "string (optional)",
"initiatedBy": "string (optional, username of the initiator)"
}
}
}
- Optional
eventInfoallows passing client IP, user agent, and initiator username for event logging.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | — |
| communityIdrequired | string | — |
| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X DELETE 'https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/user_pin' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"user": {"username": "string", "authModule": "string"}, "currentPin": "string", "jwt": "string", "eventInfo": {"clientIp": "string", "userAgent": "string", "initiatedBy": "string"}}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/user_pin", {
method: "DELETE",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"user": {
"username": "string",
"authModule": "string"
},
"currentPin": "string",
"jwt": "string",
"eventInfo": {
"clientIp": "string",
"userAgent": "string",
"initiatedBy": "string"
}
}
})
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/user_pin",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"user": {
"username": "string",
"authModule": "string"
},
"currentPin": "string",
"jwt": "string",
"eventInfo": {
"clientIp": "string",
"userAgent": "string",
"initiatedBy": "string"
}
}
},
)
print(res.json())// no response body
// no response body
// no response body
// no response body
Passkey Management
Manage user passkeys.
Get passkey credential for a user.
Fetch passkey credential for a given user.
- Only permit system, service, or service_ext key to fetch a passkey without JWT.
- For all other key types (app, app_ext, basic), a valid JWT is required.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA
publickey (required)
Public key
Request Body
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unencrypted data as well, it is only a preview available in Swagger.
userName (required)
Username (email)
Returns
Returns the passkey credential matching the request.
This API throws an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/passkey' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"userName": "string"}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/passkey", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"userName": "string"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/passkey",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"userName": "string"
}
},
)
print(res.json()){
"success": true,
"credential": {
"id": "string",
"privateKey": {},
"rpId": "string",
"userHandle": "string",
"userName": "string",
"userDisplayName": "string",
"signCount": 0
}
}// no response body
// no response body
// no response body
Register a passkey credential for a user.
Register a passkey credential for a given user.
- Only permit system, service, or service_ext key to register a passkey without JWT.
- For all other key types (app, app_ext, basic), a valid JWT is required.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA
publickey (required)
Public key
Request Body
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unencrypted data as well, it is only a preview available in Swagger.
credentialId (required)
Credential ID string
privateKey (required)
Private key object containing JWK
rpId (required)
Relying party ID
userId (required)
User handle / identifier
userName (required)
Username (email)
userDisplayName (optional)
Display name
entraAuthMethodId (optional)
Entra auth method ID
createdAt (optional)
Creation timestamp
Returns
Returns success status and credentialId.
This API throws an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unencrypted data as well, it is only a preview available in Swagger.
{
"data": {
"credentialId": "string required, credential ID",
"privateKey": {
"jwk": {
"kty": "EC",
"crv": "P-256",
"key_ops": ["sign"],
"ext": true,
"d": "string",
"x": "string",
"y": "string"
},
"algorithm": "ES256",
"curve": "P-256"
},
"rpId": "string required, relying party ID",
"userId": "string required, user handle / identifier",
"userName": "string required, username (email)",
"userDisplayName": "string optional, display name",
"entraAuthMethodId": "string optional, Entra auth method ID",
"createdAt": "string optional, ISO 8601 timestamp"
}
}| Field | Type | Description |
|---|---|---|
| datarequired | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/passkey/register' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"credentialId": "string", "privateKey": {"jwk": {"kty": "string", "crv": "string", "key_ops": ["string"], "ext": true, "d": "string", "x": "string", "y": "string"}, "algorithm": "string", "curve": "string"}, "rpId": "string", "userId": "string", "userName": "string", "userDisplayName": "string", "entraAuthMethodId": "string", "createdAt": "string"}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/passkey/register", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"credentialId": "string",
"privateKey": {
"jwk": {
"kty": "string",
"crv": "string",
"key_ops": [
"string"
],
"ext": true,
"d": "string",
"x": "string",
"y": "string"
},
"algorithm": "string",
"curve": "string"
},
"rpId": "string",
"userId": "string",
"userName": "string",
"userDisplayName": "string",
"entraAuthMethodId": "string",
"createdAt": "string"
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/passkey/register",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"credentialId": "string",
"privateKey": {
"jwk": {
"kty": "string",
"crv": "string",
"key_ops": [
"string"
],
"ext": true,
"d": "string",
"x": "string",
"y": "string"
},
"algorithm": "string",
"curve": "string"
},
"rpId": "string",
"userId": "string",
"userName": "string",
"userDisplayName": "string",
"entraAuthMethodId": "string",
"createdAt": "string"
}
},
)
print(res.json()){
"success": true,
"credentialId": "string"
}// no response body
// no response body
// no response body
Service Key
Service Key endpoints.
Get service keys
This endpoint returns available service keys. The license you are using must be of authLevel 'system'
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Returns
Returns array with service keys
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
curl -X GET 'https://pilot-root.1kosmos.net/users-mgmt/servicekeys' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/servicekeys", {
method: "GET",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"licensekey": "YOUR_LICENSE_KEY",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/users-mgmt/servicekeys",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"licensekey": "YOUR_LICENSE_KEY",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())[
{
"tag": "xxxxx",
"keyId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
"keySecret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
"type": "xxxxx"
}
]// no response body
// no response body
// no response body
Reset Service Key
This endpoint resets service key for given keyId. Deletes current one and recreates a new one. The license you are using must be of authLevel 'system'
Parameters
keyId (required)
The keyId of service key to reset
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Returns
Returns re-created service key
| Name | Type | Description |
|---|---|---|
| keyIdrequired | string | keyId of service key to reset |
| Name | Type | Description |
|---|---|---|
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
curl -X DELETE 'https://pilot-root.1kosmos.net/users-mgmt/servicekey/<keyId>' \ -H 'requestid: <ecdsa-requestid>' \ -H 'publickey: <public-key>' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/servicekey/<keyId>", {
method: "DELETE",
headers: {
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"licensekey": "YOUR_LICENSE_KEY",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/users-mgmt/servicekey/<keyId>",
headers={
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"licensekey": "YOUR_LICENSE_KEY",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())[
{
"tag": "xxxxx",
"keyId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
"keySecret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx",
"type": "xxxxx"
}
]// no response body
// no response body
// no response body
EAM
EAM endpoints.
Fetch user by Azure AD OID
Resolves a user by their Azure AD object ID (oid) and tenant ID (tid). Searches AzureAD auth modules where config.tenantId matches the provided tid. Returns the mapped user object or 404 if not found. Requires ECDSA service-to-service authentication and a valid SERVICE or SYSTEM license.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | — |
| communityIdrequired | string | — |
| Field | Type | Description |
|---|---|---|
| oidrequired | string | Azure AD object ID |
| tidrequired | string | Azure AD tenant ID |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/fetch_by_oid' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"oid": "string", "tid": "string"}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/fetch_by_oid", {
method: "POST",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"oid": "string",
"tid": "string"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/<tenantId>/community/<communityId>/user/fetch_by_oid",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"oid": "string",
"tid": "string"
},
)
print(res.json())// no response body
// no response body
// no response body
ECDSA Helper
ECDSA Helper endpoints.
Encrypt and decrypt the data string by public key and private key.
Encrypt and decrypt the data string by public key and private key.
Parameters
method (optional)
The method parameter is type of enum. Default value is encrypt.
This parameter only accepts following values
encrypt, decrypt
Request Body
dataStr (required)
The dataStr key is type of string.
publicKey (required)
The publicKey is type of string.
privateKey (required)
The privateKey is type of string.
Returns
Returns the encrypted/decrypted string.
This API throw an error if something goes wrong. A common source of error is public or private key is not valid.
| Name | Type | Description |
|---|---|---|
| method | string | — |
| Field | Type | Description |
|---|---|---|
| dataStr | string | — |
| publicKey | string | — |
| privateKey | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/ecdsa_helper/<method>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"dataStr": "Hey, This is example data string.", "publicKey": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx=", "privateKey": "xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/ecdsa_helper/<method>", {
method: "POST",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"dataStr": "Hey, This is example data string.",
"publicKey": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx=",
"privateKey": "xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/ecdsa_helper/<method>",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"dataStr": "Hey, This is example data string.",
"publicKey": "xxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx=",
"privateKey": "xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxx="
},
)
print(res.json()){
"data": "xxxxxxxxxxxxxxxxxxxx"
}Environment
Environment endpoints.
/environment
Provide details regarding the environments.
Returns
Returns an environment object
curl -X GET 'https://pilot-root.1kosmos.net/users-mgmt/environment' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/environment", {
method: "GET",
headers: {
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/users-mgmt/environment",
headers={
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json())// no response body
Factor
Factor endpoints.
Delete FactorLock and FactorMistakes by communityId, tenantId, factor and userId.
Delete FactorLock and FactorMistakes by communityId and tenantId, factor and userId.
- License Key must be authorized for community.
- Only a system and service key can be used to delete user factor of communityId,tenantId.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
userId (required)
userId of user.
factor (required)
Name of the factor
authModuleId (required)
moduleId
Returns
No content.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains below fields to delete user factor.
{
"userId": "string required",
"factor": "string required",
"authModuleId" : "string required",
"eventData": "object optional"
}| Field | Type | Description |
|---|---|---|
| userId | string | — |
| factor | string | — |
| authModuleId | string | — |
| eventData | object | — |
curl -X DELETE 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/factor_lock' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"userId": "xxxxxxxxxx", "factor": "xxxxxx", "authModuleId": "xxxxxxx", "eventData": {}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/factor_lock", {
method: "DELETE",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"userId": "xxxxxxxxxx",
"factor": "xxxxxx",
"authModuleId": "xxxxxxx",
"eventData": {}
})
});
const data = await res.json();import requests
res = requests.delete(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/factor_lock",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"userId": "xxxxxxxxxx",
"factor": "xxxxxx",
"authModuleId": "xxxxxxx",
"eventData": {}
},
)
print(res.json())// no response body
// no response body
// no response body
// no response body
Healthz
Healthz endpoints.
Get healthz.
Get health information
| Name | Type | Description |
|---|---|---|
| synthetic-heartbeat | string | If this field is set then additional health information is collection (will not be displayed). Valid values are all, onUserCreated, userStateEvents |
| licensekey | string | plain text license key; |
curl -X GET 'https://pilot-root.1kosmos.net/users-mgmt/healthz' \ -H 'synthetic-heartbeat: <value>' \ -H 'licensekey: YOUR_LICENSE_KEY' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/healthz", {
method: "GET",
headers: {
"synthetic-heartbeat": "<value>",
"licensekey": "YOUR_LICENSE_KEY",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/users-mgmt/healthz",
headers={
"synthetic-heartbeat": "<value>",
"licensekey": "YOUR_LICENSE_KEY",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"status": "all services operational",
"publicKey": "//same as <service>/publickeys endpoint",
"code": "200",
"version": "xxxx.xxxx.xxxx"
}Infra
Infra endpoints.
Check broker connection status and send email.
Check broker connection status and send email.
- Only a INFRA_LICENSE_KEY can be used.
Headers
licensekey (required)
Unencrypted infra key
Returns
204 No Content
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | Infra key |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/infra/checkBrokerStatusAndSendNotifications' \ -H 'licensekey: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/infra/checkBrokerStatusAndSendNotifications", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/infra/checkBrokerStatusAndSendNotifications",
headers={
"licensekey": "YOUR_LICENSE_KEY"
}
)
print(res.json())// no response body
// no response body
Internal Broker Call
Internal Broker Call endpoints.
Make a broker request via socket
This endpoint only called internally from the one pod to another pod.
Returns
Return a response from broker.
| Field | Type | Description |
|---|---|---|
| communityId | string | — |
| authModule | object | — |
| dataPayload | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/internal_call/broker_request' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"communityId": "string", "authModule": {}, "dataPayload": {}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/internal_call/broker_request", {
method: "POST",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"communityId": "string",
"authModule": {},
"dataPayload": {}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/internal_call/broker_request",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"communityId": "string",
"authModule": {},
"dataPayload": {}
},
)
print(res.json())[
{
"metadata": {},
"operationstatus": {},
"totalRecords": null
},
{
"cn": "string",
"samaccountname": "string",
"sn": "string"
}
]JWT
JWT endpoints.
/jwt/verifyToken
Verify JWT token.
Request Body
token (required)
token : string
Returns
Returns a decoded token value.
| Field | Type | Description |
|---|---|---|
| token | string | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/jwt/verifyToken' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"token": "xxxx"}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/jwt/verifyToken", {
method: "POST",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"token": "xxxx"
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/jwt/verifyToken",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"token": "xxxx"
},
)
print(res.json()){}// no response body
Public Key
Public Key endpoints.
Get system's public key.
Get system's public key.
Returns
Returns a public key object
curl -X GET 'https://pilot-root.1kosmos.net/users-mgmt/publickeys' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/publickeys", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/users-mgmt/publickeys",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"publicKey": ""
}// no response body
Service Directory
Service Directory endpoints.
Get all service directories.
Get all service directories.
Returns
Returns all service directories.
curl -X GET 'https://pilot-root.1kosmos.net/users-mgmt/sd' \ -H 'keyId: YOUR_KEY_ID' \ -H 'keySecret: YOUR_KEY_SECRET' \ -H 'license: YOUR_LICENSE_KEY'
const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/sd", {
method: "GET",
headers: {
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
});
const data = await res.json();import requests
res = requests.get(
"https://pilot-root.1kosmos.net/users-mgmt/sd",
headers={
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
}
)
print(res.json()){
"name1": "https://xxx.xxxxxx.xxx/xxxxx",
"name2": "https://xxx.xxxxxx.xxx/xxxxx",
"name3": "https://xxx.xxxxxx.xxx/xxxxx"
}User Properties
User Properties endpoints.
update user properties.
update user properties.
- Only a system, service and service_ext valid with community key can be used to update a user properties.
Headers
licensekey (required)
License key encrypted with ECDSA
requestid (required)
JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now
publickey (required)
Public key
Request Body
data (required)
user properties data encrypted with ECDSA.
Returns
Returns the ECDSA encrypted updated user properties.
This API throw an error if something goes wrong.
| Name | Type | Description |
|---|---|---|
| tenantIdrequired | string | ID of tenant |
| communityIdrequired | string | ID of community |
| Name | Type | Description |
|---|---|---|
| licensekeyrequired | string | License key encrypted with ECDSA / Try Authorize 🔒 |
| requestidrequired | string | JSON string encrypted with ECDSA which should contain "appid" (string), "uuid" (string) and "ts" (number) representing epoch timestamp in seconds - it shouldn't be more or less than 'environment.allowed_time_span' seconds from now / Try Authorize 🔒 |
| publickeyrequired | string | Public Key / Try Authorize 🔒 |
Request body contains 'data' field with encrypted object below:
IMPORTANT - you can send unencrypted data and you will get unecrypted data as well, it is only a preview available in Swagger.
{
"data": {
"user": {
"username": "",
"uid": "",
"authModuleId": ""
},
"mobiles": [],
"landlines": [],
"aliases": {
"alias1": "string",
"alias2": null,
"alias3": "string",
"alias4": "string",
"alias5": null,
"alias6": null,
"alias7": null,
"alias8": null
}
}
}| Field | Type | Description |
|---|---|---|
| data | object | — |
curl -X POST 'https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user_properties/update' \
-H 'licensekey: YOUR_LICENSE_KEY' \
-H 'requestid: <ecdsa-requestid>' \
-H 'publickey: <public-key>' \
-H 'keyId: YOUR_KEY_ID' \
-H 'keySecret: YOUR_KEY_SECRET' \
-H 'license: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": {"user": {"username": "", "uid": "", "authModuleId": ""}, "mobiles": [], "landlines": [], "aliases": {"alias1": "string", "alias2": null, "alias3": "string", "alias4": "string", "alias5": null, "alias6": null, "alias7": null, "alias8": null}}}'const res = await fetch("https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user_properties/update", {
method: "POST",
headers: {
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"data": {
"user": {
"username": "",
"uid": "",
"authModuleId": ""
},
"mobiles": [],
"landlines": [],
"aliases": {
"alias1": "string",
"alias2": null,
"alias3": "string",
"alias4": "string",
"alias5": null,
"alias6": null,
"alias7": null,
"alias8": null
}
}
})
});
const data = await res.json();import requests
res = requests.post(
"https://pilot-root.1kosmos.net/users-mgmt/tenant/xxxxxxxxxx/community/xxxxxxxxxxxxxxxxxxxxxxxx/user_properties/update",
headers={
"licensekey": "YOUR_LICENSE_KEY",
"requestid": "<ecdsa-requestid>",
"publickey": "<public-key>",
"keyId": "YOUR_KEY_ID",
"keySecret": "YOUR_KEY_SECRET",
"license": "YOUR_LICENSE_KEY"
},
json={
"data": {
"user": {
"username": "",
"uid": "",
"authModuleId": ""
},
"mobiles": [],
"landlines": [],
"aliases": {
"alias1": "string",
"alias2": null,
"alias3": "string",
"alias4": "string",
"alias5": null,
"alias6": null,
"alias7": null,
"alias8": null
}
}
},
)
print(res.json()){
"_id": "",
"tenantId": "",
"communityId": "",
"user": {
"uid": "",
"username": "",
"authModuleId": ""
},
"mobiles": [],
"landlines": [],
"aliases": {
"alias1": "string",
"alias2": null,
"alias3": "string",
"alias4": "string",
"alias5": null,
"alias6": null,
"alias7": null,
"alias8": null
}
}// no response body
// no response body
// no response body