Overview
The Blumira API makes it easier for MSPs to connect Blumira to the other tools and systems your business relies on, enabling you to get more out of your data. It is designed to improve mapping and integration between services, support operational dashboards, and scale operations with Blumira.
After creating your Blumira API credentials, you can connect Blumira to the business tools you and your teams rely on for things like ticketing, billing, reporting, or resource management.
Below is an example dashboard built using the Blumira API, and the non-production code is available here: https://github.com/Blumira/MSP-API-Demo-Dashboard.
About the endpoints
The Blumira API is OpenAPI Specification v3 compliant, uses standard REST protocols, and can be integrated with any programming language that supports HTTP requests. The API endpoints will be rate-limited at 10 requests per second per key.
The available endpoints give MSPs the following capabilities:
- Get findings information for sub-accounts with active subscriptions.
- Get Blumira Agent device details, statuses, and installation keys for specific sub-accounts
- Get sub-account information, such as organization name, license, and number of open findings
- Post finding assignees, notes, and statuses
Reference: Explore the endpoints and example results at https://api.blumira.com/public-api/v1/ui/.
Generating Blumira API credentials
With an active supported license, you can generate API credentials for your entire MSP cohort of accounts, and you can separately generate credentials scoped to your individual organization's account.
To generate Blumira API credentials for your entire MSP cohort of accounts, do the following:
- In the app, navigate to MSP Portal > Integrations.
- Click Generate API Credentials.
- In the Generate API Credentials window, do the following:
- (Optional) In Label, type a name for the key pair.
- Under Access level, select the scope of access for the keys.
- Click Generate.
- Copy and save your Client ID and Client Secret.
To generate Blumira API credentials for an individual sub-account or parent account, do the following:
- In the app, navigate to Settings > Organization.
- Under Blumira API Credentials, click Generate API Credentials.
- In the Generate API Credentials window, do the following:
- (Optional) In Label, type a name for the key pair.
- Under Access level, select the scope of access for the keys.
- Click Generate.
- Copy and save your Client ID and Client Secret.
Using your Blumira API credentials
Generating a JWT bearer token
Access to the Blumira API requires authorization with a JWT bearer token. When running your own command in your preferred language, ensure you replace the client_id and client_secret with the values given to you in the key pair for your account.
Below are examples of cURL commands you can use to create the token:
Using individual form values in the body of the request:
curl --request POST \ --url 'https://auth.blumira.com/oauth/token' \ --header 'content-type: application/x-www-form-urlencoded' \ --data grant_type=client_credentials \ --data "client_id=$CID" \ --data "client_secret=$SEC" \ --data audience=public-apiUsing JSON in the body of the request:
curl --request POST \ --url 'https://auth.blumira.com/oauth/token' \ --header 'content-type: application/json' \ --data @- <<EOF { "client_id": "$CID", "client_secret": "$SEC", "audience": "public-api", "grant_type": "client_credentials" } EOF
Using the bearer token
Example bearer token output:
{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlFrRTVNREUxUVRKR05UbEJOVGREUlRKRE1rUkdOMEZFTXpreFJEa3pOelJFUmpKQlFVUTROUSJ9.eyJwb2wiOiJ4ZHJfcnciLCJvcmciOiJmZmZmZmZmZi1mZWVkLWJlZWYtMTMzNy1jMGZmZWUwMDAwMDIiLCJpc3MiOiJodHRwczovL2F1dGguZC5iNWEuaW8vIiwic3aaaaaaaaFIY0lIYmhqNFVJVVdTQzE1OGp3NVloYmRWZTluOUNAY2xpZW50cyIsImF1ZCI6InB1YmxpYy1hcGkiLCJpYXQiOjE3MzQwMjg1ODIsImV4cCI6MTczNjYyMDU4Miwic2NvcGUiOiJydyIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyIsImF6cCI6InhBSGNJSGJoajRVSVVXU0MxNThqdzVZaGJkVmU5bjlDIn0.JF87Yx9sBBiIOJ0rM6IAO6Rv4xs9LD_L_nwF5zMLdQlYYHnKCYuRbWYQiih5ITi_SkL2HG6Aa89XDKZ32jD2N5U7V6RE7AxGJteQBNU5AtijmimBORTdZz9gr3g5ol_R4H1TRpapVeIYwebjVy9TE1h-V7xaP9CTnBUKSv2KIqaT6Gysz79isOd0Pjj_SzF89inSb44oND_Yam5qayYaql1rTKSKJQvLf-hvedKXM088fGG6xTQivoamgVIKZIEpVeBSTMzC22rrITwAcanWxLjVfI5yoChoqca1U8SKKg5AsJ9b5GLh28r6wH3BIHgd5sIVCT0NewC_kA4xxxxxx","scope":"ro","expires_in":2592000,"token_type":"Bearer"}In your preferred API platform, use the token to authorize into the Blumira Public API. This is a bearer token, which can be used as follows:
curl --url https://api.blumira.com/public-api/v1/findings -H "Authorization: Bearer ${JWT}"Rotating or deleting API credentials
To rotate your Blumira API Client Secret, do the following:
- Navigate to the Blumira API Credentials table (MSP Portal > Integrations or Settings > Organization).
- In the row of the credentials you want to manage, click Rotate.
- In the Client Secret Rotation window, click Yes.
In the Rotated Client Secret window, copy and save your new Client Secret.
Note: Bearer tokens created with your old Client Secret keep working for one hour after you rotate. After that, the Blumira API rejects them with 401 Unauthorized. Within that hour, generate a new token with the new Client Secret and update the tools that connect to the Blumira API. If you rotate again, tokens created before your previous rotation stop working immediately.
To delete your credentials, do the following:
- In the Blumira API Credentials table, at the end of the credential's row, click Delete API Credentials (trash icon).
- In the Delete API Credentials window, click Delete.