GitLab CI/CD · Capability

GitLab API — migrations

GitLab API — migrations. 2 operations. Lead operation: migrations. Self-contained Naftiko capability covering one Gitlab Ci business surface.

Run with Naftiko Gitlab Cimigrations

What You Can Do

GET
Getapiv4adminmigrationspending — List pending database migrations
/v1/api/v4/admin/migrations/pending
POST
Postapiv4adminmigrationstimestampmark — Mark the migration as successfully executed
/v1/api/v4/admin/migrations/{timestamp}/mark

MCP Tools

list-pending-database-migrations

List pending database migrations

read-only idempotent
mark-migration-successfully-executed

Mark the migration as successfully executed

Capability Spec

gitlab-ci-migrations.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: GitLab API — migrations
  description: 'GitLab API — migrations. 2 operations. Lead operation: migrations. Self-contained Naftiko capability covering
    one Gitlab Ci business surface.'
  tags:
  - Gitlab Ci
  - migrations
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    GITLAB_CI_API_KEY: GITLAB_CI_API_KEY
capability:
  consumes:
  - type: http
    namespace: gitlab-ci-migrations
    baseUri: https://gitlab.com
    description: GitLab API — migrations business capability. Self-contained, no shared references.
    resources:
    - name: api-v4-admin-migrations-pending
      path: /api/v4/admin/migrations/pending
      operations:
      - name: getapiv4adminmigrationspending
        method: GET
        description: List pending database migrations
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: database
          in: query
          type: string
          description: The name of the database
    - name: api-v4-admin-migrations-timestamp-mark
      path: /api/v4/admin/migrations/{timestamp}/mark
      operations:
      - name: postapiv4adminmigrationstimestampmark
        method: POST
        description: Mark the migration as successfully executed
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: timestamp
          in: path
          type: integer
          description: The migration version timestamp
          required: true
        - name: postApiV4AdminMigrationsTimestampMark
          in: body
          type: string
          required: true
  exposes:
  - type: rest
    namespace: gitlab-ci-migrations-rest
    port: 8080
    description: REST adapter for GitLab API — migrations. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/v4/admin/migrations/pending
      name: api-v4-admin-migrations-pending
      description: REST surface for api-v4-admin-migrations-pending.
      operations:
      - method: GET
        name: getapiv4adminmigrationspending
        description: List pending database migrations
        call: gitlab-ci-migrations.getapiv4adminmigrationspending
        with:
          database: rest.database
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/v4/admin/migrations/{timestamp}/mark
      name: api-v4-admin-migrations-timestamp-mark
      description: REST surface for api-v4-admin-migrations-timestamp-mark.
      operations:
      - method: POST
        name: postapiv4adminmigrationstimestampmark
        description: Mark the migration as successfully executed
        call: gitlab-ci-migrations.postapiv4adminmigrationstimestampmark
        with:
          timestamp: rest.timestamp
          postApiV4AdminMigrationsTimestampMark: rest.postApiV4AdminMigrationsTimestampMark
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: gitlab-ci-migrations-mcp
    port: 9090
    transport: http
    description: MCP adapter for GitLab API — migrations. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: list-pending-database-migrations
      description: List pending database migrations
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gitlab-ci-migrations.getapiv4adminmigrationspending
      with:
        database: tools.database
      outputParameters:
      - type: object
        mapping: $.
    - name: mark-migration-successfully-executed
      description: Mark the migration as successfully executed
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gitlab-ci-migrations.postapiv4adminmigrationstimestampmark
      with:
        timestamp: tools.timestamp
        postApiV4AdminMigrationsTimestampMark: tools.postApiV4AdminMigrationsTimestampMark
      outputParameters:
      - type: object
        mapping: $.