{
  "slug": "glab-api-supports-multipart-form-data-with-form-2c8df36aced3",
  "title": "glab api supports multipart/form-data with --form",
  "tools": [
    "glab"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-04-01T18:02:45.764Z",
  "announced_at": "2026-04-01T18:02:45.764Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When an API endpoint requires multipart/form-data, use `glab api` with `--form` fields; file values use `@<path>`.",
    "examples": [
      "glab api --method POST projects/:fullpath/wikis/attachments --form \"file=@./image.png\" --form \"branch=main\""
    ],
    "gotchas": [
      "Version: v1.91.0",
      "--method <method>: HTTP method; defaults to GET without parameters and POST when parameters are added. The example specifies POST.",
      "<endpoint> (required): GitLab API v4 endpoint path, or `graphql`; `:fullpath` expands to the current repository's full path.",
      "--form <key=value> (required): Add a multipart form field; repeat for additional fields. Changes the default HTTP method to POST. Prefix a file value with `@` and its path; use `@-` for stdin at most once. Do not combine with `--field`, `--raw-field`, or `--input`.",
      "Prerequisite: Authenticate `glab` with GitLab; in a Git directory, the command uses that directory's authenticated host."
    ]
  },
  "why_it_matters": "Send multipart form data to a GitLab API endpoint while working with a repository.",
  "sources": [
    "https://gitlab.com/gitlab-org/cli/-/releases/v1.91.0",
    "https://docs.gitlab.com/cli/api/",
    "https://docs.gitlab.com/cli/"
  ],
  "rank": 0.96034,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-12bafe50dc578ab5-1:gate",
    "evidence_hash": "ae52c0a7ee07f6a3c52d4f7d927889170dade56dfa0459b3628da614234988be"
  },
  "review": {
    "draft_hash": "bcb17347cf0d411e3f82acc6d0e827039e5ea43857e6d29b3f142f26521077d0",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.96 >= 0.9; 2 needed) and Jev gave 0.70 (>= 0.6 needed)."
  }
}
