{"meta":{"title":"Puntos de conexión de API de REST para flujos de trabajo","intro":"Usa la API de REST para interactuar con flujos de trabajo en GitHub Actions.","product":"REST API","breadcrumbs":[{"href":"/es/rest","title":"REST API"},{"href":"/es/rest/actions","title":"Acciones"},{"href":"/es/rest/actions/workflows","title":"Flujos de trabajo"}],"documentType":"article"},"body":"# Puntos de conexión de API de REST para flujos de trabajo\n\nUsa la API de REST para interactuar con flujos de trabajo en GitHub Actions.\n\n## Acerca de los flujos de trabajo de GitHub Actions\n\nPuedes usar la API de REST para ver flujos de trabajo de un repositorio en GitHub Actions. Los flujos de trabajo automatizan el ciclo de vida de tu desarrollo de software con una amplia gama de herramientas y servicios. Para más información, consulta la documentación de [Flujos de trabajo](/es/actions/using-workflows/about-workflows) en GitHub Actions.\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 repository workflows\n\n```\nGET /repos/{owner}/{repo}/actions/workflows\n```\n\nLists the workflows in 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### 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/workflows\n```\n\n**Response schema (Status: 200):**\n\n* `total_count`: required, integer\n* `workflows`: required, array of `Workflow`:\n  * `id`: required, integer\n  * `node_id`: required, string\n  * `name`: required, string\n  * `path`: required, string\n  * `state`: required, string, enum: `active`, `deleted`, `disabled_fork`, `disabled_inactivity`, `disabled_manually`\n  * `created_at`: required, string, format: date-time\n  * `updated_at`: required, string, format: date-time\n  * `url`: required, string\n  * `html_url`: required, string\n  * `badge_url`: required, string\n  * `deleted_at`: string, format: date-time\n\n## Get a workflow\n\n```\nGET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\n```\n\nGets a specific workflow. You can replace workflow\\_id with the workflow\nfile name. For example, you could use main.yaml.\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* **`workflow_id`** (string) (required)\n  The ID of the workflow. You can also pass the workflow file name as a string.\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/workflows/WORKFLOW_ID\n```\n\n**Response schema (Status: 200):**\n\n* `id`: required, integer\n* `node_id`: required, string\n* `name`: required, string\n* `path`: required, string\n* `state`: required, string, enum: `active`, `deleted`, `disabled_fork`, `disabled_inactivity`, `disabled_manually`\n* `created_at`: required, string, format: date-time\n* `updated_at`: required, string, format: date-time\n* `url`: required, string\n* `html_url`: required, string\n* `badge_url`: required, string\n* `deleted_at`: string, format: date-time\n\n## Disable a workflow\n\n```\nPUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\n```\n\nDisables a workflow and sets the state of the workflow to disabled\\_manually. You can replace workflow\\_id with the workflow file name. For example, you could use main.yaml.\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* **`workflow_id`** (string) (required)\n  The ID of the workflow. You can also pass the workflow file name as a string.\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 PUT \\\n  https://api.github.com/repos/OWNER/REPO/actions/workflows/WORKFLOW_ID/disable\n```\n\n**Response schema (Status: 204):**\n\n## Create a workflow dispatch event\n\n```\nPOST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\n```\n\nYou can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace workflow\\_id with the workflow file name. For example, you could use main.yaml.\nYou must configure your GitHub Actions workflow to run when the workflow\\_dispatch webhook event occurs. The inputs are configured in the workflow file. For more information about how to configure the workflow\\_dispatch event in the workflow file, see \"Events that trigger workflows.\"\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* **`workflow_id`** (string) (required)\n  The ID of the workflow. You can also pass the workflow file name as a string.\n\n#### Body parameters\n\n* **`ref`** (string) (required)\n  The git reference for the workflow. The reference can be a branch or tag name.\n\n* **`inputs`** (object)\n  Input keys and values configured in the workflow file. The maximum number of properties is 25. Any default properties configured in the workflow file will be used when inputs are omitted.\n\n### HTTP response status codes\n\n* **200** - Response including the workflow run ID and URLs.\n\n### Code examples\n\n#### Example\n\n**Request:**\n\n```curl\ncurl -L \\\n  -X POST \\\n  https://api.github.com/repos/OWNER/REPO/actions/workflows/WORKFLOW_ID/dispatches \\\n  -d '{\n  \"ref\": \"topic-branch\",\n  \"inputs\": {\n    \"name\": \"Mona the Octocat\",\n    \"home\": \"San Francisco, CA\"\n  }\n}'\n```\n\n**Response schema (Status: 200):**\n\n* `workflow_run_id`: required, integer, format: int64\n* `run_url`: required, string, format: uri\n* `html_url`: required, string, format: uri\n\n## Enable a workflow\n\n```\nPUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\n```\n\nEnables a workflow and sets the state of the workflow to active. You can replace workflow\\_id with the workflow file name. For example, you could use main.yaml.\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* **`workflow_id`** (string) (required)\n  The ID of the workflow. You can also pass the workflow file name as a string.\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 PUT \\\n  https://api.github.com/repos/OWNER/REPO/actions/workflows/WORKFLOW_ID/enable\n```\n\n**Response schema (Status: 204):**\n\n## Get workflow usage\n\n```\nGET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\n```\n\nWarning\n\nThis endpoint is in the process of closing down. Refer to \"Actions Get workflow usage and Get workflow run usage endpoints closing down\" for more information.\n\nGets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see \"Managing billing for GitHub Actions\".\nYou can replace workflow\\_id with the workflow file name. For example, you could use main.yaml.\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* **`workflow_id`** (string) (required)\n  The ID of the workflow. You can also pass the workflow file name as a string.\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/workflows/WORKFLOW_ID/timing\n```\n\n**Response schema (Status: 200):**\n\n* `billable`: required, object:\n  * `UBUNTU`: object:\n    * `total_ms`: integer\n  * `MACOS`: object:\n    * `total_ms`: integer\n  * `WINDOWS`: object:\n    * `total_ms`: integer"}