[API CURL DO] How to use these curl parameters in API component

Hello and wlecome back from the holidays to everybody.

I would switch the sql_require_primary_key parameter to false to have no problems on creating Multi Reference table using Managed MySQL in Do.

To switch the said parameter to false, DO gives the following curl:

curl -X PATCH
-H “Content-Type: application/json”
-H “Authorization: Bearer $DIGITALOCEAN_TOKEN”
-d ‘{“config”: {“sql_mode”: ,“sql_require_primary_key”: false}}’
https://api.digitalocean.com/v2/databases/XXXXXX/config

Question is: how can I do this on the API component in Wappler ?
Or any other suggestion how to use this Curl ?

thank you very much

Roberto

See:

Thank you @George I already seen this one.
My question is concerning the -d line :

-d ‘{“config”: {“sql_mode”: ,“sql_require_primary_key”: false}}’

I suppose need o use the Input Data but what I must write in the name and in the value? Being encapsulated like that cannot understand how to do.

Read starting from here:

Thank you very much:

so to change the sql_require_primary_key in Digital Ocean (to allow multi reference table without id) steps are the following:

  1. Create Api Action in Server Connect with following details:

I just published for dummies like me :wink:

thank you very much! It worked

1 Like