Keycloak Workflows API

The Workflows API from Keycloak — 6 operation(s) for workflows.

GitHub OpenAPI

Operations 9

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 /admin/realms/{realm}/workflows List scheduled workflows in a realm · List workflows #
Ask an LLM
“Which workflows are scheduled in my realm?”
“Can I search a realm's workflows by name?”
Tell an agent
List workflows in realm {realm}.
Find workflows in {realm} matching {search}.
POST /admin/realms/{realm}/workflows Create a scheduled workflow · Create workflow #
Ask an LLM
“How do I schedule a new workflow in a realm?”
“Can a workflow run on a schedule and have a concurrency limit?”
Tell an agent
Create a workflow named {name} in realm {realm}.
Create workflow {name} in {realm} running on schedule {schedule} with concurrency {concurrency}.
POST /admin/realms/{realm}/workflows/migrate Migrate scheduled resources between workflow steps · Migrate scheduled resources from one step to another #
Ask an LLM
“How do I move scheduled resources from one workflow step to another?”
“Can I migrate scheduled items from an old step to a new one?”
Tell an agent
Migrate scheduled resources from step {from} to step {to} in realm {realm}.
Move scheduled items in {realm} from step {from} to step {to}.
GET /admin/realms/{realm}/workflows/scheduled/{resource-id} List workflows scheduled for a resource · List scheduled workflows for resource #
Ask an LLM
“Which workflows are scheduled for a particular user or client?”
“Can I see pending workflow steps for a resource?”
Tell an agent
List workflows scheduled for resource {resource} in realm {realm}.
Show pending workflow steps for {resource} in {realm}.
GET /admin/realms/{realm}/workflows/{id} Get a scheduled workflow · Get workflow #
Ask an LLM
“What is the schedule and steps of a specific workflow?”
“Can I fetch a workflow without its IDs?”
Tell an agent
Get workflow {id} in realm {realm}.
Show workflow {id} in {realm} with IDs {include}.
PUT /admin/realms/{realm}/workflows/{id} Update a scheduled workflow · Update workflow #
Ask an LLM
“How do I change the schedule of an existing workflow?”
“Can I pause a workflow without deleting it?”
Tell an agent
Update workflow {id} in realm {realm} to run on {schedule}.
Set workflow {id} in {realm} enabled to {enabled}.
DELETE /admin/realms/{realm}/workflows/{id} Delete a scheduled workflow · Delete workflow #
Ask an LLM
“How do I remove a workflow I no longer need?”
“Is deleting a workflow permanent?”
Tell an agent destructive · confirm first
Delete workflow {id} from realm {realm}.
Remove the {id} workflow in {realm}.
POST /admin/realms/{realm}/workflows/{id}/activate/{type}/{resourceId} Activate a workflow for a resource · Activate workflow for resource #
Ask an LLM
“How do I kick off a workflow for a user or client?”
“Can I schedule the first step of a workflow for later?”
Tell an agent
Activate workflow {id} for {type} {resource} in realm {realm}.
Start workflow {id} on {type} {resource} in {realm} not before {notBefore}.
POST /admin/realms/{realm}/workflows/{id}/deactivate/{type}/{resourceId} Deactivate a workflow for a resource · Deactivate workflow for resource #
Ask an LLM
“How do I stop a workflow from running on a resource?”
“Can I deactivate a workflow for a user without deleting it?”
Tell an agent
Deactivate workflow {id} for {type} {resource} in realm {realm}.
Stop workflow {id} on {type} {resource} in {realm}.

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/keycloak:keycloak-workflows-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

keycloak-workflows-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Keycloak Admin REST Workflows API
  description: This is a REST API reference for the Keycloak Admin REST API.
  version: '1.0'
tags:
- name: Workflows
paths:
  /admin/realms/{realm}/workflows:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    get:
      tags:
      - Workflows
      summary: List workflows
      description: List workflows filtered by name and paginated using first and max parameters.
      parameters:
      - name: exact
        in: query
        description: Boolean which defines whether the param 'search' must match exactly or not
        schema:
          type: boolean
      - name: first
        in: query
        description: The position of the first result to be processed (pagination offset)
        schema:
          format: int32
          default: '0'
          type: integer
      - name: max
        in: query
        description: The maximum number of results to be returned - defaults to 10
        schema:
          format: int32
          default: '10'
          type: integer
      - name: search
        in: query
        description: A String representing the workflow name - either partial or exact
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/WorkflowRepresentation'
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRepresentation'
        '400':
          description: Bad Request
      operationId: getAdminRealmsByRealmWorkflows
      x-operation-id-source: derived
    post:
      tags:
      - Workflows
      summary: Create workflow
      description: Create a new workflow from the provided representation.
      requestBody:
        content:
          application/yaml:
            schema:
              $ref: '#/components/schemas/WorkflowRepresentation'
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowRepresentation'
      responses:
        '201':
          description: Created
        '400':
          description: Bad Request
      operationId: postAdminRealmsByRealmWorkflows
      x-operation-id-source: derived
  /admin/realms/{realm}/workflows/migrate:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    post:
      tags:
      - Workflows
      summary: Migrate scheduled resources from one step to another
      description: Migrate scheduled resources from one step to another step in the same or in a different workflow.
      parameters:
      - name: from
        in: query
        description: A String representing the id of the step to migrate from
        schema:
          type: string
      - name: to
        in: query
        description: A String representing the id of the step to migrate to
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
      operationId: postAdminRealmsByRealmWorkflowsMigrate
      x-operation-id-source: derived
  /admin/realms/{realm}/workflows/scheduled/{resource-id}:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    get:
      tags:
      - Workflows
      summary: List scheduled workflows for resource
      description: Return workflows that have scheduled steps for the given resource identifier.
      parameters:
      - name: resource-id
        in: path
        description: Identifier of the resource associated with the scheduled workflows
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRepresentation'
        '400':
          description: Bad Request
      operationId: getAdminRealmsByRealmWorkflowsScheduledByResourceId
      x-operation-id-source: derived
  /admin/realms/{realm}/workflows/{id}:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: id
      in: path
      description: Workflow identifier
      required: true
      schema:
        type: string
    get:
      tags:
      - Workflows
      summary: Get workflow
      description: Get the workflow representation. Optionally exclude the workflow id from the response.
      parameters:
      - name: includeId
        in: query
        description: Indicates whether the workflow and step ids should be included in the representation or not - defaults to true
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/WorkflowRepresentation'
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRepresentation'
        '400':
          description: Bad Request
      operationId: getAdminRealmsByRealmWorkflowsById
      x-operation-id-source: derived
    put:
      tags:
      - Workflows
      summary: Update workflow
      description: Update the workflow configuration. This method does not update the workflow steps.
      requestBody:
        content:
          application/yaml:
            schema:
              $ref: '#/components/schemas/WorkflowRepresentation'
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowRepresentation'
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
      operationId: putAdminRealmsByRealmWorkflowsById
      x-operation-id-source: derived
    delete:
      tags:
      - Workflows
      summary: Delete workflow
      description: Delete the workflow and its configuration.
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
      operationId: deleteAdminRealmsByRealmWorkflowsById
      x-operation-id-source: derived
  /admin/realms/{realm}/workflows/{id}/activate/{type}/{resourceId}:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: id
      in: path
      description: Workflow identifier
      required: true
      schema:
        type: string
    post:
      tags:
      - Workflows
      summary: Activate workflow for resource
      description: Activate the workflow for the given resource type and identifier. Optionally schedule the first step using the notBefore parameter.
      parameters:
      - name: resourceId
        in: path
        description: Resource identifier
        required: true
        schema:
          type: string
      - name: type
        in: path
        description: Resource type
        required: true
        schema:
          type: object
      - name: notBefore
        in: query
        description: Optional value representing the time to schedule the first workflow step. The value is either an integer representing the seconds from now, an integer followed by 'ms' representing milliseconds from now, or an ISO-8601 date string.
        schema:
          type: string
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
      operationId: postAdminRealmsByRealmWorkflowsByIdActivateByTypeByResourceId
      x-operation-id-source: derived
  /admin/realms/{realm}/workflows/{id}/deactivate/{type}/{resourceId}:
    parameters:
    - name: realm
      in: path
      description: realm name (not id!)
      required: true
      schema:
        type: string
    - name: id
      in: path
      description: Workflow identifier
      required: true
      schema:
        type: string
    post:
      tags:
      - Workflows
      summary: Deactivate workflow for resource
      description: Deactivate the workflow for the given resource type and identifier.
      parameters:
      - name: resourceId
        in: path
        description: Resource identifier
        required: true
        schema:
          type: string
      - name: type
        in: path
        description: Resource type
        required: true
        schema:
          type: object
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
      operationId: postAdminRealmsByRealmWorkflowsByIdDeactivateByTypeByResourceId
      x-operation-id-source: derived
components:
  schemas:
    WorkflowStateRepresentation:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
    WorkflowScheduleRepresentation:
      type: object
      properties:
        after:
          type: string
        batch-size:
          format: int32
          type: integer
    WorkflowConcurrencyRepresentation:
      type: object
      properties:
        cancel-in-progress:
          type: string
        restart-in-progress:
          type: string
    WorkflowStepRepresentation:
      type: object
      properties:
        uses:
          type: string
        after:
          type: string
        scheduled-at:
          format: int64
          type: integer
        status:
          $ref: '#/components/schemas/StepExecutionStatus'
        id:
          type: string
        config:
          $ref: '#/components/schemas/MultivaluedHashMapStringString'
    WorkflowRepresentation:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        enabled:
          type: boolean
        'on':
          type: string
        schedule:
          $ref: '#/components/schemas/WorkflowScheduleRepresentation'
        concurrency:
          $ref: '#/components/schemas/WorkflowConcurrencyRepresentation'
        if:
          type: string
        steps:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowStepRepresentation'
        state:
          $ref: '#/components/schemas/WorkflowStateRepresentation'
        with:
          $ref: '#/components/schemas/MultivaluedHashMapStringString'
        cancelInProgress:
          type: string
        restartInProgress:
          type: string
    MultivaluedHashMapStringString:
      type: object
      additionalProperties:
        type: array
        items:
          type: string
    StepExecutionStatus:
      enum:
      - COMPLETED
      - PENDING
      type: string