> ## Documentation Index
> Fetch the complete documentation index at: https://docs-stg.outerlayer.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List the automations that need the calling member

> Lists the factory's custom automations whose state needs the calling member: `waiting` (a run has waited for a runner for an hour or more), `failing` (the last run failed) or `switched-off` (OuterLayer switched a schedule automation off). An automation is in at most one state, and `failing` outranks `waiting`. The list holds an automation only when its notices go to the caller: to its creator while the creator is an active member who holds `factory.update`, and otherwise to the factory's owners and admins. A row leaves the list when its state ends. A caller that is no member gets an empty list.



## OpenAPI

````yaml /openapi.yaml get /v1/apps/{appId}/automation-notices
openapi: 3.0.3
info:
  contact:
    email: hello@outerlayer.ai
    url: https://www.outerlayer.ai
  description: >-
    The OuterLayer Gateway API lets you ingest coding-agent sessions and record
    evidence of work programmatically.


    Most teams reach it through the `outerlayer` CLI, which calls it for them.

    Call it directly to build your own integration or to automate what the
    dashboard does.


    Versioning: every endpoint is prefixed with `/v1/`. Breaking changes ship
    under a new version prefix (`/v2/`, etc.) with a 90-day-minimum deprecation
    window; anything additive lands on the current prefix.


    Vocabulary: the dashboard calls this API's `app` a **factory** — the unit
    that owns a set of repositories, the agent sessions worked on them, and the
    evidence they produce. They are the same entity. The API keeps `app` in its
    paths, headers, and field names because those are a published contract; only
    the product surface was renamed.
  title: OuterLayer Gateway API
  version: '1.0'
servers:
  - description: Production (OuterLayer Cloud)
    url: https://api.outerlayer.ai
  - description: Local dev server (self-hosted gateway)
    url: http://localhost:9418
security:
  - AppId: []
    BearerAuth: []
tags:
  - description: >-
      What a CLI login token can read about its owner without naming a factory,
      such as the factories they can use.
    name: Account
  - description: >-
      The route a fleet machine asks for its next managed build on. A fleet
      machine is a machine OuterLayer operates.
    name: Fleet
  - description: >-
      The CLI version a gateway names to its runners, set with the gateway's
      runner version key.
    name: Runner version
  - description: >-
      Coding-agent session ingest (outerlayer sync) and content-addressed
      session images.
    name: Agents
  - description: >-
      Evidence artifacts (screenshots, recordings, reports, logs) emitted as
      proof of a change and anchored to pull requests.
    name: Artifacts
  - description: >-
      Pass/fail outcomes of checks run in your own CI or compute, anchored to
      pull requests with the run URL as proof.
    name: Emitted Results
  - description: >-
      The acceptance criteria of a work item, recorded as one list. The Criteria
      tab, its count and the item status read that list.
    name: Criteria
  - description: >-
      What any agent found wrong about a change under review or about a rule it
      ran on, recorded on a work item.
    name: Findings
  - description: >-
      Find, file and edit the issue a spec lives in, through OuterLayer, with no
      tracker credential on the caller's side.
    name: Specs
  - description: >-
      Add or remove a source's statement that it is working on an issue or pull
      request, and read what is currently live.
    name: Work Items
  - description: >-
      What the factory's GitHub App installation lets builds do on each
      connected repository, and whether each default branch requires a pull
      request.
    name: Repositories
  - description: >-
      The runs of a schedule automation: a runner claims a run, asks for its
      read token and ends it, and the run's agent reports each issue it found or
      that it found nothing.
    name: Schedule runs
  - description: >-
      A runner host's heartbeat — its CLI version, slots and last request for
      work — and the factory's list of hosts with a derived status.
    name: Hosts
  - description: Query server feature availability.
    name: Capabilities
  - description: Per-model LLM pricing data. Public, unauthenticated.
    name: Pricing
  - description: >-
      Create, list, and revoke factory API keys. Plaintext returned exactly once
      at creation.
    name: API Keys
  - description: >-
      Factory CRUD — a factory is owned by an organization and is the unit every
      other resource hangs off. Lets a headless agent provision one without the
      dashboard.
    name: Apps
  - description: >-
      Agent-coding session list and full transcript reads, with actor-privacy
      controls for machine keys.
    name: Sessions
  - description: >-
      Per-model token spend and fleet-wide agent behavior tiles, including
      two-window comparisons.
    name: Metrics
  - description: Synced-commit history of the app's `.outerlayer/` context tree.
    name: Context
  - description: >-
      Session→PR attribution: which agent sessions produced which pull requests,
      and what each attributed PR cost.
    name: PRs
  - description: Service health checks.
    name: Health
  - description: >-
      Org member and role administration, authenticated with an org-scoped
      management API key (`olk_…`) minted in the dashboard's settings.
    name: Org Management
  - description: OAuth 2.1 discovery metadata for MCP connector clients.
    name: OAuth
paths:
  /v1/apps/{appId}/automation-notices:
    get:
      tags:
        - Apps
      summary: List the automations that need the calling member
      description: >-
        Lists the factory's custom automations whose state needs the calling
        member: `waiting` (a run has waited for a runner for an hour or more),
        `failing` (the last run failed) or `switched-off` (OuterLayer switched a
        schedule automation off). An automation is in at most one state, and
        `failing` outranks `waiting`. The list holds an automation only when its
        notices go to the caller: to its creator while the creator is an active
        member who holds `factory.update`, and otherwise to the factory's owners
        and admins. A row leaves the list when its state ends. A caller that is
        no member gets an empty list.
      operationId: list-automation-notices
      parameters:
        - in: path
          name: appId
          required: true
          schema:
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      properties:
                        automationId:
                          format: uuid
                          type: string
                        name:
                          type: string
                        notice:
                          oneOf:
                            - properties:
                                at:
                                  description: When OuterLayer switched the automation off.
                                  type: string
                                reason:
                                  description: >-
                                    `failed_runs`: five runs in a row failed.
                                    `no_runner`: no runner took a run in 7 days.
                                  enum:
                                    - failed_runs
                                    - no_runner
                                  type: string
                                state:
                                  enum:
                                    - switched-off
                                  type: string
                              required:
                                - state
                                - reason
                                - at
                              type: object
                            - properties:
                                count:
                                  description: The failed runs in a row.
                                  minimum: 1
                                  type: integer
                                detail:
                                  description: >-
                                    The values the reason's sentence needs, from
                                    the last failed run.
                                  properties:
                                    attempt:
                                      description: >-
                                        The attempt number of a build that Fix
                                        failed checks started.
                                      minimum: 1
                                      type: integer
                                    baseBranch:
                                      description: The branch the conflict is with.
                                      maxLength: 255
                                      type: string
                                    commit:
                                      description: The commit a code review covers.
                                      pattern: ^[0-9a-f]{40}$
                                      type: string
                                    limit:
                                      type: integer
                                    memberName:
                                      type: string
                                    notSent:
                                      description: >-
                                        Why comments of a GitHub review did not
                                        go to the agent, with a count for each
                                        reason.
                                      items:
                                        properties:
                                          count:
                                            minimum: 1
                                            type: integer
                                          reason:
                                            enum:
                                              - aside
                                              - no_mention
                                              - comment_review_no_mention
                                            type: string
                                        required:
                                          - reason
                                          - count
                                        type: object
                                      type: array
                                    problems:
                                      description: The problems a code review found.
                                      minimum: 0
                                      type: integer
                                    refusal:
                                      description: >-
                                        The code the gateway gave when it
                                        refused the claim.
                                      enum:
                                        - pull_request_from_fork
                                        - pull_request_on_default_branch
                                        - pull_request_ambiguous
                                        - pull_request_repository_not_connected
                                        - repository_not_reachable
                                        - branch_claimed_elsewhere
                                      type: string
                                    sent:
                                      description: >-
                                        The comments of a GitHub review that
                                        went to the agent.
                                      minimum: 0
                                      type: integer
                                    step:
                                      type: string
                                    total:
                                      description: The comments of a GitHub review.
                                      minimum: 0
                                      type: integer
                                  type: object
                                failedAt:
                                  description: >-
                                    When the last failed run was logged. `null`
                                    when none is stored.
                                  nullable: true
                                  type: string
                                reason:
                                  description: >-
                                    The reason of the last failed run, a code
                                    from the run log list in
                                    `@outerlayer/automations`. `null` when no
                                    failed run is stored any more.
                                  nullable: true
                                  type: string
                                state:
                                  enum:
                                    - failing
                                  type: string
                                waiting:
                                  description: >-
                                    For a run that failed at the 7 day deadline,
                                    why no runner took it. `null` for any other
                                    failure.
                                  nullable: true
                                  properties:
                                    hosts:
                                      description: >-
                                        The runners that take the run, each with
                                        its state. Set only for
                                        `runners-unavailable`.
                                      items:
                                        properties:
                                          host:
                                            description: The runner's name.
                                            type: string
                                          state:
                                            description: Why the runner takes no new work.
                                            enum:
                                              - draining
                                              - restarting
                                              - holding-for-update
                                              - blocked
                                              - low-disk
                                              - outdated
                                            type: string
                                          version:
                                            description: >-
                                              For `outdated`, the version the runner
                                              runs.
                                            type: string
                                        required:
                                          - host
                                          - state
                                        type: object
                                      type: array
                                    reason:
                                      description: >-
                                        `no-runner`: no runner of the factory
                                        has checked in within three of its poll
                                        intervals. `no-taker`: a runner is
                                        running, but none takes the runs of this
                                        repository. `runners-unavailable`: the
                                        runners that take the run are all
                                        unavailable. `waiting-for-runner`: a
                                        runner that takes the run is available.
                                      enum:
                                        - no-runner
                                        - no-taker
                                        - runners-unavailable
                                        - waiting-for-runner
                                      type: string
                                  required:
                                    - reason
                                  type: object
                              required:
                                - state
                                - count
                                - reason
                                - detail
                                - waiting
                                - failedAt
                              type: object
                            - properties:
                                runId:
                                  format: uuid
                                  type: string
                                since:
                                  description: When the pending run was created.
                                  type: string
                                state:
                                  enum:
                                    - waiting
                                  type: string
                                waiting:
                                  description: Why no runner takes the pending run now.
                                  properties:
                                    hosts:
                                      description: >-
                                        The runners that take the run, each with
                                        its state. Set only for
                                        `runners-unavailable`.
                                      items:
                                        properties:
                                          host:
                                            description: The runner's name.
                                            type: string
                                          state:
                                            description: Why the runner takes no new work.
                                            enum:
                                              - draining
                                              - restarting
                                              - holding-for-update
                                              - blocked
                                              - low-disk
                                              - outdated
                                            type: string
                                          version:
                                            description: >-
                                              For `outdated`, the version the runner
                                              runs.
                                            type: string
                                        required:
                                          - host
                                          - state
                                        type: object
                                      type: array
                                    reason:
                                      enum:
                                        - no-runner
                                        - no-taker
                                        - runners-unavailable
                                      type: string
                                  required:
                                    - reason
                                  type: object
                              required:
                                - state
                                - waiting
                                - runId
                                - since
                              type: object
                        noticesTo:
                          enum:
                            - creator
                            - admins
                          type: string
                        triggerType:
                          enum:
                            - issue_opened
                            - issue_labeled
                            - webhook
                            - schedule
                          type: string
                      required:
                        - automationId
                        - name
                        - triggerType
                        - noticesTo
                        - notice
                      type: object
                    type: array
                required:
                  - data
                type: object
          description: The automations that need the caller.
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Invalid request parameters (validation failed).
        '401':
          content:
            application/json:
              schema:
                properties:
                  error:
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Missing or invalid API key.
        '403':
          content:
            application/json:
              schema:
                properties:
                  error:
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                    type: object
                required:
                  - error
                type: object
          description: Caller lacks 'factory.read' permission.
components:
  securitySchemes:
    AppId:
      description: Factory id the request is scoped to.
      in: header
      name: X-Outerlayer-App-Id
      type: apiKey
    BearerAuth:
      description: API key (sk_outerlayer_*)
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.