A restAPI noob
-
Hi there

My goal is to install automaticly Cloudron if this works i would like to implement this to N8N.iocurl -k -X POST -H 'Content-Type: application/json' --data '{ "appStoreId": "com.nextcloud.cloudronapp", "location": "subdomain", "domain": "mycloudroninstanz.de", "accessRestriction": { }, "portBindings": { }, "icon": "string", "label": "MyAwesomeWebsite", "memoryLimit": 629145600, "sso": true, "enableBackup": true, "enableAutomaticUpdate": true, "alternateDomains": [ ], "overwriteDns": false }' https://mycloudroninstanz.de/api/v1/apps/install?access_token=MYACCESTOKENAccording to this -> https://docs.cloudron.io/api.html#tag/Apps/paths/~1apps~1install/post i tried to creat a curl post and i am 100% this is wrong. Maybe someone could help me with this?
Error:
curl: (6) Could not resolve host: application
curl: (3) URL using bad/illegal format or missing URL
curl: (3) URL using bad/illegal format or missing URL
curl: (3) URL using bad/illegal format or missing URL
curl: (3) unmatched brace in URL position 1:
{
^ -
@savity have you seen this topic?
https://forum.cloudron.io/topic/5840/unattended-install/16This might help you.
With the noted quick hack with the network debugger I can give you this:
curl 'https://my.DOMAIN.TLD/api/v1/apps/install' -X POST -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: en,en-US;q=0.7,de;q=0.3' -H 'Accept-Encoding: gzip, deflate, br' -H 'Referer: https://my.DOMAIN.TLD/' -H 'Authorization: Bearer REDACTED_TOKEN' -H 'Content-Type: application/json;charset=utf-8' -H 'Origin: https://my.DOMAIN.TLD' -H 'Connection: keep-alive' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'TE: trailers' --data-raw '{"appStoreId":"com.nextcloud.cloudronapp@4.14.0","subdomain":"cloud","domain":"cloudron.dev","secondaryDomains":{},"portBindings":{},"accessRestriction":null,"cert":null,"key":null,"sso":true,"overwriteDns":false}'Now with some pretty json:
{ "appStoreId": "com.nextcloud.cloudronapp@4.14.0", "subdomain": "cloud", "domain": "cloudron.dev", "secondaryDomains": {}, "portBindings": {}, "accessRestriction": null, "cert": null, "key": null, "sso": true, "overwriteDns": false }There are some differences compared to your JSON Body.
Diffs:
appStoreIdalso has the versionlocationfrom you and the on click sendsubdomainaccessRestrictionfrom you is an empty JSON Array and mine isnull
Rest you can see for yourself

-
Hi there

My goal is to install automaticly Cloudron if this works i would like to implement this to N8N.iocurl -k -X POST -H 'Content-Type: application/json' --data '{ "appStoreId": "com.nextcloud.cloudronapp", "location": "subdomain", "domain": "mycloudroninstanz.de", "accessRestriction": { }, "portBindings": { }, "icon": "string", "label": "MyAwesomeWebsite", "memoryLimit": 629145600, "sso": true, "enableBackup": true, "enableAutomaticUpdate": true, "alternateDomains": [ ], "overwriteDns": false }' https://mycloudroninstanz.de/api/v1/apps/install?access_token=MYACCESTOKENAccording to this -> https://docs.cloudron.io/api.html#tag/Apps/paths/~1apps~1install/post i tried to creat a curl post and i am 100% this is wrong. Maybe someone could help me with this?
Error:
curl: (6) Could not resolve host: application
curl: (3) URL using bad/illegal format or missing URL
curl: (3) URL using bad/illegal format or missing URL
curl: (3) URL using bad/illegal format or missing URL
curl: (3) unmatched brace in URL position 1:
{
^@savity Please start using code block when pasting code.

@savity said in A restAPI noob:
My goal is to install automaticly Cloudron if this works i would like to implement this to N8N.io
Do you want to install Cloudron automatically or do you wish to install Nextcloud automatically?
-
@savity Please start using code block when pasting code.

@savity said in A restAPI noob:
My goal is to install automaticly Cloudron if this works i would like to implement this to N8N.io
Do you want to install Cloudron automatically or do you wish to install Nextcloud automatically?
@BrutalBirdie I would like to use the APi request to deploy Nextcloud
"appStoreId": "com.nextcloud.cloudronapp",
-
@BrutalBirdie I would like to use the APi request to deploy Nextcloud
"appStoreId": "com.nextcloud.cloudronapp",
@savity have you seen this topic?
https://forum.cloudron.io/topic/5840/unattended-install/16This might help you.
-
@savity have you seen this topic?
https://forum.cloudron.io/topic/5840/unattended-install/16This might help you.
With the noted quick hack with the network debugger I can give you this:
curl 'https://my.DOMAIN.TLD/api/v1/apps/install' -X POST -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: en,en-US;q=0.7,de;q=0.3' -H 'Accept-Encoding: gzip, deflate, br' -H 'Referer: https://my.DOMAIN.TLD/' -H 'Authorization: Bearer REDACTED_TOKEN' -H 'Content-Type: application/json;charset=utf-8' -H 'Origin: https://my.DOMAIN.TLD' -H 'Connection: keep-alive' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'TE: trailers' --data-raw '{"appStoreId":"com.nextcloud.cloudronapp@4.14.0","subdomain":"cloud","domain":"cloudron.dev","secondaryDomains":{},"portBindings":{},"accessRestriction":null,"cert":null,"key":null,"sso":true,"overwriteDns":false}'Now with some pretty json:
{ "appStoreId": "com.nextcloud.cloudronapp@4.14.0", "subdomain": "cloud", "domain": "cloudron.dev", "secondaryDomains": {}, "portBindings": {}, "accessRestriction": null, "cert": null, "key": null, "sso": true, "overwriteDns": false }There are some differences compared to your JSON Body.
Diffs:
appStoreIdalso has the versionlocationfrom you and the on click sendsubdomainaccessRestrictionfrom you is an empty JSON Array and mine isnull
Rest you can see for yourself

-
@savity have you seen this topic?
https://forum.cloudron.io/topic/5840/unattended-install/16This might help you.
@BrutalBirdie Perfect that Topic helped. BR
-
G girish marked this topic as a question on
-
G girish has marked this topic as solved on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
