Skip to content

Latest commit

 

History

History
298 lines (168 loc) · 8.13 KB

WebhooksApi.md

File metadata and controls

298 lines (168 loc) · 8.13 KB

\WebhooksApi

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

Method HTTP request Description
WebhookCreate Post /projects/{project_id}/webhooks Create a webhook
WebhookDelete Delete /projects/{project_id}/webhooks/{id} Delete a webhook
WebhookShow Get /projects/{project_id}/webhooks/{id} Get a single webhook
WebhookTest Post /projects/{project_id}/webhooks/{id}/test Test a webhook
WebhookUpdate Patch /projects/{project_id}/webhooks/{id} Update a webhook
WebhooksList Get /projects/{project_id}/webhooks List webhooks

WebhookCreate

Webhook WebhookCreate(ctx, projectId, webhookCreateParameters, optional)

Create a webhook

Create a new webhook.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
webhookCreateParameters WebhookCreateParameters
optional *WebhookCreateOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a WebhookCreateOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |

Return type

Webhook

Authorization

Basic, Token

HTTP request headers

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

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

WebhookDelete

WebhookDelete(ctx, projectId, id, optional)

Delete a webhook

Delete an existing webhook.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
id string ID
optional *WebhookDeleteOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a WebhookDeleteOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |

Return type

(empty response body)

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

WebhookShow

Webhook WebhookShow(ctx, projectId, id, optional)

Get a single webhook

Get details on a single webhook.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
id string ID
optional *WebhookShowOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a WebhookShowOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |

Return type

Webhook

Authorization

Basic, Token

HTTP request headers

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

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

WebhookTest

WebhookTest(ctx, projectId, id, optional)

Test a webhook

Perform a test request for a webhook.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
id string ID
optional *WebhookTestOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a WebhookTestOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |

Return type

(empty response body)

Authorization

Basic, Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

WebhookUpdate

Webhook WebhookUpdate(ctx, projectId, id, webhookUpdateParameters, optional)

Update a webhook

Update an existing webhook.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
id string ID
webhookUpdateParameters WebhookUpdateParameters
optional *WebhookUpdateOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a WebhookUpdateOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) |

Return type

Webhook

Authorization

Basic, Token

HTTP request headers

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

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

WebhooksList

[]Webhook WebhooksList(ctx, projectId, optional)

List webhooks

List all webhooks for the given project.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string Project ID
optional *WebhooksListOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a WebhooksListOpts struct

Name Type Description Notes

xPhraseAppOTP | optional.String| Two-Factor-Authentication token (optional) | page | optional.Int32| Page number | perPage | optional.Int32| Limit on the number of objects to be returned, between 1 and 100. 25 by default |

Return type

[]Webhook

Authorization

Basic, Token

HTTP request headers

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

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