Skip to content

Latest commit

 

History

History
391 lines (268 loc) · 11.8 KB

ProjectsApi.md

File metadata and controls

391 lines (268 loc) · 11.8 KB

Qase\APIClientV1\ProjectsApi

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

Method HTTP request Description
createProject() POST /project Create new project
deleteProject() DELETE /project/{code} Delete Project by code
getProject() GET /project/{code} Get Project by code
getProjects() GET /project Get All Projects
grantAccessToProject() POST /project/{code}/access Grant access to project by code
revokeAccessToProject() DELETE /project/{code}/access Revoke access to project by code

createProject()

createProject($projectCreate): \Qase\APIClientV1\Model\ProjectCodeResponse

Create new project

This method is used to create a new project through API.

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\ProjectsApi(
    // 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
);
$projectCreate = new \Qase\APIClientV1\Model\ProjectCreate(); // \Qase\APIClientV1\Model\ProjectCreate

try {
    $result = $apiInstance->createProject($projectCreate);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectsApi->createProject: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
projectCreate \Qase\APIClientV1\Model\ProjectCreate

Return type

\Qase\APIClientV1\Model\ProjectCodeResponse

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]

deleteProject()

deleteProject($code): \Qase\APIClientV1\Model\BaseResponse

Delete Project by code

This method allows to delete a specific 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\ProjectsApi(
    // 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.

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

Parameters

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

Return type

\Qase\APIClientV1\Model\BaseResponse

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]

getProject()

getProject($code): \Qase\APIClientV1\Model\ProjectResponse

Get Project by code

This method allows to retrieve a specific 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\ProjectsApi(
    // 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.

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

Parameters

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

Return type

\Qase\APIClientV1\Model\ProjectResponse

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]

getProjects()

getProjects($limit, $offset): \Qase\APIClientV1\Model\ProjectListResponse

Get All Projects

This method allows to retrieve all projects available for your account. You can limit and offset params to paginate.

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\ProjectsApi(
    // 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
);
$limit = 10; // int | A number of entities in result set.
$offset = 0; // int | How many entities should be skipped.

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

Parameters

Name Type Description Notes
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\ProjectListResponse

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]

grantAccessToProject()

grantAccessToProject($code, $projectAccess): \Qase\APIClientV1\Model\BaseResponse

Grant access to project by code

This method allows to grant access to a specific 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\ProjectsApi(
    // 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.
$projectAccess = new \Qase\APIClientV1\Model\ProjectAccess(); // \Qase\APIClientV1\Model\ProjectAccess

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

Parameters

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

Return type

\Qase\APIClientV1\Model\BaseResponse

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]

revokeAccessToProject()

revokeAccessToProject($code, $projectAccess): \Qase\APIClientV1\Model\BaseResponse

Revoke access to project by code

This method allows to revoke access to a specific 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\ProjectsApi(
    // 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.
$projectAccess = new \Qase\APIClientV1\Model\ProjectAccess(); // \Qase\APIClientV1\Model\ProjectAccess

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

Parameters

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

Return type

\Qase\APIClientV1\Model\BaseResponse

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]