Reportsv2.1pilot-root.1kosmos.net/reportsOpenAPI
1Kosmos · Reporting

Reports API

Pull tenant transaction reports and downloadable exports.

The Reports service exposes tenant reporting and exports — pull transaction reports per tenant and download datasets for analytics and compliance.

27 endpoints

across 9 resource groups.

ECDSA-signed

every request is signed with your key pair.

JSON over HTTPS

predictable REST, conventional status codes.

Reference

Base URL

All Reports 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.

Pilot https://pilot-root.1kosmos.net/reports

Content type

Requests and responses use application/json.

GEThttps://pilot-root.1kosmos.net/reports/healthz
curl -X GET 'https://pilot-root.1kosmos.net/reports/healthz' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY'
Security

Authentication

Reports 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.

Credentials
authMyPublicKeyCaller's ECDSA publicKeyheader
authMyPrivateKeyCaller's ECDSA privateKeyheader
authLicenseLicense key from License APIheader
GEThttps://pilot-root.1kosmos.net/reports/healthz
cURL
Node.js
Python
curl -X GET 'https://pilot-root.1kosmos.net/reports/healthz' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY'
Reference

Errors

Reports uses conventional HTTP status codes: 2xx success, 4xx a problem with the request, 5xx a service-side error.

StatusMeaningDescription
200 / 204OKThe request succeeded.
400Bad RequestValidation failed.
401UnauthorizedMissing or invalid credentials.
403ForbiddenAuthenticated, but not permitted.
404Not FoundThe resource does not exist.
500Server ErrorSomething went wrong on our side.
4XXerror response
{
  "statusCode": 400,
  "error": "Bad Request",
  "message": "Validation error"
}
Reports

Tenant

Per-tenant reports.

POST/tenant/{tenantId}/community/{communityId}/application_usage_report

Application Usage report

This report searches in DB index formed from tenantId and communityId (index: tenantId.communityId) and collects all unique users with serviceProvider (unique tuples) where eventName = E_LOGIN_ATTEMPT and each record has latest_login and last_login (latest_login - 1, this can be null because there can be only 1 login attemp). Each tuple serviceProvider | user_id should get 1 row with number of person_id in it - person_id_count. Results are chronological, sorted by latest_login. Results are also in specified time range (from, to) and are paginated (pSize, pIndex).

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

pSize (optional)

The maximum number of hits to return default = 25, min = 1, max = 100

pIndex (optional)

Number of hits to skip default = 0

from (optional)

timestamp, default = current date - 30 days, max = current date - 90 days

to (optional)

timestamp, default = current

serviceProvider (optional)

string, optional filter

user_id (optional)

User id, string , optional filter

person_id (optional)

Person id, string, optional filter

Returns

Returns object with page info and data

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize 🔒
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize 🔒
publickeyrequiredstringPublic Key / Try Authorize 🔒
Request body

Data to filter elastic raws

FieldTypeDescription
pSizeNumberA limit on the number of objects to be returned. Default is 25
pIndexNumberThe pIndex key is a cursor for the pagination.
fromstringDate from which to start the search
tostringdate to end the search
serviceProviderstringoptional filter
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/application_usage_report
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/application_usage_report' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"pSize": 10, "pIndex": 0, "from": "2021-02-01 00:00:00.000", "to": "2021-04-01 00:00:00.000", "serviceProvider": "string"}'
RESPONSE
200
404
// no response body
POST/tenant/{tenantId}/community/{communityId}/audit_log

Audit Log Report

This report searches in DB and collects all events (unique tuples) where eventCategory = 'AUDIT_LOG'. Results are in reverse chronological order, by latest event_ts. Results are also in specified time range (from, to) and are paginated (pSize, pIndex).

AUDIT_LOG events

<b>E_DIRECTORY_ADDED, E_DIRECTORY_MODIFIED, E_DIRECTORY_REMOVED, E_DIRECTORY_BROKER_ENABLED, E_DIRECTORY_BROKER_DISABLED, E_DIRECTORY_BROKER_DELETED, E_DIRECTORY_BROKER_MODIFIED, E_DIRECTORY_ATTRIBUTE_ADDED, E_DIRECTORY_ATTRIBUTE_MODIFIED, E_DIRECTORY_ATTRIBUTE_DELETED, E_DIRECTORY_ADVANCED_CONFIGURATION_MODIFIED, E_IDP_CONFIGURATION_MODIFIED</b>

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

pSize (optional)

The maximum number of hits to return default = 25, min = 1, max = 100

pIndex (optional)

Number of hits to skip default = 0

from (optional)

timestamp, default = now - 24 hours, max = current date - 90 days

to (optional)

timestamp, default = now

user_id (optional)

User id, string, optional filter

Returns

Returns object with page info and data

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Data to filter raws.

This report is downloadable. To request download, please add to request body below full object |

     "download": {
        "requestBy": "string, email (required)",
        "notificationList": [ "string, email (required, 1-5 emails)" ],
        "eventData": {
           "tenant_dns": "string (required)",
           "user_id": "string (required)"
        }
     }

Download works with pIndex and fetches up to 5000 records, generates CSV file and notifies provided emails that report is ready to download

FieldTypeDescription
pSizeNumberA limit on the number of objects to be returned. Default is 25
pIndexNumberThe pIndex key is a cursor for the pagination.
user_idstringoptional filter
fromstringDate from which to start the search
tostringdate to end the search
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/audit_log
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/audit_log' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"pSize": 25, "pIndex": 0, "user_id": "string", "from": "2022-12-19 00:00:00.000", "to": "2022-12-31 00:00:00.000"}'
RESPONSE
200
404
// no response body
POST/tenant/{tenantId}/community/{communityId}/download/jobs

Get Download Jobs

Get Download Jobs with sort and pagination

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Returns

Returns object with page info and data

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Data to sort and paginate download jobs

All fields are optional

By default: sort is undefined, pSize is 10, pIndex is 0

FieldTypeDescription
sortarray<object>
pSizenumber
pIndexnumber
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/download/jobs
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/download/jobs' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"sort": [{"field": "field", "order": "desc/asc"}], "pSize": 10, "pIndex": 0}'
RESPONSE
200
400
403
{
  "page": {
    "pSize": 10,
    "pIndex": 0,
    "total": 120
  },
  "data": [
    {
      "jobId": "jobId",
      "createdAt": 1231242412421,
      "completedAt": 1231242412421,
      "status": "status",
      "requestedBy": "string",
      "sendNotificationTo": [
        "string"
      ],
      "size": 1234,
      "downloadLink": "https://dns..."
    }
  ]
}
POST/tenant/{tenantId}/community/{communityId}/events

Get Events

This report searches in DB and returns all events 'as they are', not processed. Results are chronological and they are also in specified time range (from, to) and are paginated (pSize, pIndex).

This report is downloadable, please check request body for more information.

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

pSize (optional)

The maximum number of hits to return default = 25, min = 1, max = 100

pIndex (optional)

Number of hits to skip default = 0

from (optional)

timestamp, default = current date - 30 days, max = current date - 90 days

to (optional)

timestamp, default = current

query (optional)

a formatted query object to allow caller to run custom pre-formatted-queries and will run the query AS-IS to the DB.

IMPORTANT: All other fields are optional filters, you can search by any field you want

Returns

Returns object with page info and data

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Data to filter raws.

This report is downloadable. To request download, please add to request body below full object |

     "download": {
        "requestBy": "string, email (required)",
        "notificationList": [ "string, email (required, 1-5 emails)" ],
        "eventData": {
           "tenant_dns": "string (required)",
           "user_id": "string (required)"
        }
     }

Download works with pIndex and fetches up to 5000 records, generates CSV file and notifies provided emails that report is ready to download

FieldTypeDescription
pSizeNumberA limit on the number of objects to be returned. Default is 25
pIndexNumberThe pIndex key is a cursor for the pagination.
fromstringDate from which to start the search
tostringdate to end the search
queryobject
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/events
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/events' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"pSize": 10, "pIndex": 0, "from": "2021-02-01 00:00:00.000", "to": "2021-02-01 00:00:00.000", "query": {"event_name": "E_LOGIN_SUCCEEDED", "eventData.user_firstname": "xxx"}}'
RESPONSE
200
404
// no response body
POST/tenant/{tenantId}/community/{communityId}/hardwaretokens_export

Get Hardware tokens or user assignment tokens export report

This report fetches hardware tokens or user assignment tokens from adminconsole .

This report is downloadable, please check request body for more information.

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

reports_type

type of reports to be exported

query (optional)

a formatted query object to allow caller to run custom pre-formatted-queries.

download

an object with details - notification list array, requestedBy email string and eventData object

Returns

Returns jobId

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Data to filter raws.

This report is downloadable. To request download, please add to request body below full object |

{
   "reports_type": "xxxxxx",
   "query": {
         "searchStr" : "xxxxx"
      },
      "download": {
         "notificationList": [
             "email@1kosmos.com"
         ],
         "requestBy": "email@1kosmos.com",
         "eventData": {
             "user_id": "xxxxxxxxxxxx",
             "tenant_dns": "1k-dev.1kosmos.net",
             "community_name":"",
             "caller_ip":""
         }
     }
}
FieldTypeDescription
reports_typestring
queryobject
downloadobject
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/hardwaretokens_export
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/hardwaretokens_export' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"reports_type": "hardware_tokens or user_hardwaretokens", "query": {}, "download": {"notificationList": ["email@1kosmos.com"], "requestBy": "email@1kosmos.com", "eventData": {"user_id": "xxxxxxxxxxxx", "community_name": "xxxxxxxxxxxx", "caller_ip": "xxxxxxxxxxxx", "tenant_dns": "1k-dev.1kosmos.net"}}}'
RESPONSE
201
400
// no response body
POST/tenant/{tenantId}/community/{communityId}/job

Create job

Creates a job in DB. You can send any job data in request body

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

Returns

Returns status code OK if everything is ok

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Request body contains 'data' field with encrypted object below:

IMPORTANT - you can send unencrypted data in this request, it is only available in Swagger

{

        "jobId": "string - required",
        "tenantId": "string - required",
        "communityId": "string - required",
        "totalParts": "number - required",
        "totalCount": "number - required",
        "status": "string - required",
        "query": "array - required",
        "requestedBy": "string - required",
        "sendNotificationTo": "array - required",
        "tenantDns": "string - required",
        "user_id": "string - required",
        "requestUuid": "string - required",
        "createdAt": "number - required",
        "completedAt": "number - required",
        "downloadLink": "string - required",
        "size": "number - required",

}
FieldTypeDescription
jobIdstring
tenantIdstring
communityIdstring
totalPartsnumber
totalCountnumber
statusstring
queryarray<object>
requestedBystring
sendNotificationToarray<object>
tenantDnsstring
user_idstring
requestUuidstring
createdAtnumber
completedAtnumber
downloadLinkstring
sizenumber
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/job
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/job' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"jobId": "string", "tenantId": "string", "communityId": "string", "totalParts": 3, "totalCount": 3, "status": "string", "query": [], "requestedBy": "string", "sendNotificationTo": [], "tenantDns": "string", "user_id": "string", "requestUuid": "string", "createdAt": 1318781876, "completedAt": 1318781876, "downloadLink": "", "size": 123}'
RESPONSE
200
400
403
// no response body
POST/tenant/{tenantId}/community/{communityId}/last_seen_report

Get last seen

This report searches in DB and returns always array with one event for given user_id, device_id, person_id or even eventName.

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

! IMPORTANT - If eventName is specified, then at least device_id and user_id is required and person_id optional. If eventName is not specified, then at least one of these fields is required: user_id, device_id or person_id.

-----

user_id (optional)

The id of user. No default value

device_id (optional)

The id of device. No default value

person_id (optional)

The id of person. No default value

eventName (optional)

The name of event. No default value

Returns

Returns object with data field containing array of only one event

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Data to filter

FieldTypeDescription
device_idstring
user_idstring
person_idstring
eventNamestring
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/last_seen_report
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/last_seen_report' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"device_id": "xxxxxxxx", "user_id": "xxxxxxxx", "person_id": "xxxxxxxx", "eventName": "xxxxxxxx"}'
RESPONSE
200
404
// no response body
POST/tenant/{tenantId}/community/{communityId}/login_activity_report

Login Activity Report

This report searches in DB and collects all events with eventName = E_SP_REDIRECT_SUCCEEDED. Results are also in specified time range (from, to) and are paginated (pSize, pIndex).

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

pSize (optional)

The maximum number of hits to return default = 25, min = 1, max = 100

pIndex (optional)

Number of hits to skip default = 0

from (optional)

timestamp, default = current date - 30 days, max = current date - 90 days

to (optional)

timestamp, default = current

auth_method (optional)

string, optional filter

user_id (optional)

User id, string , optional filter

Returns

Returns object with page info and data

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Data to filter

FieldTypeDescription
pSizeNumberA limit on the number of objects to be returned. Default is 25
pIndexNumberThe pIndex key is a cursor for the pagination.
fromstringDate from which to start the search
tostringdate to end the search
auth_methodstringoptional filter
user_idstringoptional filter
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/login_activity_report
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/login_activity_report' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"pSize": 10, "pIndex": 0, "from": "2021-02-01 00:00:00.000", "to": "2021-04-01 00:00:00.000", "auth_method": "string", "user_id": "string"}'
RESPONSE
200
404
// no response body
POST/tenant/{tenantId}/community/{communityId}/metrics

Retrieves metrics based on metrics name

This endpoint retrieves metrics information based on provided metricsName

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

metricsName (required)

Retrieve metrics information for the given metrics name, should be one of: M_C_ACTIVE_USER, M_C_LOGIN_FAILED, M_C_LOGINS, M_C_NEW_DEVICES, M_G_APPLICATION_USAGE, M_G_LOGIN_FAILED, M_GT_SUCCESSFUL_AUTHENTICATIONS, M_GT_PROOFING_SESSION or M_T_NEW_DEVICES

from (optional in UTC)

timestamp, default = current date - 1 days, max = current date - 90 days

to (optional in UTC)

timestamp, if 'to' date is equal to 'from', then metric is counted hourly (in day pointing at 'to' date) instead of daily default = current

This endpoint is downloadable. To request download, please add to request body below full object |

   "download": {
       "requestBy": "string, email (required)",
       "notificationList": [ "string, email (required, 1-5 emails)" ],
       "eventData": {
           "tenant_dns": "string (required)",
           "user_id": "string (required)"
          }
       }

Returns

Returns metrics information

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Data to filter

FieldTypeDescription
metricsNamestringName of the metrics to retrieve
fromstringDate from which to start the search
tostringDate to end the search
responseTimezonestringTimezone for correctly formatting time in response
authModuleIdstringAuthModuleId - only applicable on M_C_ACTIVE_USER metrics
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/metrics
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/metrics' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"metricsName": "M_C_LOGINS", "from": "2023-02-01 00:00:00.000", "to": "2023-02-10 00:00:00.000", "responseTimezone": "UTC - string optional", "authModuleId": "xxxxxxxx"}'
RESPONSE
200
404
// no response body
POST/tenant/{tenantId}/community/{communityId}/passwordless_login_activity_report

Passwordless Login Activity Report

This report searches in DB all unique users (by user_id field) where eventName = E_SP_REDIRECT_SUCCEEDED and each record has latest_login and last_login (latest_login - 1, this can be null because there can be only 1 login attemp). Results are chronological, sorted by latest_login. Results are also in specified time range (from, to) and are paginated (pSize, pIndex).

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

pSize (optional)

The maximum number of hits to return default = 25, min = 1 max = 100

pIndex (optional)

Number of hits to skip default = 0

from (optional)

timestamp, default = current date - 30 days, max = current date - 90 days

to (optional)

timestamp, default = current

user_id (optional)

User id, string, optional filter

person_id (optional)

Person id, string, optional filter

Returns

Returns object with page info and data

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Data to filter

FieldTypeDescription
pSizeNumberA limit on the number of objects to be returned. Default is 25
pIndexNumberThe pIndex key is a cursor for the pagination.
fromstringDate from which to start the search
tostringdate to end the search
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/passwordless_login_activity_report
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/passwordless_login_activity_report' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"pSize": 10, "pIndex": 0, "from": "2021-02-01 00:00:00.000", "to": "2021-04-01 00:00:00.000"}'
RESPONSE
200
404
// no response body
POST/tenant/{tenantId}/community/{communityId}/role_assignment

Get a role assignment report

This report is only available as a download. It collects all of the authorizations for the roles specified, then aggregates it with user data and a latest login time for the user.

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Returns

Returns object with page info and data

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Data to filter raws.

This report is only available as a download. Please add to request body below full object |

    {
     "roles": ["role-1", "role-2"] (optional),
     "roleIds": ["id-1", "id-2"] (optional),
     "download": {
     "requestBy": "string, email (required)",
     "notificationList": [ "string, email (required, 1-5 emails)" ],
     "eventData": {
         "tenant_dns": "string (required)",
         "user_id": "string (required)"
        }
     },
    "data_now": "boolean, default false (optional)"
   }

Download generates CSV file and notifies provided emails that report is ready to download

FieldTypeDescription
rolesarray<object>roles, each of which we need to retrieve all users with that role name
roleIdsarray<object>roleIds, each of which we need to retrieve all users with that role authorization
data_nowboolean
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/role_assignment
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/role_assignment' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"roles": ["role-1", "role-2"], "roleIds": ["id-1", "id-2"], "data_now": false}'
RESPONSE
200
404
// no response body
POST/tenant/{tenantId}/community/{communityId}/service_onboarding_report

Service onbording report

This report searches in DB and is collecting every record with eventName = E_USER_ONBOARDED. Results are also in specified time range (from, to) and are paginated (pSize, pIndex).

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

pSize (optional)

The maximum number of hits to return default = 25, min = 1, max = 100

pIndex (optional)

Number of hits to skip default = 0

from (optional)

timestamp, default = current date - 30 days, max = current date - 90 days

to (optional)

timestamp, default = current

user_id (optional)

User id, string, optional filter

person_id (optional)

Person id, string, optional filter

Returns

Returns object with page info and data

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Data to filter.

This report is downloadable. To request download, please add to request body below full object |

     "download": {
        "requestBy": "string, email (required)",
        "notificationList": [ "string, email (required, 1-5 emails)" ],
        "eventData": {
           "tenant_dns": "string (required)",
           "user_id": "string (required)"
        }
     }

Download works with pIndex and fetches up to 5000 records, generates CSV file and notifies provided emails that report is ready to download

FieldTypeDescription
pSizeNumberA limit on the number of objects to be returned. Default is 25
pIndexNumberThe pIndex key is a cursor for the pagination.
fromstringDate from which to start the search
tostringdate to end the search
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/service_onboarding_report
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/service_onboarding_report' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"pSize": 10, "pIndex": 0, "from": "2021-02-01 00:00:00.000", "to": "2021-04-01 00:00:00.000"}'
RESPONSE
200
404
// no response body
POST/tenant/{tenantId}/community/{communityId}/service_usage_report

Service Usage report

This report searches in DB and collects all unique users (by user_id field) with number of eventName = E_LOGIN_SUCCEEDED. Each record has last_login. Results are chronological, sorted by last_login. Results are also in specified time range (from, to) and are paginated (pSize, pIndex).

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

pSize (optional)

The maximum number of hits to return default = 25, min = 1, max = 100

pIndex (optional)

Number of hits to skip default = 0

from (optional)

timestamp, default = current date - 30 days, max = current date - 90 days

to (optional)

timestamp, default = current

user_id (optional)

User id, string, optional filter

person_id (optional)

Person id, string, optional filter

Returns

Returns object with page info and data

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Data to filter

FieldTypeDescription
pSizeNumberA limit on the number of objects to be returned. Default is 25
pIndexNumberThe pIndex key is a cursor for the pagination.
fromstringDate from which to start the search
tostringdate to end the search
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/service_usage_report
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/service_usage_report' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"pSize": 10, "pIndex": 0, "from": "2021-02-01 00:00:00.000", "to": "2021-04-01 00:00:00.000"}'
RESPONSE
200
404
// no response body
POST/tenant/{tenantId}/community/{communityId}/v2/login_activity_report

Login Activity Report

This report searches in DB and collects all events where eventName = E_SP_REDIRECT_SUCCEEDED ||eventName = E_SP_REDIRECT_SUCCEEDED and application is adminx. Results are also in specified time range (from, to) and are paginated (pSize, pIndex).

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

pSize (optional)

The maximum number of hits to return default = 25, min = 1, max = 100

pIndex (optional)

Number of hits to skip default = 0

from (optional)

timestamp, default = current date - 30 days, max = current date - 90 days

to (optional)

timestamp, default = current

auth_method (optional)

string, optional filter

user_id (optional)

User id, string , optional filter

application (optional)

application, string , optional filter

Returns

Returns object with page info and data

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Data to filter the E_LOGIN_SUCCEEDED and E_SP_REDIRECT_SUCCEEDED events.

This report is downloadable. To request download, please add to request body below full object |

     "download": {
        "requestBy": "string, email (required)",
        "notificationList": [ "string, email (required, 1-5 emails)" ],
        "eventData": {
           "tenant_dns": "string (required)",
           "user_id": "string (required)"
        }
     }

Download works with pIndex and fetches up to 5000 records, generates CSV file and notifies provided emails that report is ready to download

FieldTypeDescription
pSizeNumberA limit on the number of objects to be returned. Default is 25
pIndexNumberThe pIndex key is a cursor for the pagination.
fromstringDate from which to start the search
tostringdate to end the search
auth_methodstringoptional filter
user_idstringoptional filter
applicationstringoptional filter
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/v2/login_activity_report
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/v2/login_activity_report' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"pSize": 10, "pIndex": 0, "from": "2021-02-01 00:00:00.000", "to": "2021-04-01 00:00:00.000", "auth_method": "string", "user_id": "string", "application": "string"}'
RESPONSE
200
404
// no response body
POST/tenant/{tenantId}/community/{communityId}/verification_sessions_report

Get verification sessions report

This report fetches verification sessions from IDProofing.

This report is downloadable, please check request body for more information.

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

query (optional)

a formatted query object to allow caller to run custom pre-formatted-queries.

Returns

Returns jobId

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Data to filter raws.

This report is downloadable. To request download, please add to request body below full object |

{
   "query": {
         "id": "session id : non-mandatory",
         "status": "COMPLETED_PASS | COMPLETED_FAILED | COMPLETED_NOT_PERFORMED | PENDING | EXPIRED | INPROGRESS | DECLINED | COMPLETED | ABANDONED | CANCELLED : non-mandatory",
         "documentType": "dl_object | ppt_object | idcard_object : non-mandatory",
         "name": "test : non-mandatory",
         "startDate": "2024-12-13 00:00:00.000 : non-mandatory",
         "endDate": "2024-12-19 23:59:59.000 : non-mandatory"
      },
      "download": {
         "notificationList": [
             "email@1kosmos.com"
         ],
         "requestBy": "email@1kosmos.com",
         "eventData": {
             "tenant": "xxxxxxxxxxxx",
             "community": "xxxxxxxxxxxx",
             "user_id": "user",
             "tenant_dns": "1k-dev.1kosmos.net"
         }
     }
}
FieldTypeDescription
queryobject
downloadobject
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/verification_sessions_report
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/verification_sessions_report' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"query": {"id": "xxxxxxxxxx", "status": "COMPLETED_PASS | COMPLETED_FAILED | COMPLETED_NOT_PERFORMED | PENDING | EXPIRED | INPROGRESS | DECLINED | COMPLETED | ABANDONED | CANCELLED", "documentType": "dl_object | ppt_object | idcard_object", "name": "xxxxxxxxxx", "startDate": "2024-12-19 23:59:59.000", "endDate": "2024-12-19 23:59:59.000"}, "download": {"notificationList": ["email@1kosmos.com"], "requestBy": "email@1kosmos.com", "eventData": {"tenant": "xxxxxxxxxxxx", "community": "xxxxxxxxxxxx", "user_id": "xxxxxxxxxxxx", "tenant_dns": "1k-dev.1kosmos.net"}}}'
RESPONSE
201
400
// no response body
PUT/tenant/{tenantId}/community/{communityId}/event/{eventName}

Create Event

Creates an event in DB. You can send any number of fields in request body

Parameters

eventName (required)

The name of the event to log. Suggested values: E_USER_ONBOARDED, E_USER_INVITED, E_LOGIN_ATTEMPT, E_LOG_OTP_REQUESTED or different.

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

type (required)

Event type

timestamp (optional)

Time of event in string that is able to be parsed as date

default = current time

epoch_time (optional)

Time of event in number

default = current time

Returns

Returns status code OK if everything is ok

Path parameters
NameTypeDescription
eventNamerequiredstringName of event
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Request body contains 'data' field with encrypted object below:

IMPORTANT - you can send unencrypted data in this request, it is only available in Swagger

{
    "data": {
        "type": "string - required",
        "epoch_time": "number in seconds - optional",
        "timestamp": "string in date format 'YYYY-MM-DD HH:mm:ss.SSS' or other readable - optional",
        ...restOfEventData
    }
}
FieldTypeDescription
dataobject
PUThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/event/{eventName}
cURL
Node.js
Python
curl -X PUT 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/event/<eventName>' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"data": {"type": "event", "timestamp": "2023-02-14 15:00:00.000", "epoch_time": 1318781876}}'
RESPONSE
200
400
403
// no response body
PATCH/tenant/{tenantId}/community/{communityId}/download/job/{jobId}

Cancel download job

Cancel download job

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of community

jobId (required)

The id of job

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 60 seconds from now

publickey (required)

Public key

Returns

Returns object with page info and data

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
jobIdrequiredstringId of job
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
PATCHhttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/download/job/{jobId}
cURL
Node.js
Python
curl -X PATCH 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/download/job/<jobId>' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY'
RESPONSE
200
403
404
{
  "createdAt": 1231242412421,
  "status": "Cancelled",
  "sendNotificationTo": [
    "string"
  ]
}
PATCH/tenant/{tenantId}/community/{communityId}/job/{jobId}

Update job

Update a job in DB.

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of community

jobId (require)

Id of Job to update

Headers

apikey (required)

API key

Request Body

status (require)

Status of Job to update

downloadLink (require)

Download link of report data

size (require)

Size of report data file

completedAt (require)

completed time of report data file

Returns

Returns status code OK if everything is ok

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
jobIdrequiredstringId of job
Headers
NameTypeDescription
apikeyrequiredstringAPI key
Request body

Request body contains 'data' field with encrypted object below:

IMPORTANT - you can send unencrypted data in this request, it is only available in Swagger

{
        "status": "string - required",
        "downloadLink": "string - optinal",
        "size": "number - optinal",
        "completedAt": "number - optinal",

}
FieldTypeDescription
statusstring
completedAtnumber
downloadLinkstring
sizenumber
PATCHhttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/job/{jobId}
cURL
Node.js
Python
curl -X PATCH 'https://pilot-root.1kosmos.net/reports/tenant/5f3d8d0cd866fa61019cf968/community/5f3d8d0cd866fa61019cf969/job/<jobId>' \
  -H 'apikey: <value>' \
  -H 'Content-Type: application/json' \
  -d '{"status": "string", "completedAt": 1318781876, "downloadLink": "", "size": 123}'
RESPONSE
200
400
403
// no response body
Reports

Service Key

Service Key endpoints.

GET/servicekeys

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 60 seconds from now

publickey (required)

Public key

Returns

Returns array with service keys

Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
GEThttps://pilot-root.1kosmos.net/reports/servicekeys
cURL
Node.js
Python
curl -X GET 'https://pilot-root.1kosmos.net/reports/servicekeys' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY'
RESPONSE
200
// no response body
DELETE/servicekey/{keyId}

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 60 seconds from now

publickey (required)

Public key

Returns

Returns object with page info and data

Path parameters
NameTypeDescription
keyIdrequiredstringkeyId of service key to reset
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
DELETEhttps://pilot-root.1kosmos.net/reports/servicekey/{keyId}
cURL
Node.js
Python
curl -X DELETE 'https://pilot-root.1kosmos.net/reports/servicekey/<keyId>' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY'
RESPONSE
204
// no response body
Reports

Download

Export datasets.

DELETE/download/cleanup

Cleanup download jobs

Cleanup download jobs. Can only be accessed using infra key

Headers

licensekey (required)

Unencrypted infra key

Returns

204 No Content

Headers
NameTypeDescription
licensekeyrequiredstringInfra key
DELETEhttps://pilot-root.1kosmos.net/reports/download/cleanup
cURL
Node.js
Python
curl -X DELETE 'https://pilot-root.1kosmos.net/reports/download/cleanup' \
  -H 'licensekey: YOUR_LICENSE_KEY'
RESPONSE
204
403
// no response body
Reports

ECDSA Helper

ECDSA Helper endpoints.

POST/ecdsa_helper/{method}

/ecdsa_helper/{method}

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.

Path parameters
NameTypeDescription
methodstring
Request body
FieldTypeDescription
dataStrrequiredstringMessage to encrypt or decrypt
publicKeyrequiredstring
privateKeyrequiredstring
POSThttps://pilot-root.1kosmos.net/reports/ecdsa_helper/{method}
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/ecdsa_helper/<method>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"dataStr": "Hey, This is example data string.", "publicKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "privateKey": "xxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}'
RESPONSE
200
Success
{
  "data": "xxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxx"
}
Reports

Environment

Environment endpoints.

GET/environment

/environment

Returns

Headers

### licensekey License key

Headers
NameTypeDescription
licensekeystringLicense key;
GEThttps://pilot-root.1kosmos.net/reports/environment
cURL
Node.js
Python
curl -X GET 'https://pilot-root.1kosmos.net/reports/environment' \
  -H 'licensekey: YOUR_LICENSE_KEY'
RESPONSE
200
Success
// no response body
Reports

Healthz

Healthz endpoints.

GET/healthz

Get healthz.

Get healthz

Returns

Returns a healthz object

  • ``version = <git-tag>.<commit-id>.<dob>``
  • ``git-tag``: When code is compiled from a git-tag, this must carry the tag name. This should match one of the git tags.
  • ``commit-id``: This is the git-commit-id. eg: When code is built from this, the hex code, in the end, is the commit it.
  • ``dob``: Date Of Build. This is epoc-time-in-seconds that tell the time when the build was created.
  • ​if the code is not built from a git-tag, then the ``version =<commit-id>.<dob>``
GEThttps://pilot-root.1kosmos.net/reports/healthz
cURL
Node.js
Python
curl -X GET 'https://pilot-root.1kosmos.net/reports/healthz' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY'
RESPONSE
200
Success ``` { "status": "all services operational", "publicKey": "string" //same as <service>/publickeys endpoint, "code": "200", "version": "<version>" //as defined above } ```
{
  "status": "all services operational",
  "publicKey": "//same as <service>/publickeys endpoint",
  "code": "200",
  "version": "xxxx.xxxx.xxxx"
}
Reports

Public Key

Public Key endpoints.

GET/publickeys

/publickeys

Get system's public key. No authorization

Returns

Returns a public key object

GEThttps://pilot-root.1kosmos.net/reports/publickeys
cURL
Node.js
Python
curl -X GET 'https://pilot-root.1kosmos.net/reports/publickeys' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY'
RESPONSE
200
404
{
  "publicKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
Reports

Service Directory

Service Directory endpoints.

GET/sd

Get all service directories.

Get all service directories.

Returns

Returns all service directories.

GEThttps://pilot-root.1kosmos.net/reports/sd
cURL
Node.js
Python
curl -X GET 'https://pilot-root.1kosmos.net/reports/sd' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY'
RESPONSE
200
{
  "name1": "https://xxx.xxxxxx.xxx/xxxxx",
  "name2": "https://xxx.xxxxxx.xxx/xxxxx",
  "name3": "https://xxx.xxxxxx.xxx/xxxxx"
}
Reports

Transactions

Transaction-level reporting.

POST/tenant/{tenantId}/community/{communityId}/transactions

Fetch transactions

This transactions searches in DB and returns all transactions 'as they are', not processed. Results are chronological and they are also in specified time range (from, to) and are paginated (pSize, pIndex).

Parameters

tenantId (required)

The id of tenant

communityId (required)

The id of 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 60 seconds from now

publickey (required)

Public key

Request Body

pSize (optional)

The maximum number of hits to return default = 25, min = 1, max = 100

pIndex (optional)

Number of hits to skip default = 0

from (optional)

timestamp, default = current date - 30 days, max = current date - 90 days

to (optional)

timestamp, default = current

query (optional)

a formatted query object to allow caller to run custom pre-formatted-queries and will run the query AS-IS to the DB.

IMPORTANT: All other fields are optional filters, you can search by any field you want

Returns

Returns object with page info and data

Path parameters
NameTypeDescription
tenantIdrequiredstringId of tenant
communityIdrequiredstringId of community
Headers
NameTypeDescription
licensekeyrequiredstringLicense key encrypted with ECDSA / Try Authorize &#128274;
requestidrequiredstringJSON 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 60 seconds from now / Try Authorize &#128274;
publickeyrequiredstringPublic Key / Try Authorize &#128274;
Request body

Data to filter raws.

FieldTypeDescription
pSizeNumberA limit on the number of objects to be returned. Default is 25
pIndexNumberThe pIndex key is a cursor for the pagination.
fromstringDate from which to start the search
tostringdate to end the search
queryobject
POSThttps://pilot-root.1kosmos.net/reports/tenant/{tenantId}/community/{communityId}/transactions
cURL
Node.js
Python
curl -X POST 'https://pilot-root.1kosmos.net/reports/tenant/<tenantId>/community/<communityId>/transactions' \
  -H 'licensekey: YOUR_LICENSE_KEY' \
  -H 'requestid: <ecdsa-requestid>' \
  -H 'publickey: <public-key>' \
  -H 'authMyPublicKey: YOUR_PUBLIC_KEY' \
  -H 'authMyPrivateKey: YOUR_PRIVATE_KEY' \
  -H 'authLicense: YOUR_LICENSE_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"pSize": 10, "pIndex": 0, "from": "2021-02-01 00:00:00.000", "to": "2021-02-01 00:00:00.000", "query": {"uid": "xxxxxx"}}'
RESPONSE
200
404
// no response body
© 2026 1Kosmos · Reports service API v2.1Generated from the OpenAPI spec · reports.json