GET /v2/background-scripts/
Retrieves all background scripts configured for the tenant.
Returns the tenant's background scripts with optional filtering by name and always_run, and standard pagination.
About Background Scripts Background Scripts let a tenant run custom PowerShell automation on managed devices. This list endpoint is the primary way to review what scripts already exist before creating or reusing one.
Key Fields / Query Parameters
- name — Filter scripts by name
- always_run — Filter to only continuously-running (or scheduled) scripts
- ordering — Field to sort results by
- limit / offset — Pagination controls
Common Use Cases
- Auditing all background scripts currently configured for the tenant
- Finding an existing script to reuse or update rather than duplicating it
- Reviewing which scripts are set to always_run versus scheduled
Best Practices
- Check this list before creating a new script to avoid duplicating existing automation
- Filter by always_run when reviewing continuously-running scripts specifically, since these have the broadest device impact
- Periodically review script content for scripts no longer in use
Workflow
- GET this endpoint to review existing background scripts
- GET a specific script by ID to view its full content
- Create a new script via POST if none of the existing ones fit
Request
- Base URLhttps://develop-api.esper.cloud/api
- URLhttps://develop-api.esper.cloud/api/v2/background-scripts/
- Authnone declared
Query parameters
Order the results by a specific field (-field for descending order). Valid fields are 'name', 'created_at', 'updated_at', 'created_by', 'updated_by'.
Filter the results by name (partial match, case insensitive).
Filter the results by always_run flag.
Number of results to return per page.
The initial index from which to return the results.
Response
Success
Changes
No recorded changes to this operation across all 6 revisions of this API.