Question

Strapi Webhook for Redeploying Frontend

I’m trying to get strapi to trigger a re-deploy of my app using DigitalOcean’s API.

Specifically I’m using the https://api.digitalocean.com/v2/apps/{app-id}/deployments POST endpoint but although I can authenticate correctly the request is rejected for some reason. It appears Strapi is sending a body along with the request which DigitalOcean rejects. Below is the error message I receive back from DigitalOcean.

{ statusCode: 400, message: "{\"id\":\"invalid_argument\",\"message\":\"unknown field \\\"event\\\" in apps.CreateDeploymentRequest\"}\n" }

Has anyone managed to get this working?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

Does this work if you try to run the following POST request using curl directly:

curl \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer TOKEN" \
    "https://api.digitalocean.com/v2/apps/<app_id>/deployments" \
    -XPOST \
    -d '{"force_build": true}

Best,

Bobby