All URIs are relative to https://localhost/api/v1
| Method | HTTP request | Description |
|---|---|---|
| add_hook_for_org | POST /orgs/{orgid}/hooks | Add hook for organization |
| add_hook_for_project | POST /orgs/{orgid}/projects/{projectid}/hooks | Add hook for project |
| delete_hook_for_org | DELETE /orgs/{orgid}/hooks/{id} | Delete organization hook |
| delete_hook_for_project | DELETE /orgs/{orgid}/projects/{projectid}/hooks/{id} | Delete project hook |
| get_hook_for_org | GET /orgs/{orgid}/hooks/{id} | Get organization hook details |
| get_hook_for_project | GET /orgs/{orgid}/projects/{projectid}/hooks/{id} | Get project hook details |
| list_hooks_for_org | GET /orgs/{orgid}/hooks | List hooks for organization |
| list_hooks_for_project | GET /orgs/{orgid}/projects/{projectid}/hooks | List hooks for project |
| ping_hook_for_org | POST /orgs/{orgid}/hooks/{id}/ping | Ping an org hook |
| ping_hook_for_project | POST /orgs/{orgid}/projects/{projectid}/hooks/{id}/ping | Ping a project hook |
| update_hook_for_org | PUT /orgs/{orgid}/hooks/{id} | Update hook for organization |
| update_hook_for_project | PUT /orgs/{orgid}/projects/{projectid}/hooks/{id} | Update hook for project |
object add_hook_for_org(orgid, options=options)
Add hook for organization
Adds a new organization level hook. An organization level hook is triggered by events from all projects belonging to the organziation. NOTE: you must be a manager in the organization to add new hooks.
<div class="webhook-tag-desc">| Type | Configuration Options | ||||||||
|---|---|---|---|---|---|---|---|---|---|
web |
| ||||||||
slack |
|
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.WebhooksApi(swagger_client.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
options = swagger_client.Options2() # Options2 | (optional)
try:
# Add hook for organization
api_response = api_instance.add_hook_for_org(orgid, options=options)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->add_hook_for_org: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| orgid | str | Organization identifier | |
| options | Options2 | [optional] |
object
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object add_hook_for_project(orgid, projectid, options=options)
Add hook for project
Adds a new project level hook. A project level hook is only triggered by events from the specific project. NOTE: you must be a manager in the organization to add new hooks.
<div class="webhook-tag-desc">| Type | Configuration Options | ||||||||
|---|---|---|---|---|---|---|---|---|---|
web |
| ||||||||
slack |
|
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.WebhooksApi(swagger_client.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
options = swagger_client.Options4() # Options4 | (optional)
try:
# Add hook for project
api_response = api_instance.add_hook_for_project(orgid, projectid, options=options)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->add_hook_for_project: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| orgid | str | Organization identifier | |
| projectid | str | Project identifier | |
| options | Options4 | [optional] |
object
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str delete_hook_for_org(orgid, id)
Delete organization hook
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.WebhooksApi(swagger_client.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
id = 'id_example' # str | Hook record identifier
try:
# Delete organization hook
api_response = api_instance.delete_hook_for_org(orgid, id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->delete_hook_for_org: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| orgid | str | Organization identifier | |
| id | str | Hook record identifier |
str
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str delete_hook_for_project(orgid, projectid, id)
Delete project hook
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.WebhooksApi(swagger_client.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
id = 'id_example' # str | Hook record identifier
try:
# Delete project hook
api_response = api_instance.delete_hook_for_project(orgid, projectid, id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->delete_hook_for_project: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| orgid | str | Organization identifier | |
| projectid | str | Project identifier | |
| id | str | Hook record identifier |
str
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object get_hook_for_org(orgid, id)
Get organization hook details
Get details of a hook by id
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.WebhooksApi(swagger_client.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
id = 'id_example' # str | Hook record identifier
try:
# Get organization hook details
api_response = api_instance.get_hook_for_org(orgid, id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->get_hook_for_org: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| orgid | str | Organization identifier | |
| id | str | Hook record identifier |
object
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object get_hook_for_project(orgid, projectid, id)
Get project hook details
Get details of a hook by id
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.WebhooksApi(swagger_client.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
id = 'id_example' # str | Hook record identifier
try:
# Get project hook details
api_response = api_instance.get_hook_for_project(orgid, projectid, id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->get_hook_for_project: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| orgid | str | Organization identifier | |
| projectid | str | Project identifier | |
| id | str | Hook record identifier |
object
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[InlineResponse2005] list_hooks_for_org(orgid)
List hooks for organization
List all hooks configured for the specified organization
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.WebhooksApi(swagger_client.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
try:
# List hooks for organization
api_response = api_instance.list_hooks_for_org(orgid)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->list_hooks_for_org: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| orgid | str | Organization identifier |
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[InlineResponse2005] list_hooks_for_project(orgid, projectid)
List hooks for project
List all hooks configured for the specified project
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.WebhooksApi(swagger_client.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
try:
# List hooks for project
api_response = api_instance.list_hooks_for_project(orgid, projectid)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->list_hooks_for_project: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| orgid | str | Organization identifier | |
| projectid | str | Project identifier |
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str ping_hook_for_org(orgid, id)
Ping an org hook
Send a ping event to an org hook.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.WebhooksApi(swagger_client.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
id = 'id_example' # str | Hook record identifier
try:
# Ping an org hook
api_response = api_instance.ping_hook_for_org(orgid, id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->ping_hook_for_org: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| orgid | str | Organization identifier | |
| id | str | Hook record identifier |
str
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
str ping_hook_for_project(orgid, projectid, id)
Ping a project hook
Send a ping event to a project hook.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.WebhooksApi(swagger_client.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
id = 'id_example' # str | Hook record identifier
try:
# Ping a project hook
api_response = api_instance.ping_hook_for_project(orgid, projectid, id)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->ping_hook_for_project: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| orgid | str | Organization identifier | |
| projectid | str | Project identifier | |
| id | str | Hook record identifier |
str
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object update_hook_for_org(orgid, id, options=options)
Update hook for organization
Update a new hook. NOTE: you must be a manager in the organization to update hooks.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.WebhooksApi(swagger_client.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
id = 'id_example' # str | Hook record identifier
options = swagger_client.Options3() # Options3 | (optional)
try:
# Update hook for organization
api_response = api_instance.update_hook_for_org(orgid, id, options=options)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->update_hook_for_org: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| orgid | str | Organization identifier | |
| id | str | Hook record identifier | |
| options | Options3 | [optional] |
object
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]
object update_hook_for_project(orgid, projectid, id, options=options)
Update hook for project
Update an existing hook. NOTE: you must be a manager of the project to update hooks.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: apikey
configuration = swagger_client.Configuration()
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
# Configure OAuth2 access token for authorization: permissions
configuration = swagger_client.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = swagger_client.WebhooksApi(swagger_client.ApiClient(configuration))
orgid = 'orgid_example' # str | Organization identifier
projectid = 'projectid_example' # str | Project identifier
id = 'id_example' # str | Hook record identifier
options = swagger_client.Options5() # Options5 | (optional)
try:
# Update hook for project
api_response = api_instance.update_hook_for_project(orgid, projectid, id, options=options)
pprint(api_response)
except ApiException as e:
print("Exception when calling WebhooksApi->update_hook_for_project: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| orgid | str | Organization identifier | |
| projectid | str | Project identifier | |
| id | str | Hook record identifier | |
| options | Options5 | [optional] |
object
- Content-Type: application/json
- Accept: application/json, text/plain, text/html, text/csv
[Back to top] [Back to API list] [Back to Model list] [Back to README]