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 namealways_run— Filter to only continuously-running (or scheduled) scriptsordering— Field to sort results bylimit / 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
- Mock serverhttps://develop-api.esper.io/_mock/openapi/v2/background-scripts/
- https://develop-api.esper.cloud/apihttps://develop-api.esper.cloud/api/v2/background-scripts/
curl -i -X GET \
'https://develop-api.esper.io/_mock/openapi/v2/background-scripts/?ordering=string&name=string&always_run=true&limit=10&offset=0'Response
{ "content": { "count": 0, "next": "string", "previous": "string", "results": [ … ] }, "message": "string", "code": 0 }