Portainer Edge Jobs API

Manage Edge Jobs

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 11

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /edge_jobs List scheduled Edge jobs · Fetch EdgeJobs list #
Ask an LLM
“Which scheduled jobs are running on my Portainer Edge agents?”
“Can I see all Edge jobs across my edge groups?”
Tell an agent
List all Edge jobs.
Show every scheduled job on my edge agents.
DELETE /edge_jobs/{id} Delete an Edge job · Delete an EdgeJob #
Ask an LLM
“How do I remove a scheduled job from my edge agents?”
“Can I delete an Edge job I no longer need?”
Tell an agent destructive · confirm first
Delete Edge job {id}.
Remove the scheduled job {id} from my edge groups.
GET /edge_jobs/{id} Inspect an Edge job · Inspect an EdgeJob #
Ask an LLM
“What cron expression and endpoints does a particular Edge job use?”
“Can I look up one scheduled job by its ID?”
Tell an agent
Inspect Edge job {id}.
Show the schedule and endpoints of Edge job {id}.
PUT /edge_jobs/{id} Update an Edge job · Update an EdgeJob #
Ask an LLM
“Can I change the cron schedule of an existing Edge job?”
“Is it possible to point an existing scheduled job at different edge groups?”
Tell an agent
Update Edge job {id} to run on cron {CronExpression}.
Point existing Edge job {id} at edge groups {EdgeGroups}.
GET /edge_jobs/{id}/file Download an Edge job's file · Fetch a file of an EdgeJob #
Ask an LLM
“Can I download the file that defines a scheduled job?”
“Where do I get the stack file an Edge job was created from?”
Tell an agent
Download the file of Edge job {id}.
Get the stack file used to create Edge job {id}.
GET /edge_jobs/{id}/tasks List tasks of an Edge job · Fetch the list of tasks on an EdgeJob #
Ask an LLM
“Which tasks has a scheduled Edge job run so far?”
“Can I see the task history for one Edge job?”
Tell an agent
List the tasks of Edge job {id}.
Show past runs of scheduled job {id}.
DELETE /edge_jobs/{id}/tasks/{taskID}/logs Clear one task's logs · Clear the log for a specifc task on an EdgeJob #
Ask an LLM
“How do I clear the logs of a single task?”
“Can I wipe the output of one task without deleting the job?”
Tell an agent destructive · confirm first
Clear the logs of task {taskID} on Edge job {id}.
Wipe the output of task {taskID} for scheduled job {id}.
GET /edge_jobs/{id}/tasks/{taskID}/logs Get one task's logs · Fetch the log for a specifc task on an EdgeJob #
Ask an LLM
“What did a specific task of an Edge job output?”
“Can I read the logs of one task without collecting them?”
Tell an agent
Get the logs of task {taskID} on Edge job {id}.
Show the output of task {taskID} for scheduled job {id}.
POST /edge_jobs/{id}/tasks/{taskID}/logs Collect one task's logs · Collect the log for a specifc task on an EdgeJob #
Ask an LLM
“Can I collect the logs of a task so I can save them?”
“Is there a way to pull a task's output into a file?”
Tell an agent
Collect the logs of task {taskID} on Edge job {id}.
Save the output of task {taskID} for scheduled job {id}.
POST /edge_jobs/create/file Create an Edge job from a file · Create an EdgeJob from a file #
Ask an LLM
“Can I schedule a stack file to run on my edge agents?”
“What do I need to create a recurring Edge job from a file?”
Tell an agent
Create Edge job {Name} from file {file} on cron {CronExpression} for edge groups {EdgeGroups} and environments {Endpoints}.
Schedule recurring job {Name} from file {file} on cron {CronExpression} for {EdgeGroups} and {Endpoints}.
POST /edge_jobs/create/string Create an Edge job from text · Create an EdgeJob from a text #
Ask an LLM
“Can I create a scheduled job from a YAML or JSON string?”
“Is it possible to schedule a stack without uploading a file?”
Tell an agent
Create an Edge job from the text {FileContent}.
Schedule a stack from the text {FileContent} with name {Name}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/portainer:portainer-edge-jobs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

portainer-edge-jobs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: info@portainer.io
  description: Portainer API is an HTTP API served by Portainer.
  license:
    name: zlib
    url: https://github.com/portainer/portainer/blob/develop/LICENSE
  title: PortainerCE Edge Jobs API
  version: 2.39.1
servers:
- url: /api
tags:
- description: Manage Edge Jobs
  name: edge_jobs
paths:
  /edge_jobs:
    get:
      description: '**Access policy**: administrator'
      operationId: EdgeJobList
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/portainer.EdgeJob'
                type: array
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
        '503':
          description: Edge compute features are disabled
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Fetch EdgeJobs list
      tags:
      - edge_jobs
  /edge_jobs/{id}:
    delete:
      description: '**Access policy**: administrator'
      operationId: EdgeJobDelete
      parameters:
      - description: EdgeJob Id
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
        '503':
          description: Edge compute features are disabled
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Delete an EdgeJob
      tags:
      - edge_jobs
    get:
      description: '**Access policy**: administrator'
      operationId: EdgeJobInspect
      parameters:
      - description: EdgeJob Id
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/portainer.EdgeJob'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
        '503':
          description: Edge compute features are disabled
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Inspect an EdgeJob
      tags:
      - edge_jobs
    put:
      description: '**Access policy**: administrator'
      operationId: EdgeJobUpdate
      parameters:
      - description: EdgeJob Id
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/portainer.EdgeJob'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
        '503':
          description: Edge compute features are disabled
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Update an EdgeJob
      tags:
      - edge_jobs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/edgejobs.edgeJobUpdatePayload'
        description: EdgeGroup data
        required: true
  /edge_jobs/{id}/file:
    get:
      description: '**Access policy**: administrator'
      operationId: EdgeJobFile
      parameters:
      - description: EdgeJob Id
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/edgejobs.edgeJobFileResponse'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
        '503':
          description: Edge compute features are disabled
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Fetch a file of an EdgeJob
      tags:
      - edge_jobs
  /edge_jobs/{id}/tasks:
    get:
      description: '**Access policy**: administrator'
      operationId: EdgeJobTasksList
      parameters:
      - description: EdgeJob Id
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/edgejobs.taskContainer'
                type: array
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
        '503':
          description: Edge compute features are disabled
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Fetch the list of tasks on an EdgeJob
      tags:
      - edge_jobs
  /edge_jobs/{id}/tasks/{taskID}/logs:
    delete:
      description: '**Access policy**: administrator'
      operationId: EdgeJobTasksClear
      parameters:
      - description: EdgeJob Id
        in: path
        name: id
        required: true
        schema:
          type: integer
      - description: Task Id
        in: path
        name: taskID
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
        '503':
          description: Edge compute features are disabled
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Clear the log for a specifc task on an EdgeJob
      tags:
      - edge_jobs
    get:
      description: '**Access policy**: administrator'
      operationId: EdgeJobTaskLogsInspect
      parameters:
      - description: EdgeJob Id
        in: path
        name: id
        required: true
        schema:
          type: integer
      - description: Task Id
        in: path
        name: taskID
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/edgejobs.fileResponse'
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
        '503':
          description: Edge compute features are disabled
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Fetch the log for a specifc task on an EdgeJob
      tags:
      - edge_jobs
    post:
      description: '**Access policy**: administrator'
      operationId: EdgeJobTasksCollect
      parameters:
      - description: EdgeJob Id
        in: path
        name: id
        required: true
        schema:
          type: integer
      - description: Task Id
        in: path
        name: taskID
        required: true
        schema:
          type: integer
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
        '503':
          description: Edge compute features are disabled
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Collect the log for a specifc task on an EdgeJob
      tags:
      - edge_jobs
  /edge_jobs/create/file:
    post:
      description: '**Access policy**: administrator'
      operationId: EdgeJobCreateFile
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/portainer.EdgeGroup'
        '500':
          description: Internal Server Error
        '503':
          description: Edge compute features are disabled
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Create an EdgeJob from a file
      tags:
      - edge_jobs
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  description: Content of the Stack file
                  format: binary
                Name:
                  type: string
                  description: Name of the stack
                CronExpression:
                  type: string
                  description: A cron expression to schedule this job
                EdgeGroups:
                  type: string
                  description: JSON stringified array of Edge Groups ids
                Endpoints:
                  type: string
                  description: JSON stringified array of Environment ids
                Recurring:
                  type: boolean
                  description: If recurring
              required:
              - file
              - Name
              - CronExpression
              - EdgeGroups
              - Endpoints
  /edge_jobs/create/string:
    post:
      description: '**Access policy**: administrator'
      operationId: EdgeJobCreateString
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/portainer.EdgeGroup'
        '500':
          description: Internal Server Error
        '503':
          description: Edge compute features are disabled
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Create an EdgeJob from a text
      tags:
      - edge_jobs
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/edgejobs.edgeJobCreateFromFileContentPayload'
        description: EdgeGroup data when method is string
        required: true
components:
  schemas:
    roar.Roar-portainer_EndpointID:
      type: object
    edgejobs.edgeJobFileResponse:
      properties:
        FileContent:
          type: string
      type: object
    portainer.EdgeJobLogsStatus:
      enum:
      - 0
      - 1
      - 2
      - 3
      type: integer
      x-enum-varnames:
      - _
      - EdgeJobLogsStatusIdle
      - EdgeJobLogsStatusPending
      - EdgeJobLogsStatusCollected
    edgejobs.edgeJobCreateFromFileContentPayload:
      properties:
        CronExpression:
          type: string
        EdgeGroups:
          items:
            type: integer
          type: array
        Endpoints:
          items:
            type: integer
          type: array
        FileContent:
          type: string
        Name:
          type: string
        Recurring:
          type: boolean
      type: object
    edgejobs.taskContainer:
      properties:
        EndpointId:
          type: integer
        EndpointName:
          type: string
        Id:
          type: string
        LogsStatus:
          $ref: '#/components/schemas/portainer.EdgeJobLogsStatus'
      type: object
    edgejobs.fileResponse:
      properties:
        FileContent:
          type: string
      type: object
    portainer.EdgeJob:
      properties:
        Created:
          type: integer
        CronExpression:
          type: string
        EdgeGroups:
          items:
            type: integer
          type: array
        Endpoints:
          additionalProperties:
            $ref: '#/components/schemas/portainer.EdgeJobEndpointMeta'
          type: object
        GroupLogsCollection:
          additionalProperties:
            $ref: '#/components/schemas/portainer.EdgeJobEndpointMeta'
          description: Field used for log collection of Endpoints belonging to EdgeGroups
          type: object
        Id:
          description: EdgeJob Identifier
          example: 1
          type: integer
        Name:
          type: string
        Recurring:
          type: boolean
        ScriptPath:
          type: string
        Version:
          type: integer
      type: object
    portainer.EdgeJobEndpointMeta:
      properties:
        CollectLogs:
          type: boolean
        LogsStatus:
          $ref: '#/components/schemas/portainer.EdgeJobLogsStatus'
      type: object
    portainer.EdgeGroup:
      properties:
        Dynamic:
          type: boolean
        EndpointIds:
          $ref: '#/components/schemas/roar.Roar-portainer_EndpointID'
        Endpoints:
          description: 'Deprecated: only used for API responses'
          items:
            type: integer
          type: array
        Id:
          description: EdgeGroup Identifier
          example: 1
          type: integer
        Name:
          type: string
        PartialMatch:
          type: boolean
        TagIds:
          items:
            type: integer
          type: array
      type: object
    edgejobs.edgeJobUpdatePayload:
      properties:
        CronExpression:
          type: string
        EdgeGroups:
          items:
            type: integer
          type: array
        Endpoints:
          items:
            type: integer
          type: array
        FileContent:
          type: string
        Name:
          type: string
        Recurring:
          type: boolean
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: X-API-KEY
      type: apiKey
    jwt:
      in: header
      name: Authorization
      type: apiKey