Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. A restAPI noob

A restAPI noob

Scheduled Pinned Locked Moved Solved Support
7 Posts 3 Posters 1.2k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      S Offline
      savity
      wrote on last edited by savity
      #1

      Hi there 🙂
      My goal is to install automaticly Cloudron if this works i would like to implement this to N8N.io

      curl -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=MYACCESTOKEN
      

      According 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:
      {
      ^

      BrutalBirdieB 1 Reply Last reply
      0
      • BrutalBirdieB BrutalBirdie

        @savity have you seen this topic?
        https://forum.cloudron.io/topic/5840/unattended-install/16

        This might help you.

        BrutalBirdieB Offline
        BrutalBirdieB Offline
        BrutalBirdie
        Partner
        wrote on last edited by BrutalBirdie
        #5

        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:

        • appStoreId also has the version
        • location from you and the on click send subdomain
        • accessRestriction from you is an empty JSON Array and mine is null

        Rest you can see for yourself 😉

        Like my work? Consider donating a drink. Cheers!

        1 Reply Last reply
        2
        • S savity

          Hi there 🙂
          My goal is to install automaticly Cloudron if this works i would like to implement this to N8N.io

          curl -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=MYACCESTOKEN
          

          According 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:
          {
          ^

          BrutalBirdieB Offline
          BrutalBirdieB Offline
          BrutalBirdie
          Partner
          wrote on last edited by
          #2

          @savity Please start using code block when pasting code.
          6df7cfce-31ed-4d8e-9953-14d226aa284a-grafik.png

          @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?

          Like my work? Consider donating a drink. Cheers!

          S 1 Reply Last reply
          0
          • BrutalBirdieB BrutalBirdie

            @savity Please start using code block when pasting code.
            6df7cfce-31ed-4d8e-9953-14d226aa284a-grafik.png

            @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?

            S Offline
            S Offline
            savity
            wrote on last edited by savity
            #3

            @BrutalBirdie I would like to use the APi request to deploy Nextcloud

            "appStoreId": "com.nextcloud.cloudronapp",

            BrutalBirdieB 1 Reply Last reply
            0
            • S savity

              @BrutalBirdie I would like to use the APi request to deploy Nextcloud

              "appStoreId": "com.nextcloud.cloudronapp",

              BrutalBirdieB Offline
              BrutalBirdieB Offline
              BrutalBirdie
              Partner
              wrote on last edited by
              #4

              @savity have you seen this topic?
              https://forum.cloudron.io/topic/5840/unattended-install/16

              This might help you.

              Like my work? Consider donating a drink. Cheers!

              BrutalBirdieB S 2 Replies Last reply
              0
              • BrutalBirdieB BrutalBirdie

                @savity have you seen this topic?
                https://forum.cloudron.io/topic/5840/unattended-install/16

                This might help you.

                BrutalBirdieB Offline
                BrutalBirdieB Offline
                BrutalBirdie
                Partner
                wrote on last edited by BrutalBirdie
                #5

                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:

                • appStoreId also has the version
                • location from you and the on click send subdomain
                • accessRestriction from you is an empty JSON Array and mine is null

                Rest you can see for yourself 😉

                Like my work? Consider donating a drink. Cheers!

                1 Reply Last reply
                2
                • BrutalBirdieB BrutalBirdie

                  @savity have you seen this topic?
                  https://forum.cloudron.io/topic/5840/unattended-install/16

                  This might help you.

                  S Offline
                  S Offline
                  savity
                  wrote on last edited by
                  #6

                  @BrutalBirdie Perfect that Topic helped. BR

                  1 Reply Last reply
                  1
                  • girishG girish marked this topic as a question on
                  • girishG girish has marked this topic as solved on
                  • girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #7

                    If you keep your browser devtools open and install an app, you can copy the network command as "curl" command. For example, if you install app, just look for the "install" POST call.

                    9ff9a963-7e36-42ea-b4ec-b4070f1046a1-image.png

                    1 Reply Last reply
                    1
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search