# Qase API v1 Client

Qase TestOps API v1 Specification.

This TypeScript/JavaScript package is automatically generated by the OpenAPI Generator project:

* API version: 1.0.0
* Package version: 1.0.0
* Generator version: 7.4.0
* Build package: org.openapitools.codegen.languages.TypeScriptAxiosClientCodegen

For more information, please visit [https://qase.io](https://qase.io)

## Requirements

* Node.js >= 14.0.0
* npm >= 6.0.0

## Installation & Usage

### npm install

```bash
npm install qase-api-client
```

### yarn install

```bash
yarn add qase-api-client
```

Then import the package:

```typescript
import { ResultApi } from 'qase-api-client';
```

## Getting Started

Please follow the installation procedure and then run the following:

```typescript
import { RunsApi, Configuration } from 'qase-api-client';

// Defining the host is optional and defaults to https://api.qase.io/v2
// See configuration.ts for a list of all supported configuration parameters.
const configuration = new Configuration({
    basePath: "https://api.qase.io/v1"
});

// The client must configure the authentication and authorization parameters
// in accordance with the API server security policy.
// Examples for each auth method are provided below, use the example that
// satisfies your auth use case.

// Configure API key authorization: TokenAuth
configuration.apiKey = process.env.API_KEY;

// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// configuration.apiKeyPrefix = 'Bearer';

// Create an instance of the API class
const qaseApi = new RunsApi(configuration);

// Create test run
try {
    const run = {
        title: 'Regression Test Run',
        description: 'Full regression testing before release',
        cases: [1, 2, 3, 4, 5],
        environment_id: 1,
        milestone_id: 1,
        tags: ['regression', 'release']
    };

    const response = await api.createRun('PROJECT_CODE', run);
    console.log(`Created test run with ID: ${response.result.id}`);
} catch (error) {
    console.error('Error creating run:', error);
}
```

## Documentation for API Endpoints

All URIs are relative to *<https://api.qase.io/v1>*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AttachmentsApi* | [**deleteattachment**](docs/AttachmentsApi.md#deleteattachment) | **DELETE** /attachment/{hash} | Remove attachment by Hash
*AttachmentsApi* | [**getattachment**](docs/AttachmentsApi.md#getattachment) | **GET** /attachment/{hash} | Get attachment by Hash
*AttachmentsApi* | [**getattachments**](docs/AttachmentsApi.md#getattachments) | **GET** /attachment | Get all attachments
*AttachmentsApi* | [**uploadattachment**](docs/AttachmentsApi.md#uploadattachment) | **POST** /attachment/{code} | Upload attachment
*AuthorsApi* | [**getauthor**](docs/AuthorsApi.md#getauthor) | **GET** /author/{id} | Get a specific author
*AuthorsApi* | [**getauthors**](docs/AuthorsApi.md#getauthors) | **GET** /author | Get all authors
*CasesApi* | [**bulk**](docs/CasesApi.md#bulk) | **POST** /case/{code}/bulk | Create test cases in bulk
*CasesApi* | [**caseattachexternalissue**](docs/CasesApi.md#caseattachexternalissue) | **POST** /case/{code}/external-issue/attach | Attach the external issues to the test cases
*CasesApi* | [**casedetachexternalissue**](docs/CasesApi.md#casedetachexternalissue) | **POST** /case/{code}/external-issue/detach | Detach the external issues from the test cases
*CasesApi* | [**createcase**](docs/CasesApi.md#createcase) | **POST** /case/{code} | Create a new test case
*CasesApi* | [**deletecase**](docs/CasesApi.md#deletecase) | **DELETE** /case/{code}/{id} | Delete test case
*CasesApi* | [**getcase**](docs/CasesApi.md#getcase) | **GET** /case/{code}/{id} | Get a specific test case
*CasesApi* | [**getcases**](docs/CasesApi.md#getcases) | **GET** /case/{code} | Get all test cases
*CasesApi* | [**updatecase**](docs/CasesApi.md#updatecase) | **PATCH** /case/{code}/{id} | Update test case
*ConfigurationsApi* | [**createconfiguration**](docs/ConfigurationsApi.md#createconfiguration) | **POST** /configuration/{code} | Create a new configuration in a particular group.
*ConfigurationsApi* | [**createconfigurationgroup**](docs/ConfigurationsApi.md#createconfigurationgroup) | **POST** /configuration/{code}/group | Create a new configuration group.
*ConfigurationsApi* | [**getconfigurations**](docs/ConfigurationsApi.md#getconfigurations) | **GET** /configuration/{code} | Get all configuration groups with configurations.
*CustomFieldsApi* | [**createcustomfield**](docs/CustomFieldsApi.md#createcustomfield) | **POST** /customfield | Create new Custom Field
*CustomFieldsApi* | [**deletecustomfield**](docs/CustomFieldsApi.md#deletecustomfield) | **DELETE** /customfield/{id} | Delete Custom Field by id
*CustomFieldsApi* | [**getcustomfield**](docs/CustomFieldsApi.md#getcustomfield) | **GET** /customfield/{id} | Get Custom Field by id
*CustomFieldsApi* | [**getcustomfields**](docs/CustomFieldsApi.md#getcustomfields) | **GET** /customfield | Get all Custom Fields
*CustomFieldsApi* | [**updatecustomfield**](docs/CustomFieldsApi.md#updatecustomfield) | **PATCH** /customfield/{id} | Update Custom Field by id
*DefectsApi* | [**createdefect**](docs/DefectsApi.md#createdefect) | **POST** /defect/{code} | Create a new defect
*DefectsApi* | [**deletedefect**](docs/DefectsApi.md#deletedefect) | **DELETE** /defect/{code}/{id} | Delete defect
*DefectsApi* | [**getdefect**](docs/DefectsApi.md#getdefect) | **GET** /defect/{code}/{id} | Get a specific defect
*DefectsApi* | [**getdefects**](docs/DefectsApi.md#getdefects) | **GET** /defect/{code} | Get all defects
*DefectsApi* | [**resolvedefect**](docs/DefectsApi.md#resolvedefect) | **PATCH** /defect/{code}/resolve/{id} | Resolve a specific defect
*DefectsApi* | [**updatedefect**](docs/DefectsApi.md#updatedefect) | **PATCH** /defect/{code}/{id} | Update defect
*DefectsApi* | [**updatedefectstatus**](docs/DefectsApi.md#updatedefectstatus) | **PATCH** /defect/{code}/status/{id} | Update a specific defect status
*EnvironmentsApi* | [**createenvironment**](docs/EnvironmentsApi.md#createenvironment) | **POST** /environment/{code} | Create a new environment
*EnvironmentsApi* | [**deleteenvironment**](docs/EnvironmentsApi.md#deleteenvironment) | **DELETE** /environment/{code}/{id} | Delete environment
*EnvironmentsApi* | [**getenvironment**](docs/EnvironmentsApi.md#getenvironment) | **GET** /environment/{code}/{id} | Get a specific environment
*EnvironmentsApi* | [**getenvironments**](docs/EnvironmentsApi.md#getenvironments) | **GET** /environment/{code} | Get all environments
*EnvironmentsApi* | [**updateenvironment**](docs/EnvironmentsApi.md#updateenvironment) | **PATCH** /environment/{code}/{id} | Update environment
*MilestonesApi* | [**createmilestone**](docs/MilestonesApi.md#createmilestone) | **POST** /milestone/{code} | Create a new milestone
*MilestonesApi* | [**deletemilestone**](docs/MilestonesApi.md#deletemilestone) | **DELETE** /milestone/{code}/{id} | Delete milestone
*MilestonesApi* | [**getmilestone**](docs/MilestonesApi.md#getmilestone) | **GET** /milestone/{code}/{id} | Get a specific milestone
*MilestonesApi* | [**getmilestones**](docs/MilestonesApi.md#getmilestones) | **GET** /milestone/{code} | Get all milestones
*MilestonesApi* | [**updatemilestone**](docs/MilestonesApi.md#updatemilestone) | **PATCH** /milestone/{code}/{id} | Update milestone
*PlansApi* | [**createplan**](docs/PlansApi.md#createplan) | **POST** /plan/{code} | Create a new plan
*PlansApi* | [**deleteplan**](docs/PlansApi.md#deleteplan) | **DELETE** /plan/{code}/{id} | Delete plan
*PlansApi* | [**getplan**](docs/PlansApi.md#getplan) | **GET** /plan/{code}/{id} | Get a specific plan
*PlansApi* | [**getplans**](docs/PlansApi.md#getplans) | **GET** /plan/{code} | Get all plans
*PlansApi* | [**updateplan**](docs/PlansApi.md#updateplan) | **PATCH** /plan/{code}/{id} | Update plan
*ProjectsApi* | [**createproject**](docs/ProjectsApi.md#createproject) | **POST** /project | Create new project
*ProjectsApi* | [**deleteproject**](docs/ProjectsApi.md#deleteproject) | **DELETE** /project/{code} | Delete Project by code
*ProjectsApi* | [**getproject**](docs/ProjectsApi.md#getproject) | **GET** /project/{code} | Get Project by code
*ProjectsApi* | [**getprojects**](docs/ProjectsApi.md#getprojects) | **GET** /project | Get All Projects
*ProjectsApi* | [**grantaccesstoproject**](docs/ProjectsApi.md#grantaccesstoproject) | **POST** /project/{code}/access | Grant access to project by code
*ProjectsApi* | [**revokeaccesstoproject**](docs/ProjectsApi.md#revokeaccesstoproject) | **DELETE** /project/{code}/access | Revoke access to project by code
*ResultsApi* | [**createresult**](docs/ResultsApi.md#createresult) | **POST** /result/{code}/{id} | Create test run result
*ResultsApi* | [**createresultbulk**](docs/ResultsApi.md#createresultbulk) | **POST** /result/{code}/{id}/bulk | Bulk create test run result
*ResultsApi* | [**deleteresult**](docs/ResultsApi.md#deleteresult) | **DELETE** /result/{code}/{id}/{hash} | Delete test run result
*ResultsApi* | [**getresult**](docs/ResultsApi.md#getresult) | **GET** /result/{code}/{hash} | Get test run result by code
*ResultsApi* | [**getresults**](docs/ResultsApi.md#getresults) | **GET** /result/{code} | Get all test run results
*ResultsApi* | [**updateresult**](docs/ResultsApi.md#updateresult) | **PATCH** /result/{code}/{id}/{hash} | Update test run result
*RunsApi* | [**completerun**](docs/RunsApi.md#completerun) | **POST** /run/{code}/{id}/complete | Complete a specific run
*RunsApi* | [**createrun**](docs/RunsApi.md#createrun) | **POST** /run/{code} | Create a new run
*RunsApi* | [**deleterun**](docs/RunsApi.md#deleterun) | **DELETE** /run/{code}/{id} | Delete run
*RunsApi* | [**getrun**](docs/RunsApi.md#getrun) | **GET** /run/{code}/{id} | Get a specific run
*RunsApi* | [**getruns**](docs/RunsApi.md#getruns) | **GET** /run/{code} | Get all runs
*RunsApi* | [**updaterunpublicity**](docs/RunsApi.md#updaterunpublicity) | **PATCH** /run/{code}/{id}/public | Update publicity of a specific run
*SearchApi* | [**search**](docs/SearchApi.md#search) | **GET** /search | Search entities by Qase Query Language (QQL)
*SharedStepsApi* | [**createsharedstep**](docs/SharedStepsApi.md#createsharedstep) | **POST** /sharedstep/{code} | Create a new shared step
*SharedStepsApi* | [**deletesharedstep**](docs/SharedStepsApi.md#deletesharedstep) | **DELETE** /sharedstep/{code}/{hash} | Delete shared step
*SharedStepsApi* | [**getsharedstep**](docs/SharedStepsApi.md#getsharedstep) | **GET** /sharedstep/{code}/{hash} | Get a specific shared step
*SharedStepsApi* | [**getsharedsteps**](docs/SharedStepsApi.md#getsharedsteps) | **GET** /sharedstep/{code} | Get all shared steps
*SharedStepsApi* | [**updatesharedstep**](docs/SharedStepsApi.md#updatesharedstep) | **PATCH** /sharedstep/{code}/{hash} | Update shared step
*SuitesApi* | [**createsuite**](docs/SuitesApi.md#createsuite) | **POST** /suite/{code} | Create a new test suite
*SuitesApi* | [**deletesuite**](docs/SuitesApi.md#deletesuite) | **DELETE** /suite/{code}/{id} | Delete test suite
*SuitesApi* | [**getsuite**](docs/SuitesApi.md#getsuite) | **GET** /suite/{code}/{id} | Get a specific test suite
*SuitesApi* | [**getsuites**](docs/SuitesApi.md#getsuites) | **GET** /suite/{code} | Get all test suites
*SuitesApi* | [**updatesuite**](docs/SuitesApi.md#updatesuite) | **PATCH** /suite/{code}/{id} | Update test suite
*SystemFieldsApi* | [**getsystemfields**](docs/SystemFieldsApi.md#getsystemfields) | **GET** /systemfield | Get all System Fields

## Documentation For Models

* [Attachment](docs/Attachment.md)
* [AttachmentGet](docs/AttachmentGet.md)
* [AttachmentHash](docs/AttachmentHash.md)
* [AttachmentListResponse](docs/AttachmentListResponse.md)
* [AttachmentListResponseAllOfResult](docs/AttachmentListResponseAllOfResult.md)
* [AttachmentResponse](docs/AttachmentResponse.md)
* [AttachmentUploadsResponse](docs/AttachmentUploadsResponse.md)
* [Attachmentupload](docs/Attachmentupload.md)
* [Author](docs/Author.md)
* [AuthorListResponse](docs/AuthorListResponse.md)
* [AuthorListResponseAllOfResult](docs/AuthorListResponseAllOfResult.md)
* [AuthorResponse](docs/AuthorResponse.md)
* [BaseResponse](docs/BaseResponse.md)
* [Bulk200Response](docs/Bulk200Response.md)
* [Bulk200ResponseAllOfResult](docs/Bulk200ResponseAllOfResult.md)
* [Configuration](docs/Configuration.md)
* [ConfigurationCreate](docs/ConfigurationCreate.md)
* [ConfigurationGroup](docs/ConfigurationGroup.md)
* [ConfigurationGroupCreate](docs/ConfigurationGroupCreate.md)
* [ConfigurationListResponse](docs/ConfigurationListResponse.md)
* [ConfigurationListResponseAllOfResult](docs/ConfigurationListResponseAllOfResult.md)
* [CustomField](docs/CustomField.md)
* [CustomFieldCreate](docs/CustomFieldCreate.md)
* [CustomFieldCreateValueInner](docs/CustomFieldCreateValueInner.md)
* [CustomFieldListResponse](docs/CustomFieldListResponse.md)
* [CustomFieldResponse](docs/CustomFieldResponse.md)
* [CustomFieldUpdate](docs/CustomFieldUpdate.md)
* [CustomFieldValue](docs/CustomFieldValue.md)
* [CustomFieldsResponse](docs/CustomFieldsResponse.md)
* [CustomFieldsResponseAllOfResult](docs/CustomFieldsResponseAllOfResult.md)
* [Defect](docs/Defect.md)
* [DefectCreate](docs/DefectCreate.md)
* [DefectListResponse](docs/DefectListResponse.md)
* [DefectListResponseAllOfResult](docs/DefectListResponseAllOfResult.md)
* [DefectQuery](docs/DefectQuery.md)
* [DefectResponse](docs/DefectResponse.md)
* [DefectStatus](docs/DefectStatus.md)
* [DefectUpdate](docs/DefectUpdate.md)
* [Environment](docs/Environment.md)
* [EnvironmentCreate](docs/EnvironmentCreate.md)
* [EnvironmentListResponse](docs/EnvironmentListResponse.md)
* [EnvironmentListResponseAllOfResult](docs/EnvironmentListResponseAllOfResult.md)
* [EnvironmentResponse](docs/EnvironmentResponse.md)
* [EnvironmentUpdate](docs/EnvironmentUpdate.md)
* [ExternalIssue](docs/ExternalIssue.md)
* [ExternalIssueIssuesInner](docs/ExternalIssueIssuesInner.md)
* [HashResponse](docs/HashResponse.md)
* [HashResponseAllOfResult](docs/HashResponseAllOfResult.md)
* [IdResponse](docs/IdResponse.md)
* [IdResponseAllOfResult](docs/IdResponseAllOfResult.md)
* [Milestone](docs/Milestone.md)
* [MilestoneCreate](docs/MilestoneCreate.md)
* [MilestoneListResponse](docs/MilestoneListResponse.md)
* [MilestoneListResponseAllOfResult](docs/MilestoneListResponseAllOfResult.md)
* [MilestoneResponse](docs/MilestoneResponse.md)
* [MilestoneUpdate](docs/MilestoneUpdate.md)
* [Plan](docs/Plan.md)
* [PlanCreate](docs/PlanCreate.md)
* [PlanDetailed](docs/PlanDetailed.md)
* [PlanDetailedAllOfCases](docs/PlanDetailedAllOfCases.md)
* [PlanListResponse](docs/PlanListResponse.md)
* [PlanListResponseAllOfResult](docs/PlanListResponseAllOfResult.md)
* [PlanQuery](docs/PlanQuery.md)
* [PlanResponse](docs/PlanResponse.md)
* [PlanUpdate](docs/PlanUpdate.md)
* [Project](docs/Project.md)
* [ProjectAccess](docs/ProjectAccess.md)
* [ProjectCodeResponse](docs/ProjectCodeResponse.md)
* [ProjectCodeResponseAllOfResult](docs/ProjectCodeResponseAllOfResult.md)
* [ProjectCounts](docs/ProjectCounts.md)
* [ProjectCountsDefects](docs/ProjectCountsDefects.md)
* [ProjectCountsRuns](docs/ProjectCountsRuns.md)
* [ProjectCreate](docs/ProjectCreate.md)
* [ProjectListResponse](docs/ProjectListResponse.md)
* [ProjectListResponseAllOfResult](docs/ProjectListResponseAllOfResult.md)
* [ProjectResponse](docs/ProjectResponse.md)
* [QqlDefect](docs/QqlDefect.md)
* [QqlPlan](docs/QqlPlan.md)
* [QqlTestCase](docs/QqlTestCase.md)
* [Requirement](docs/Requirement.md)
* [Response](docs/Response.md)
* [Result](docs/Result.md)
* [ResultCreate](docs/ResultCreate.md)
* [ResultCreateBulk](docs/ResultCreateBulk.md)
* [ResultCreateCase](docs/ResultCreateCase.md)
* [ResultCreateResponse](docs/ResultCreateResponse.md)
* [ResultCreateResponseAllOfResult](docs/ResultCreateResponseAllOfResult.md)
* [ResultListResponse](docs/ResultListResponse.md)
* [ResultListResponseAllOfResult](docs/ResultListResponseAllOfResult.md)
* [ResultResponse](docs/ResultResponse.md)
* [ResultUpdate](docs/ResultUpdate.md)
* [ResultcreateBulk](docs/ResultcreateBulk.md)
* [Run](docs/Run.md)
* [RunCreate](docs/RunCreate.md)
* [RunEnvironment](docs/RunEnvironment.md)
* [RunListResponse](docs/RunListResponse.md)
* [RunListResponseAllOfResult](docs/RunListResponseAllOfResult.md)
* [RunMilestone](docs/RunMilestone.md)
* [RunPublic](docs/RunPublic.md)
* [RunPublicResponse](docs/RunPublicResponse.md)
* [RunPublicResponseAllOfResult](docs/RunPublicResponseAllOfResult.md)
* [RunResponse](docs/RunResponse.md)
* [RunStats](docs/RunStats.md)
* [SearchResponse](docs/SearchResponse.md)
* [SearchResponseAllOfResult](docs/SearchResponseAllOfResult.md)
* [SearchResponseAllOfResultEntities](docs/SearchResponseAllOfResultEntities.md)
* [SharedStep](docs/SharedStep.md)
* [SharedStepContent](docs/SharedStepContent.md)
* [SharedStepContentCreate](docs/SharedStepContentCreate.md)
* [SharedStepCreate](docs/SharedStepCreate.md)
* [SharedStepListResponse](docs/SharedStepListResponse.md)
* [SharedStepListResponseAllOfResult](docs/SharedStepListResponseAllOfResult.md)
* [SharedStepResponse](docs/SharedStepResponse.md)
* [SharedStepUpdate](docs/SharedStepUpdate.md)
* [Suite](docs/Suite.md)
* [SuiteCreate](docs/SuiteCreate.md)
* [SuiteDelete](docs/SuiteDelete.md)
* [SuiteListResponse](docs/SuiteListResponse.md)
* [SuiteListResponseAllOfResult](docs/SuiteListResponseAllOfResult.md)
* [SuiteResponse](docs/SuiteResponse.md)
* [SuiteUpdate](docs/SuiteUpdate.md)
* [SystemField](docs/SystemField.md)
* [SystemFieldListResponse](docs/SystemFieldListResponse.md)
* [SystemFieldOption](docs/SystemFieldOption.md)
* [TagValue](docs/TagValue.md)
* [TestCase](docs/TestCase.md)
* [TestCaseCreate](docs/TestCaseCreate.md)
* [TestCaseExternalIssues](docs/TestCaseExternalIssues.md)
* [TestCaseExternalIssuesLinksInner](docs/TestCaseExternalIssuesLinksInner.md)
* [TestCaseListResponse](docs/TestCaseListResponse.md)
* [TestCaseListResponseAllOfResult](docs/TestCaseListResponseAllOfResult.md)
* [TestCaseParams](docs/TestCaseParams.md)
* [TestCaseQuery](docs/TestCaseQuery.md)
* [TestCaseResponse](docs/TestCaseResponse.md)
* [TestCaseUpdate](docs/TestCaseUpdate.md)
* [TestCasebulk](docs/TestCasebulk.md)
* [TestCasebulkCasesInner](docs/TestCasebulkCasesInner.md)
* [TestCaseexternalIssues](docs/TestCaseexternalIssues.md)
* [TestStep](docs/TestStep.md)
* [TestStepCreate](docs/TestStepCreate.md)
* [TestStepResult](docs/TestStepResult.md)
* [TestStepResultCreate](docs/TestStepResultCreate.md)

## Documentation For Authorization

### TokenAuth

* **Type**: API key
* **API key parameter name**: Token
* **Location**: HTTP header

## Author

<support@qase.io>
