Skip to content

Latest commit

 

History

History
221 lines (160 loc) · 10.3 KB

File metadata and controls

221 lines (160 loc) · 10.3 KB

phrase_api.WebhookDeliveriesApi

All URIs are relative to https://api.phrase.com/v2

Method HTTP request Description
webhook_deliveries_list GET /projects/{project_id}/webhooks/{webhook_id}/deliveries List webhook deliveries
webhook_deliveries_redeliver POST /projects/{project_id}/webhooks/{webhook_id}/deliveries/{id}/redeliver Redeliver a single webhook delivery
webhook_deliveries_show GET /projects/{project_id}/webhooks/{webhook_id}/deliveries/{id} Get a single webhook delivery

webhook_deliveries_list

List[WebhookDelivery] webhook_deliveries_list(project_id, webhook_id, x_phrase_app_otp=x_phrase_app_otp, response_status_codes=response_status_codes)

List webhook deliveries

List all webhook deliveries for the given webhook_id.

Example

from __future__ import print_function
import time
import phrase_api
from phrase_api.rest import ApiException
from pprint import pprint

configuration = phrase_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'token'

# Enter a context with an instance of the API client
with phrase_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = phrase_api.WebhookDeliveriesApi(api_client)
    project_id = 'project_id_example' # str | Project ID (required)
    webhook_id = 'webhook_id_example' # str | Webhook ID (required)
    x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)
    response_status_codes = 'response_status_codes_example' # str | List of Response Status Codes

    try:
        # List webhook deliveries
        api_response = api_instance.webhook_deliveries_list(project_id, webhook_id, x_phrase_app_otp=x_phrase_app_otp, response_status_codes=response_status_codes)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookDeliveriesApi->webhook_deliveries_list: %s\n" % e)

Parameters

Name Type Description Notes
project_id str Project ID
webhook_id str Webhook ID
x_phrase_app_otp str Two-Factor-Authentication token (optional) [optional]
response_status_codes str List of Response Status Codes [optional]

Return type

List[WebhookDelivery]

Authorization

Basic, Token

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
* Link -
* Pagination -
400 Bad request. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
404 Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry. * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
429 Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying. * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -

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

webhook_deliveries_redeliver

WebhookDelivery webhook_deliveries_redeliver(project_id, webhook_id, id, x_phrase_app_otp=x_phrase_app_otp)

Redeliver a single webhook delivery

Trigger an individual webhook delivery to be redelivered.

Example

from __future__ import print_function
import time
import phrase_api
from phrase_api.rest import ApiException
from pprint import pprint

configuration = phrase_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'token'

# Enter a context with an instance of the API client
with phrase_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = phrase_api.WebhookDeliveriesApi(api_client)
    project_id = 'project_id_example' # str | Project ID (required)
    webhook_id = 'webhook_id_example' # str | Webhook ID (required)
    id = 'id_example' # str | ID (required)
    x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)

    try:
        # Redeliver a single webhook delivery
        api_response = api_instance.webhook_deliveries_redeliver(project_id, webhook_id, id, x_phrase_app_otp=x_phrase_app_otp)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookDeliveriesApi->webhook_deliveries_redeliver: %s\n" % e)

Parameters

Name Type Description Notes
project_id str Project ID
webhook_id str Webhook ID
id str ID
x_phrase_app_otp str Two-Factor-Authentication token (optional) [optional]

Return type

WebhookDelivery

Authorization

Basic, Token

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
* Link -
* Pagination -
400 Bad request. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
404 Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry. * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
429 Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying. * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -

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

webhook_deliveries_show

WebhookDelivery webhook_deliveries_show(project_id, webhook_id, id, x_phrase_app_otp=x_phrase_app_otp)

Get a single webhook delivery

Get all information about a single webhook delivery for the given ID.

Example

from __future__ import print_function
import time
import phrase_api
from phrase_api.rest import ApiException
from pprint import pprint

configuration = phrase_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
configuration.api_key_prefix['Authorization'] = 'token'

# Enter a context with an instance of the API client
with phrase_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = phrase_api.WebhookDeliveriesApi(api_client)
    project_id = 'project_id_example' # str | Project ID (required)
    webhook_id = 'webhook_id_example' # str | Webhook ID (required)
    id = 'id_example' # str | ID (required)
    x_phrase_app_otp = 'x_phrase_app_otp_example' # str | Two-Factor-Authentication token (optional)

    try:
        # Get a single webhook delivery
        api_response = api_instance.webhook_deliveries_show(project_id, webhook_id, id, x_phrase_app_otp=x_phrase_app_otp)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling WebhookDeliveriesApi->webhook_deliveries_show: %s\n" % e)

Parameters

Name Type Description Notes
project_id str Project ID
webhook_id str Webhook ID
id str ID
x_phrase_app_otp str Two-Factor-Authentication token (optional) [optional]

Return type

WebhookDelivery

Authorization

Basic, Token

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
* Link -
400 Bad request. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry. * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
404 Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry. * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -
429 Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying. * X-Rate-Limit-Limit -
* X-Rate-Limit-Remaining -
* X-Rate-Limit-Reset -

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