🌐 REST API

api-settings Sample REST API to Create Application and Upload Accounts

This guide walks through the process of integrating with the Lumos API to create a custom application and upload a sample user account with custom attributes and permissions and listing the created accounts.

Authentication

All requests to the Lumos API must include a bearer token in the Authorization header. To confirm your API key is valid, list all apps:

curl -X GET "https://api.lumos.com/apps" \
  	-H "Authorization: Bearer YOUR_API_TOKEN"

1. Creating a Custom Application

curl -X POST "https://api.lumos.com/apps" \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
           "name": "Custom HR Portal",
           "category": "HR_AND_LEARNING",
           "description": "Internal HR management portal"
         }'

Note the returned id. You will provide that as app_id in the API call to create accounts.

2. Creating Accounts with Custom Attributes and Permissions

curl -X POST "https://api.lumos.com/accounts/upload" \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
          "app_id": "YOUR_APP_ID",
          "accounts": [
              {
                  "unique_identifier": "jane.smith",
                  "email": "[email protected]",
                  "first_name": "Jane",
                  "last_name": "Smith",
                  "status": "ACTIVE",
                  "attributes": [
                      {
                          "type": "Employee ID",
                          "name": "EMP-78945"
                      },
                      {
                          "type": "Clearance Level",
                          "name": "Confidential"
                      }
                  ],
                  "permissions": [
                      {
                          "unique_identifier": "HR-AR-001",
                          "type": "Application Role",
                          "name": "Accounts Admin"
                      },
                      {
                          "unique_identifier": "HR-DA-002",
                          "type": "Data Access",
                          "name": "General Viewer"
                      },
                      {
                          "unique_identifier": "HR-REPORT-EXE",
                          "type": "Report Access",
                          "name": "Performance Reports"
                      }
                  ]
              }
          ]
      }'

Note the returned job_id. You will provide that as job_id in the API call to check the status of account upload job.

3. Getting Upload Job State

curl -X GET https://api.lumos.com/accounts/upload/job_id \
     -H 'accept: application/json' \
     -H 'authorization: Bearer YOUR_API_TOKEN'

After the job returns as SUCCESS, you can list the created accounts.

4. Listing Created Accounts

curl -X GET "https://api.lumos.com/accounts?app_id=YOUR_APP_ID" \
     -H "Authorization: Bearer YOUR_API_TOKEN"