Webhook attributes
API doc
const webhooks = await lokaliseApi.webhooks().list({
project_id: project_id,
page: 2,
limit: 1,
});
webhooks.items[0].url;
API doc
const webhook = await lokaliseApi.webhooks().get(webhook_id, {project_id: project_id});
webhook.secret;
API doc
const webhook = await lokaliseApi.webhooks().create(
{url: 'https://example.com', events: ['project.exported']},
{project_id: project_id}
);
webhook.url;
API doc
const webhook = await lokaliseApi.webhooks().update(
webhook_id,
{url: 'http://example.com', events: ['project.snapshot']},
{project_id: project_id}
);
webhook.events[0];
API doc
const response = await lokaliseApi.webhooks().delete(
webhook_id,
{project_id: project_id}
);
response.webhook_deleted;
Regenerate webhook secret
API doc
const response = await lokaliseApi.webhooks().regenerate_secret(
webhook_id,
{project_id: project_id}
);
response.secret;