Skip to content

Latest commit

 

History

History
336 lines (233 loc) · 9.86 KB

PlansApi.md

File metadata and controls

336 lines (233 loc) · 9.86 KB

Qase\APIClientV1\PlansApi

All URIs are relative to https://api.qase.io/v1, except if the operation defines another base path.

Method HTTP request Description
createPlan() POST /plan/{code} Create a new plan
deletePlan() DELETE /plan/{code}/{id} Delete plan
getPlan() GET /plan/{code}/{id} Get a specific plan
getPlans() GET /plan/{code} Get all plans
updatePlan() PATCH /plan/{code}/{id} Update plan

createPlan()

createPlan($code, $planCreate): \Qase\APIClientV1\Model\IdResponse

Create a new plan

This method allows to create a plan in selected project.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: TokenAuth
$config = Qase\APIClientV1\Configuration::getDefaultConfiguration()->setApiKey('Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Qase\APIClientV1\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Token', 'Bearer');


$apiInstance = new Qase\APIClientV1\Api\PlansApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$code = 'code_example'; // string | Code of project, where to search entities.
$planCreate = new \Qase\APIClientV1\Model\PlanCreate(); // \Qase\APIClientV1\Model\PlanCreate

try {
    $result = $apiInstance->createPlan($code, $planCreate);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlansApi->createPlan: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
code string Code of project, where to search entities.
planCreate \Qase\APIClientV1\Model\PlanCreate

Return type

\Qase\APIClientV1\Model\IdResponse

Authorization

TokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deletePlan()

deletePlan($code, $id): \Qase\APIClientV1\Model\IdResponse

Delete plan

This method completely deletes a plan from repository.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: TokenAuth
$config = Qase\APIClientV1\Configuration::getDefaultConfiguration()->setApiKey('Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Qase\APIClientV1\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Token', 'Bearer');


$apiInstance = new Qase\APIClientV1\Api\PlansApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$code = 'code_example'; // string | Code of project, where to search entities.
$id = 56; // int | Identifier.

try {
    $result = $apiInstance->deletePlan($code, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlansApi->deletePlan: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
code string Code of project, where to search entities.
id int Identifier.

Return type

\Qase\APIClientV1\Model\IdResponse

Authorization

TokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getPlan()

getPlan($code, $id): \Qase\APIClientV1\Model\PlanResponse

Get a specific plan

This method allows to retrieve a specific plan.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: TokenAuth
$config = Qase\APIClientV1\Configuration::getDefaultConfiguration()->setApiKey('Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Qase\APIClientV1\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Token', 'Bearer');


$apiInstance = new Qase\APIClientV1\Api\PlansApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$code = 'code_example'; // string | Code of project, where to search entities.
$id = 56; // int | Identifier.

try {
    $result = $apiInstance->getPlan($code, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlansApi->getPlan: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
code string Code of project, where to search entities.
id int Identifier.

Return type

\Qase\APIClientV1\Model\PlanResponse

Authorization

TokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getPlans()

getPlans($code, $limit, $offset): \Qase\APIClientV1\Model\PlanListResponse

Get all plans

This method allows to retrieve all plans stored in selected project.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: TokenAuth
$config = Qase\APIClientV1\Configuration::getDefaultConfiguration()->setApiKey('Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Qase\APIClientV1\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Token', 'Bearer');


$apiInstance = new Qase\APIClientV1\Api\PlansApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$code = 'code_example'; // string | Code of project, where to search entities.
$limit = 10; // int | A number of entities in result set.
$offset = 0; // int | How many entities should be skipped.

try {
    $result = $apiInstance->getPlans($code, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlansApi->getPlans: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
code string Code of project, where to search entities.
limit int A number of entities in result set. [optional] [default to 10]
offset int How many entities should be skipped. [optional] [default to 0]

Return type

\Qase\APIClientV1\Model\PlanListResponse

Authorization

TokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updatePlan()

updatePlan($code, $id, $planUpdate): \Qase\APIClientV1\Model\IdResponse

Update plan

This method updates a plan.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: TokenAuth
$config = Qase\APIClientV1\Configuration::getDefaultConfiguration()->setApiKey('Token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Qase\APIClientV1\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Token', 'Bearer');


$apiInstance = new Qase\APIClientV1\Api\PlansApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$code = 'code_example'; // string | Code of project, where to search entities.
$id = 56; // int | Identifier.
$planUpdate = new \Qase\APIClientV1\Model\PlanUpdate(); // \Qase\APIClientV1\Model\PlanUpdate

try {
    $result = $apiInstance->updatePlan($code, $id, $planUpdate);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PlansApi->updatePlan: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
code string Code of project, where to search entities.
id int Identifier.
planUpdate \Qase\APIClientV1\Model\PlanUpdate

Return type

\Qase\APIClientV1\Model\IdResponse

Authorization

TokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]