Skip to main content

REST API

The REST API lets you automate management of your SparkLogs workspace the way an administrator does in the app. It creates and organizes client organizations, creates the registration tokens that deploy agents, manages who can see which client, and reads the audit log.

You can use it to invite and remove users, to keep groups and their access current, and to record PSA and RMM ids on organizations. For MSPs, a more advanced use is creating a client's organization before any agent is deployed. Most MSPs do not need API automation for this and instead should just use their RMM to deploy agents.

OpenAPI 3.1 specificationhttps://sparklogs.com/api/openapi.json
Download

Some operations are not available in the API and can only be performed in the app:

  • creating, renaming and revoking API tokens (through the API, a token can only rotate its own secret)
  • approving, viewing and disconnecting connected AI apps
  • accepting an invitation
  • setting up replication of archived data

The API does not query logs or device history. It does report each agent's presence and collection health, and counts of enrolled, active and inactive agents. To query the data, use the app or the MCP API. AI assistants connect to the MCP API, and your own code can call it too, with an API token.

Who it is for​

  • Automation engineers at MSPs who automate onboarding, offboarding and access changes in PowerShell or Python.
  • Integrators who build SparkLogs into a PSA, an RMM or a documentation tool.
  • AI agents working for an engineer or an integrator. Every page here is also available as Markdown, and the whole API as an OpenAPI 3.1 file.

Example API call​

Every call goes to one address, whatever region your workspace is in, and carries an API token in the Authorization header.

curl "https://engine.sparklogs.app/app-api/credential" \
-H "Authorization: Bearer $SPARKLOGS_TOKEN"

This call needs no scope. It returns what the token is: its kind, its id, the workspace it belongs to, that workspace's region and its scopes. The quickstart goes from creating a token to listing your client organizations.

Key concepts​

ReadTo learn
ConceptsA big-picture overview of the API, including the data model and the available actions.
Authentication and ScopesThe kinds of token, what a token can reach, and how to give one the least it needs.
Paging and syncHow to page large results and do incremental fetches.
Errors, Rate limits and RetriesWhat a failed call returns and when it is safe to send again.
Example use casesCall-by-call examples: onboarding a client, syncing with a PSA, preparing for an audit.
ReferenceEvery call, parameter and field.

API stability​

Every API call is in Preview right now while we gather feedback. We expect few breaking changes. See Versioning and Stability.