client-api / semaphore-php
Semaphore API provides endpoints for managing and interacting with the Semaphore UI. This documentation outlines the available operations and data models.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/client-api/semaphore-php
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.4.5
- guzzlehttp/psr7: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- overtrue/phplint: ^9.0
- phpunit/phpunit: ^9.0
README
Semaphore API provides endpoints for managing and interacting with the Semaphore UI. This documentation outlines the available operations and data models.
Installation & Usage
Requirements
PHP 8.1 and later.
Composer
To install the bindings via Composer, add the following to composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/client-api/semaphore-php.git"
}
],
"require": {
"client-api/semaphore-php": "*@dev"
}
}
Then run composer install
Manual Installation
Download the files and include autoload.php:
<?php require_once('/path/to/clientapi_semaphore/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new ClientAPI\Semaphore\Api\AuthenticationApi( // 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() ); try { $result = $apiInstance->authLoginGet(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AuthenticationApi->authLoginGet: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to http://localhost:3000/api
| Class | Method | HTTP request | Description |
|---|---|---|---|
| AuthenticationApi | authLoginGet | GET /auth/login | Fetches login metadata |
| AuthenticationApi | authLoginPost | POST /auth/login | Performs Login |
| AuthenticationApi | authLogoutPost | POST /auth/logout | Destroys current session |
| AuthenticationApi | authOidcProviderIdLoginGet | GET /auth/oidc/{provider_id}/login | Begin OIDC authentication flow and redirect to OIDC provider |
| AuthenticationApi | authOidcProviderIdRedirectGet | GET /auth/oidc/{provider_id}/redirect | Finish OIDC authentication flow, upon succes you will be logged in |
| AuthenticationApi | userTokensApiTokenIdDelete | DELETE /user/tokens/{api_token_id} | Expires API token |
| AuthenticationApi | userTokensGet | GET /user/tokens | Fetch API tokens for user |
| AuthenticationApi | userTokensPost | POST /user/tokens | Create an API token |
| DefaultApi | eventsGet | GET /events | Get Events related to Semaphore and projects you are part of |
| DefaultApi | eventsLastGet | GET /events/last | Get last 200 Events related to Semaphore and projects you are part of |
| DefaultApi | infoGet | GET /info | Fetches information about semaphore |
| DefaultApi | pingGet | GET /ping | PING test |
| DefaultApi | wsGet | GET /ws | Websocket handler |
| IntegrationApi | projectProjectIdIntegrationsIntegrationIdMatchersGet | GET /project/{project_id}/integrations/{integration_id}/matchers | Get Integration Matcher linked to integration extractor |
| IntegrationApi | projectProjectIdIntegrationsIntegrationIdMatchersMatcherIdDelete | DELETE /project/{project_id}/integrations/{integration_id}/matchers/{matcher_id} | Removes integration matcher |
| IntegrationApi | projectProjectIdIntegrationsIntegrationIdMatchersMatcherIdPut | PUT /project/{project_id}/integrations/{integration_id}/matchers/{matcher_id} | Updates Integration Matcher |
| IntegrationApi | projectProjectIdIntegrationsIntegrationIdValuesExtractvalueIdDelete | DELETE /project/{project_id}/integrations/{integration_id}/values/{extractvalue_id} | Removes integration extract value |
| IntegrationApi | projectProjectIdIntegrationsIntegrationIdValuesExtractvalueIdPut | PUT /project/{project_id}/integrations/{integration_id}/values/{extractvalue_id} | Updates Integration ExtractValue |
| IntegrationApi | projectProjectIdIntegrationsIntegrationIdValuesGet | GET /project/{project_id}/integrations/{integration_id}/values | Get Integration Extracted Values linked to integration extractor |
| ProjectApi | projectProjectIdBackupGet | GET /project/{project_id}/backup | Backup A Project |
| ProjectApi | projectProjectIdDelete | DELETE /project/{project_id}/ | Delete project |
| ProjectApi | projectProjectIdEnvironmentEnvironmentIdDelete | DELETE /project/{project_id}/environment/{environment_id} | Removes environment |
| ProjectApi | projectProjectIdEnvironmentEnvironmentIdGet | GET /project/{project_id}/environment/{environment_id} | Get environment |
| ProjectApi | projectProjectIdEnvironmentEnvironmentIdPut | PUT /project/{project_id}/environment/{environment_id} | Update environment |
| ProjectApi | projectProjectIdEnvironmentGet | GET /project/{project_id}/environment | Get environment |
| ProjectApi | projectProjectIdEnvironmentPost | POST /project/{project_id}/environment | Add environment |
| ProjectApi | projectProjectIdEventsGet | GET /project/{project_id}/events | Get Events related to this project |
| ProjectApi | projectProjectIdGet | GET /project/{project_id}/ | Fetch project |
| ProjectApi | projectProjectIdIntegrationsGet | GET /project/{project_id}/integrations | get all integrations |
| ProjectApi | projectProjectIdIntegrationsIntegrationIdDelete | DELETE /project/{project_id}/integrations/{integration_id} | Remove integration |
| ProjectApi | projectProjectIdIntegrationsIntegrationIdMatchersPost | POST /project/{project_id}/integrations/{integration_id}/matchers | Add Integration Matcher |
| ProjectApi | projectProjectIdIntegrationsIntegrationIdPut | PUT /project/{project_id}/integrations/{integration_id} | Update Integration |
| ProjectApi | projectProjectIdIntegrationsIntegrationIdValuesPost | POST /project/{project_id}/integrations/{integration_id}/values | Add Integration Extracted Value |
| ProjectApi | projectProjectIdIntegrationsPost | POST /project/{project_id}/integrations | create a new integration |
| ProjectApi | projectProjectIdInventoryGet | GET /project/{project_id}/inventory | Get inventory |
| ProjectApi | projectProjectIdInventoryInventoryIdDelete | DELETE /project/{project_id}/inventory/{inventory_id} | Removes inventory |
| ProjectApi | projectProjectIdInventoryInventoryIdGet | GET /project/{project_id}/inventory/{inventory_id} | Get inventory |
| ProjectApi | projectProjectIdInventoryInventoryIdPut | PUT /project/{project_id}/inventory/{inventory_id} | Updates inventory |
| ProjectApi | projectProjectIdInventoryPost | POST /project/{project_id}/inventory | create inventory |
| ProjectApi | projectProjectIdKeysGet | GET /project/{project_id}/keys | Get access keys linked to project |
| ProjectApi | projectProjectIdKeysKeyIdDelete | DELETE /project/{project_id}/keys/{key_id} | Removes access key |
| ProjectApi | projectProjectIdKeysKeyIdPut | PUT /project/{project_id}/keys/{key_id} | Updates access key |
| ProjectApi | projectProjectIdKeysPost | POST /project/{project_id}/keys | Add access key |
| ProjectApi | projectProjectIdPut | PUT /project/{project_id}/ | Update project |
| ProjectApi | projectProjectIdRepositoriesGet | GET /project/{project_id}/repositories | Get repositories |
| ProjectApi | projectProjectIdRepositoriesPost | POST /project/{project_id}/repositories | Add repository |
| ProjectApi | projectProjectIdRepositoriesRepositoryIdDelete | DELETE /project/{project_id}/repositories/{repository_id} | Removes repository |
| ProjectApi | projectProjectIdRepositoriesRepositoryIdGet | GET /project/{project_id}/repositories/{repository_id} | Get repository |
| ProjectApi | projectProjectIdRepositoriesRepositoryIdPut | PUT /project/{project_id}/repositories/{repository_id} | Updates repository |
| ProjectApi | projectProjectIdRoleGet | GET /project/{project_id}/role | Fetch permissions of the current user for project |
| ProjectApi | projectProjectIdTasksGet | GET /project/{project_id}/tasks | Get Tasks related to current project |
| ProjectApi | projectProjectIdTasksLastGet | GET /project/{project_id}/tasks/last | Get last 200 Tasks related to current project |
| ProjectApi | projectProjectIdTasksPost | POST /project/{project_id}/tasks | Starts a job |
| ProjectApi | projectProjectIdTasksTaskIdDelete | DELETE /project/{project_id}/tasks/{task_id} | Deletes task (including output) |
| ProjectApi | projectProjectIdTasksTaskIdGet | GET /project/{project_id}/tasks/{task_id} | Get a single task |
| ProjectApi | projectProjectIdTasksTaskIdOutputGet | GET /project/{project_id}/tasks/{task_id}/output | Get task output |
| ProjectApi | projectProjectIdTasksTaskIdStopPost | POST /project/{project_id}/tasks/{task_id}/stop | Stop a job |
| ProjectApi | projectProjectIdTemplatesGet | GET /project/{project_id}/templates | Get template |
| ProjectApi | projectProjectIdTemplatesPost | POST /project/{project_id}/templates | create template |
| ProjectApi | projectProjectIdTemplatesTemplateIdDelete | DELETE /project/{project_id}/templates/{template_id} | Removes template |
| ProjectApi | projectProjectIdTemplatesTemplateIdGet | GET /project/{project_id}/templates/{template_id} | Get template |
| ProjectApi | projectProjectIdTemplatesTemplateIdPut | PUT /project/{project_id}/templates/{template_id} | Updates template |
| ProjectApi | projectProjectIdUsersGet | GET /project/{project_id}/users | Get users linked to project |
| ProjectApi | projectProjectIdUsersPost | POST /project/{project_id}/users | Link user to project |
| ProjectApi | projectProjectIdUsersUserIdDelete | DELETE /project/{project_id}/users/{user_id} | Removes user from project |
| ProjectApi | projectProjectIdUsersUserIdPut | PUT /project/{project_id}/users/{user_id} | Update user role |
| ProjectApi | projectProjectIdViewsGet | GET /project/{project_id}/views | Get view |
| ProjectApi | projectProjectIdViewsPost | POST /project/{project_id}/views | create view |
| ProjectApi | projectProjectIdViewsViewIdDelete | DELETE /project/{project_id}/views/{view_id} | Removes view |
| ProjectApi | projectProjectIdViewsViewIdGet | GET /project/{project_id}/views/{view_id} | Get view |
| ProjectApi | projectProjectIdViewsViewIdPut | PUT /project/{project_id}/views/{view_id} | Updates view |
| ProjectsApi | projectsGet | GET /projects | Get projects |
| ProjectsApi | projectsPost | POST /projects | Create a new project |
| ProjectsApi | projectsRestorePost | POST /projects/restore | Restore Project |
| ScheduleApi | projectProjectIdSchedulesPost | POST /project/{project_id}/schedules | create schedule |
| ScheduleApi | projectProjectIdSchedulesScheduleIdDelete | DELETE /project/{project_id}/schedules/{schedule_id} | Deletes schedule |
| ScheduleApi | projectProjectIdSchedulesScheduleIdGet | GET /project/{project_id}/schedules/{schedule_id} | Get schedule |
| ScheduleApi | projectProjectIdSchedulesScheduleIdPut | PUT /project/{project_id}/schedules/{schedule_id} | Updates schedule |
| UserApi | userGet | GET /user/ | Fetch logged in user |
| UserApi | userTokensApiTokenIdDelete | DELETE /user/tokens/{api_token_id} | Expires API token |
| UserApi | userTokensGet | GET /user/tokens | Fetch API tokens for user |
| UserApi | userTokensPost | POST /user/tokens | Create an API token |
| UserApi | usersGet | GET /users | Fetches all users |
| UserApi | usersPost | POST /users | Creates a user |
| UserApi | usersUserIdDelete | DELETE /users/{user_id}/ | Deletes user |
| UserApi | usersUserIdGet | GET /users/{user_id}/ | Fetches a user profile |
| UserApi | usersUserIdPasswordPost | POST /users/{user_id}/password | Updates user password |
| UserApi | usersUserIdPut | PUT /users/{user_id}/ | Updates user details |
Models
- APIToken
- AccessKey
- AccessKeyRequest
- AccessKeyRequestLoginPassword
- AccessKeyRequestSsh
- Environment
- EnvironmentRequest
- EnvironmentSecret
- EnvironmentSecretRequest
- Event
- InfoType
- InfoTypeUpdate
- Integration
- IntegrationExtractValue
- IntegrationExtractValueRequest
- IntegrationMatcher
- IntegrationMatcherRequest
- IntegrationRequest
- Inventory
- InventoryRequest
- Login
- LoginMetadata
- LoginMetadataOidcProvidersInner
- Project
- ProjectBackup
- ProjectBackupEnvironmentsInner
- ProjectBackupInventoriesInner
- ProjectBackupKeysInner
- ProjectBackupMeta
- ProjectBackupRepositoriesInner
- ProjectBackupTemplatesInner
- ProjectBackupViewsInner
- ProjectProjectIdPutRequest
- ProjectProjectIdRoleGet200Response
- ProjectProjectIdTasksPostRequest
- ProjectProjectIdUsersPostRequest
- ProjectProjectIdUsersUserIdPutRequest
- ProjectRequest
- ProjectUser
- Repository
- RepositoryRequest
- Runner
- Schedule
- ScheduleRequest
- Task
- TaskOutput
- Template
- TemplateRequest
- TemplateSurveyVar
- TemplateSurveyVarValue
- TemplateVault
- User
- UserPutRequest
- UserRequest
- UsersUserIdPasswordPostRequest
- View
- ViewRequest
Authorization
cookie
- Type: API key
- API key parameter name: Cookie
- Location: HTTP header
bearer
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Tests
To run the tests, use:
composer install vendor/bin/phpunit
Author
About this package
This PHP package is automatically generated by the OpenAPI Generator project:
- API version:
2.13.0- Generator version:
7.12.0
- Generator version:
- Build package:
org.openapitools.codegen.languages.PhpNextgenClientCodegen