{"id":22128613,"url":"https://github.com/redhat-plumbers-in-action/testing-farm","last_synced_at":"2025-07-28T09:34:20.949Z","repository":{"id":146856814,"uuid":"618291045","full_name":"redhat-plumbers-in-action/testing-farm","owner":"redhat-plumbers-in-action","description":"🚜 A NodeJS module to access Testing Farm instances through the REST API. ","archived":false,"fork":false,"pushed_at":"2024-11-01T12:04:11.000Z","size":4854,"stargazers_count":1,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-29T19:36:57.194Z","etag":null,"topics":["api-client","testing","testing-farm","typesafe","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/testing-farm","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redhat-plumbers-in-action.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-24T06:39:02.000Z","updated_at":"2024-11-01T12:03:49.000Z","dependencies_parsed_at":"2023-09-22T02:51:37.091Z","dependency_job_id":"1dd8caee-0ff4-457b-b025-e983fc21a442","html_url":"https://github.com/redhat-plumbers-in-action/testing-farm","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-plumbers-in-action%2Ftesting-farm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-plumbers-in-action%2Ftesting-farm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-plumbers-in-action%2Ftesting-farm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redhat-plumbers-in-action%2Ftesting-farm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redhat-plumbers-in-action","download_url":"https://codeload.github.com/redhat-plumbers-in-action/testing-farm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227606203,"owners_count":17792786,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","testing","testing-farm","typesafe","typescript"],"created_at":"2024-12-01T17:46:16.156Z","updated_at":"2024-12-01T17:46:17.085Z","avatar_url":"https://github.com/redhat-plumbers-in-action.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Testing Farm\n\n[![npm version][npm-status]][npm] [![Tests][test-status]][test] [![Linters][lint-status]][lint] [![CodeQL][codeql-status]][codeql] [![codecov][codecov-status]][codecov]\n\n[npm]: https://www.npmjs.com/package/testing-farm\n[npm-status]: https://badgen.net/npm/v/testing-farm\n\n[test]: https://github.com/redhat-plumbers-in-action/testing-farm/actions/workflows/tests.yml\n[test-status]: https://github.com/redhat-plumbers-in-action/testing-farm/actions/workflows/tests.yml/badge.svg\n\n[lint]: https://github.com/redhat-plumbers-in-action/testing-farm/actions/workflows/lint.yml\n[lint-status]: https://github.com/redhat-plumbers-in-action/testing-farm/actions/workflows/lint.yml/badge.svg\n\n[codeql]: https://github.com/redhat-plumbers-in-action/testing-farm/actions/workflows/codeql-analysis.yml\n[codeql-status]: https://github.com/redhat-plumbers-in-action/testing-farm/actions/workflows/codeql-analysis.yml/badge.svg\n\n[codecov]: https://app.codecov.io/gh/redhat-plumbers-in-action/testing-farm\n[codecov-status]: https://codecov.io/github/redhat-plumbers-in-action/testing-farm/branch/main/graph/badge.svg?token=EqTfXgwKz2\n\nTypesafe access to [Testing Farm's REST API](https://api.dev.testing-farm.io/redoc).\n\n## API\n\n### Creating the API instance\n\n```typescript\nimport TestingFarmAPI from \"testing-farm\";\n\nconst api = new TestingFarmAPI(\"https://api.dev.testing-farm.io/v0.1\", \"api-key\");\n\n// Passing api key in data - not recommended\nconst api = new TestingFarmAPI(\"https://api.dev.testing-farm.io/v0.1\");\n\nawait api.about();\n```\n\n\u003e [!WARNING]\n\u003e\n\u003e Passing the API key in request body is deprecated and not recommended. It is better to pass it in the constructor.\n\u003e This way the API key will be passed in the request header as part of `Authorization` header.\n\n### List a Test Requests\n\ndocumentation of - [`GET /requests`](https://api.dev.testing-farm.io/redoc#operation/get_test_requests_v0_1_requests_get)\n\n```typescript\nconst queryParams = { /* https://api.dev.testing-farm.io/redoc#operation/get_test_requests_v0_1_requests_get */ }\n\nconst requests: Requests[] = await api.requests(queryParams);\nconst requests: unknown = await api.requests(queryParams, false);\n```\n\n### Request a New Test\n\ndocumentation of - [`POST /requests`](https://api.dev.testing-farm.io/redoc#operation/request_a_new_test_v0_1_requests_post)\n\n```typescript\nconst request = { /* https://api.dev.testing-farm.io/redoc#operation/request_a_new_test_v0_1_requests_post */ }\n\nconst response: NewRequestResponse = await api.newRequest(request);\nconst response: unknown = await api.newRequest(request, false);\nconst response: unknown = await api.unsafeNewRequest(request /* unknown type */);\n```\n\n### Test Request Details\n\ndocumentation of - [`GET /requests/{request_id}`](https://api.dev.testing-farm.io/redoc#operation/test_request_details_v0_1_requests__request_id__get)\n\n```typescript\nconst details: Request = await api.requestDetails('test-id');\nconst details: unknown = await api.requestDetails('test-id', false);\n```\n\n### Cancel a Test Request\n\ndocumentation of - [`DELETE /requests/{request_id}`](https://api.dev.testing-farm.io/redoc#operation/delete_test_request_v0_1_requests__request_id__delete)\n\n```typescript\nconst response: CancelRequestResponse = await cancelRequest('test-id');\nconst response: unknown = await cancelRequest('test-id', false);\n```\n\n### Composes Public Ranch\n\ndocumentation of - [`GET /composes`](https://api.dev.testing-farm.io/redoc#operation/supported_composes_v0_1_composes_get)\n\n```typescript\nconst composes: Composes = await api.composes();\nconst composes: unknown = await api.composes(false);\n```\n\n### Composes\n\ndocumentation of - [`GET /composes/{ranch}`](https://api.dev.testing-farm.io/redoc#operation/supported_composes_v0_1_composes_get)\n\n```typescript\nconst composes: Composes = await api.ranchComposes('public');\nconst composes: unknown = await api.ranchComposes('public', false);\n```\n\n### About Testing Farm\n\ndocumentation of - [`GET /about`](https://api.dev.testing-farm.io/redoc#operation/get_about_v0_1_about_get)\n\n```typescript\nconst about: About = await api.about();\nconst about: unknown = await api.about(false);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-plumbers-in-action%2Ftesting-farm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredhat-plumbers-in-action%2Ftesting-farm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredhat-plumbers-in-action%2Ftesting-farm/lists"}