{"meta":{"title":"REST-API-Endpunkte für GitHub Actions Artefakte","intro":"Verwenden Sie die REST-API, um mit Artefakten in GitHub Actions zu interagieren.","product":"REST-API","breadcrumbs":[{"href":"/de/rest","title":"REST-API"},{"href":"/de/rest/actions","title":"Aktionen"},{"href":"/de/rest/actions/artifacts","title":"Artefakte"}],"documentType":"article"},"body":"# REST-API-Endpunkte für GitHub Actions Artefakte\n\nVerwenden Sie die REST-API, um mit Artefakten in GitHub Actions zu interagieren.\n\n## Informationen zu Artefakten in GitHub Actions\n\nSie können die REST-API verwenden, um Informationen zu Workflowartefakten herunterzuladen, zu löschen und abzurufen.GitHub Actions\n\nMit Artefakten kannst du Daten zwischen Aufträgen in einem Workflow teilen und Daten nach Abschluss des Workflows speichern. Weitere Informationen finden Sie unter [Speichern und Freigeben von Daten mit Workflowartefakten](/de/actions/tutorials/store-and-share-data).\n\n> \\[!NOTE]\n> Most endpoints use `Authorization: Bearer <YOUR-TOKEN>` and `Accept: application/vnd.github+json` headers, plus `X-GitHub-Api-Version: 2026-03-10`. Curl examples below omit these standard headers for brevity.\n\n## List artifacts for a repository\n\n```\nGET /repos/{owner}/{repo}/actions/artifacts\n```\n\nLists all artifacts for a repository.\nAnyone with read access to the repository can use this endpoint.\nOAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n* **`name`** (string)\n  The name field of an artifact. When specified, only artifacts with this name will be returned.\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/actions/artifacts\n```\n\n**Response schema (Status: 200):**\n\n* `total_count`: required, integer\n* `artifacts`: required, array of `Artifact`:\n  * `id`: required, integer\n  * `node_id`: required, string\n  * `name`: required, string\n  * `size_in_bytes`: required, integer\n  * `url`: required, string\n  * `archive_download_url`: required, string\n  * `expired`: required, boolean\n  * `created_at`: required, string or null, format: date-time\n  * `expires_at`: required, string or null, format: date-time\n  * `updated_at`: required, string or null, format: date-time\n  * `digest`: string or null\n  * `workflow_run`: object or null:\n    * `id`: integer\n    * `repository_id`: integer\n    * `head_repository_id`: integer\n    * `head_branch`: string\n    * `head_sha`: string\n\n## Get an artifact\n\n```\nGET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\n```\n\nGets a specific artifact for a workflow run.\nAnyone with read access to the repository can use this endpoint.\nIf the repository is private, OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`artifact_id`** (integer) (required)\n  The unique identifier of the artifact.\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/actions/artifacts/ARTIFACT_ID\n```\n\n**Response schema (Status: 200):**\n\n* `id`: required, integer\n* `node_id`: required, string\n* `name`: required, string\n* `size_in_bytes`: required, integer\n* `url`: required, string\n* `archive_download_url`: required, string\n* `expired`: required, boolean\n* `created_at`: required, string or null, format: date-time\n* `expires_at`: required, string or null, format: date-time\n* `updated_at`: required, string or null, format: date-time\n* `digest`: string or null\n* `workflow_run`: object or null:\n  * `id`: integer\n  * `repository_id`: integer\n  * `head_repository_id`: integer\n  * `head_branch`: string\n  * `head_sha`: string\n\n## Delete an artifact\n\n```\nDELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\n```\n\nDeletes an artifact for a workflow run.\nOAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`artifact_id`** (integer) (required)\n  The unique identifier of the artifact.\n\n### HTTP response status codes\n\n* **204** - No Content\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X DELETE \\\n  https://api.github.com/repos/OWNER/REPO/actions/artifacts/ARTIFACT_ID\n```\n\n**Response schema (Status: 204):**\n\n## Download an artifact\n\n```\nGET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\n```\n\nGets a redirect URL to download an archive for a repository. This URL expires after 1 minute. Look for Location: in\nthe response header to find the URL for the download. The :archive\\_format must be zip.\nOAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`artifact_id`** (integer) (required)\n  The unique identifier of the artifact.\n\n* **`archive_format`** (string) (required)\n\n### HTTP response status codes\n\n* **302** - Found\n\n* **410** - Gone\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/actions/artifacts/ARTIFACT_ID/ARCHIVE_FORMAT\n```\n\n**Response schema (Status: 302):**\n\n## List workflow run artifacts\n\n```\nGET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\n```\n\nLists artifacts for a workflow run.\nAnyone with read access to the repository can use this endpoint.\nOAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint with a private repository.\n\n### Parameters\n\n#### Headers\n\n* **`accept`** (string)\n  Setting to `application/vnd.github+json` is recommended.\n\n#### Path and query parameters\n\n* **`owner`** (string) (required)\n  The account owner of the repository. The name is not case sensitive.\n\n* **`repo`** (string) (required)\n  The name of the repository without the .git extension. The name is not case sensitive.\n\n* **`run_id`** (integer) (required)\n  The unique identifier of the workflow run.\n\n* **`per_page`** (integer)\n  The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"\n  Default: `30`\n\n* **`page`** (integer)\n  The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"\n  Default: `1`\n\n* **`name`** (string)\n  The name field of an artifact. When specified, only artifacts with this name will be returned.\n\n* **`direction`** (string)\n  The direction to sort the results by.\n  Default: `desc`\n  Can be one of: `asc`, `desc`\n\n### HTTP response status codes\n\n* **200** - OK\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X GET \\\n  https://api.github.com/repos/OWNER/REPO/actions/runs/RUN_ID/artifacts\n```\n\n**Response schema (Status: 200):**\n\nSame response schema as [List artifacts for a repository](#list-artifacts-for-a-repository)."}