Semaphore API
This Python package is automatically generated by the Swagger Codegen project:
- API version: 2.2.0
- Package version: 1.0.0
- Build package: io.semaphore.codegen.languages.PythonClientCodegen
Python 2.7 and 3.4+
If the python package is hosted on Github, you can install directly from Github
pip install git+https://github.com//.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com//.git
)
Then import the package:
import semaphore_client
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import semaphore_client
Please follow the installation procedure and then run the following:
from __future__ import print_function
import time
import semaphore_client
from semaphore_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = semaphore_client.AuthenticationApi(semaphore_client.ApiClient(configuration))
login_body = semaphore_client.Login() # Login |
try:
# Performs Login
api_instance.auth_login_post(login_body)
except ApiException as e:
print("Exception when calling AuthenticationApi->auth_login_post: %s\n" % e)
All URIs are relative to http://localhost:3000/api
Class | Method | HTTP request | Description |
---|---|---|---|
AuthenticationApi | auth_login_post | POST /auth/login | Performs Login |
AuthenticationApi | auth_logout_post | POST /auth/logout | Destroys current session |
AuthenticationApi | user_tokens_api_token_id_delete | DELETE /user/tokens/{api_token_id} | Expires API token |
AuthenticationApi | user_tokens_get | GET /user/tokens | Fetch API tokens for user |
AuthenticationApi | user_tokens_post | POST /user/tokens | Create an API token |
DefaultApi | events_get | GET /events | Get Events related to Semaphore and projects you are part of |
DefaultApi | events_last_get | GET /events/last | Get last 200 Events related to Semaphore and projects you are part of |
DefaultApi | info_get | GET /info | Fetches information about semaphore |
DefaultApi | ping_get | GET /ping | PING test |
DefaultApi | upgrade_get | GET /upgrade | Check if new updates available and fetch /info |
DefaultApi | upgrade_post | POST /upgrade | Upgrade the server |
DefaultApi | ws_get | GET /ws | Websocket handler |
ProjectApi | project_project_id_delete | DELETE /project/{project_id} | Delete project |
ProjectApi | project_project_id_environment_environment_id_delete | DELETE /project/{project_id}/environment/{environment_id} | Removes environment |
ProjectApi | project_project_id_environment_environment_id_put | PUT /project/{project_id}/environment/{environment_id} | Update environment |
ProjectApi | project_project_id_environment_get | GET /project/{project_id}/environment | Get environment |
ProjectApi | project_project_id_environment_post | POST /project/{project_id}/environment | Add environment |
ProjectApi | project_project_id_events_get | GET /project/{project_id}/events | Get Events related to this project |
ProjectApi | project_project_id_get | GET /project/{project_id} | Fetch project |
ProjectApi | project_project_id_inventory_get | GET /project/{project_id}/inventory | Get inventory |
ProjectApi | project_project_id_inventory_inventory_id_delete | DELETE /project/{project_id}/inventory/{inventory_id} | Removes inventory |
ProjectApi | project_project_id_inventory_inventory_id_put | PUT /project/{project_id}/inventory/{inventory_id} | Updates inventory |
ProjectApi | project_project_id_inventory_post | POST /project/{project_id}/inventory | create inventory |
ProjectApi | project_project_id_keys_get | GET /project/{project_id}/keys | Get access keys linked to project |
ProjectApi | project_project_id_keys_key_id_delete | DELETE /project/{project_id}/keys/{key_id} | Removes access key |
ProjectApi | project_project_id_keys_key_id_put | PUT /project/{project_id}/keys/{key_id} | Updates access key |
ProjectApi | project_project_id_keys_post | POST /project/{project_id}/keys | Add access key |
ProjectApi | project_project_id_put | PUT /project/{project_id} | Update project |
ProjectApi | project_project_id_repositories_get | GET /project/{project_id}/repositories | Get repositories |
ProjectApi | project_project_id_repositories_post | POST /project/{project_id}/repositories | Add repository |
ProjectApi | project_project_id_repositories_repository_id_delete | DELETE /project/{project_id}/repositories/{repository_id} | Removes repository |
ProjectApi | project_project_id_tasks_get | GET /project/{project_id}/tasks | Get Tasks related to current project |
ProjectApi | project_project_id_tasks_last_get | GET /project/{project_id}/tasks/last | Get last 200 Tasks related to current project |
ProjectApi | project_project_id_tasks_post | POST /project/{project_id}/tasks | Starts a job |
ProjectApi | project_project_id_tasks_task_id_delete | DELETE /project/{project_id}/tasks/{task_id} | Deletes task (including output) |
ProjectApi | project_project_id_tasks_task_id_get | GET /project/{project_id}/tasks/{task_id} | Get a single task |
ProjectApi | project_project_id_tasks_task_id_output_get | GET /project/{project_id}/tasks/{task_id}/output | Get task output |
ProjectApi | project_project_id_templates_get | GET /project/{project_id}/templates | Get template |
ProjectApi | project_project_id_templates_post | POST /project/{project_id}/templates | create template |
ProjectApi | project_project_id_templates_template_id_delete | DELETE /project/{project_id}/templates/{template_id} | Removes template |
ProjectApi | project_project_id_templates_template_id_put | PUT /project/{project_id}/templates/{template_id} | Updates template |
ProjectApi | project_project_id_users_get | GET /project/{project_id}/users | Get users linked to project |
ProjectApi | project_project_id_users_post | POST /project/{project_id}/users | Link user to project |
ProjectApi | project_project_id_users_user_id_admin_delete | DELETE /project/{project_id}/users/{user_id}/admin | Revoke admin privileges |
ProjectApi | project_project_id_users_user_id_admin_post | POST /project/{project_id}/users/{user_id}/admin | Makes user admin |
ProjectApi | project_project_id_users_user_id_delete | DELETE /project/{project_id}/users/{user_id} | Removes user from project |
ProjectsApi | projects_get | GET /projects | Get projects |
ProjectsApi | projects_post | POST /projects | Create a new project |
UserApi | user_get | GET /user | Fetch logged in user |
UserApi | user_tokens_api_token_id_delete | DELETE /user/tokens/{api_token_id} | Expires API token |
UserApi | user_tokens_get | GET /user/tokens | Fetch API tokens for user |
UserApi | user_tokens_post | POST /user/tokens | Create an API token |
UserApi | users_get | GET /users | Fetches all users |
UserApi | users_post | POST /users | Creates a user |
UserApi | users_user_id_delete | DELETE /users/{user_id} | Deletes user |
UserApi | users_user_id_get | GET /users/{user_id} | Fetches a user profile |
UserApi | users_user_id_password_post | POST /users/{user_id}/password | Updates user password |
UserApi | users_user_id_put | PUT /users/{user_id} | Updates user details |
- APIToken
- AccessKey
- AccessKeyRequest
- Environment
- EnvironmentRequest
- Event
- InfoType
- InfoTypeUpdate
- Inventory
- InventoryRequest
- Login
- Password
- Pong
- Project
- Project1
- ProjectRequest
- Repository
- RepositoryRequest
- Task
- TaskOutput
- Template
- TemplateRequest
- User
- User1
- UserRequest
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
- Type: API key
- API key parameter name: Cookie
- Location: HTTP header