Skip to content

Latest commit

 

History

History
315 lines (212 loc) · 8.93 KB

File metadata and controls

315 lines (212 loc) · 8.93 KB

OpenAPI\Client\ProjectsApi

All URIs are relative to http://localhost, except if the operation defines another base path.

Method HTTP request Description
createProject() POST /v2/projects Create Project
deleteProject() DELETE /v2/projects/{proj_id} Delete Project
getProject() GET /v2/projects/{proj_id} Get Project
listProjects() GET /v2/projects List Projects
updateProject() PATCH /v2/projects/{proj_id} Update Project

createProject()

createProject($project_create): \OpenAPI\Client\Model\ProjectRead

Create Project

Creates a new project under the active organization.

Example

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


// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\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
);
$project_create = new \OpenAPI\Client\Model\ProjectCreate(); // \OpenAPI\Client\Model\ProjectCreate

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

Parameters

Name Type Description Notes
project_create \OpenAPI\Client\Model\ProjectCreate

Return type

\OpenAPI\Client\Model\ProjectRead

Authorization

HTTPBearer

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($proj_id)

Delete Project

Deletes the project and all its related data.

Example

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


// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\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
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").

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

Parameters

Name Type Description Notes
proj_id string Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

Return type

void (empty response body)

Authorization

HTTPBearer

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($proj_id): \OpenAPI\Client\Model\ProjectRead

Get Project

Gets a single project matching the given proj_id, if such project exists.

Example

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


// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\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
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").

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

Parameters

Name Type Description Notes
proj_id string Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).

Return type

\OpenAPI\Client\Model\ProjectRead

Authorization

HTTPBearer

HTTP request headers

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

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

listProjects()

listProjects($page, $per_page): \OpenAPI\Client\Model\ProjectRead[]

List Projects

Lists all the projects under the active organization.

Example

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


// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\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
);
$page = 1; // int | Page number of the results to fetch, starting at 1.
$per_page = 30; // int | The number of results per page (max 100).

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

Parameters

Name Type Description Notes
page int Page number of the results to fetch, starting at 1. [optional] [default to 1]
per_page int The number of results per page (max 100). [optional] [default to 30]

Return type

\OpenAPI\Client\Model\ProjectRead[]

Authorization

HTTPBearer

HTTP request headers

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

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

updateProject()

updateProject($proj_id, $project_update): \OpenAPI\Client\Model\ProjectRead

Update Project

Updates the project.

Example

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


// Configure Bearer (JWT) authorization: HTTPBearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\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
);
$proj_id = 'proj_id_example'; // string | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
$project_update = new \OpenAPI\Client\Model\ProjectUpdate(); // \OpenAPI\Client\Model\ProjectUpdate

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

Parameters

Name Type Description Notes
proj_id string Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).
project_update \OpenAPI\Client\Model\ProjectUpdate

Return type

\OpenAPI\Client\Model\ProjectRead

Authorization

HTTPBearer

HTTP request headers

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

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