Apps API

This page contains all endpoints for the apps API.

Every call requires your API Key to be sent via the X-Reseller-Api-Key header. A 401 UNAUTHORIZED status code will be sent back if credentials are missing.

POST /reseller/apps_api/apps

Create a new app.

Parameters:
  • X-Requesting-User – Client uuid owner of the app. (optional). If this parameter is not sent, the default apps account will be used. This parameter must be sent by HTTP header.
  • X-Requesting-Project – Projec uuid owner of the app. (optional). If this parameter is not sent, the default apps project will be used. This parameter must be sent by HTTP header.
  • name – App name.
  • description – App description in different ISO countries code. The information entered must be valid JSON data.
  • vcpus – vcpus minimum requirement for the app instance.
  • ram – ram minimum requirement to the app instance.
  • background_color – Background color used to show the the app in the portal. Format Hexadecimal.
  • icon – Base64 string code for the app icon.
  • banner – Base64 string code for the app banner.
  • template – Base64 string code of the yaml template used for this new app. This needs to be a valid heat template.
  • metadata – Value to be placed in metadata field of the app. Usually is send as a empty json, but in the case of the VPN app, it requires this metadata: {“vpn”: “default”}. The information entered must be valid JSON data.
Status Codes:

Note

Please refer to Openstack heat template guide for guidance on how to construct the heat template. When building the heat template, some parameters will be used in the launch app form of the portal. These are the parameters used in the app launch form:

  • key: Field to select or create a keypair.
  • ext_net or ext_net_id: External network select field.
  • router or router_id: Router select field.
  • subnet or subnet_id or subnet_net_id or subnet_cidr: Subnet select field.
  • floating_ip or floating_ip_id: Floating IP select field.
  • flavor: Flavor select field.
  • volume_type: Volume type select field.

Warning

It is highly recommended to validate the template parameter before sending the app create request. Please, use the service Validate Heat Template to make the validation.

Example Request

{
    "name": "Apache",
    "description": "{
        "en": "Apache is free and open-source cross-platform web
        server software...",
        "fr": "Apache HTTP Server (Apache) est un serveur HTTP
        cree et maintenu au sein de la fondation Apache..."
    }",
    "requirements": {
        "vcpus": 1,
        "ram": 1
    },
    "background_color": "#b0a0a0",
    "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAA...",
    "banner": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQA...",
    "template": "data:application/x-yaml;base64,aGVhdF90ZJzaW9uOi...",
    "metadata": {}
}

Example Response

{
    "background_color": "#b0a0a0",
    "banner": "https://OPENSTACK_SERVICE_URL/swift/v1/27de3407ce604127
    e22dd3f33705/_MY_APPS/7b6f45fa-0aac-42a0-d020ad2fd54f/banner.png",
    "created_date": "2022-03-09T15:13:28.869800",
    "description": {
        "en": "Apache is free and open-source cross-platform web...",
        "fr": "Apache HTTP Server (Apache) est un serveur HTTP ..."
    },
    "icon": "https://OPENSTACK_SERVICE_URL/swift/v1/27de3407ce604127937
    2dd3f33705/_MY_APPS/7b6f45fa-0aac-42a0-d020ad2fd54f/icon.png",
    "id": "7b6f45fa-0aac-42a0-d020ad2fd54f",
    "is_published": false,
    "metadata": {},
    "name": "Apache",
    "publisher": "Ormuco ",
    "requirements": {
        "ram": 1,
        "vcpus": 1
    },
    "write_access": true
}

Note

The banner and icon will be saved in the objectstorage openstack service in a container called _MY_APPS.

GET /reseller/apps_api/apps

Paginated list of existing apps.

Parameters:
  • X-Requesting-User – Client uuid owner of the app. (optional). If this parameter is not sent, the default apps account will be used. This parameter must be sent by HTTP header.
Query Parameters:
 
  • page – page to get.
  • limit – number of apps per page.
Status Codes:

Example Request

/reseller/apps_api/apps?page=0&limit=10

Example Response

{
    "items": [
        {
            "background_color": "#ffffff",
            "banner": "https://OPENSTACK_SERVICE_URL/swift/v1/27de3407
            41279371e22dd3f33705/_MY_APPS/089506ca-daaf-2/banner.png",
            "created_date": "2021-05-26T15:56:00.312349",
            "description": {
                "en": "RabbitMQ is an open-source message-broker...",
                "fr": "RabbitMQ est un logiciel open source de..."
            },
            "heat_template": {
                "description": "RabbitMQ",
                "heat_template_version": "2017-09-01",
                "outputs": {
                    "Documentation": {
                        "description": "Application documentation",
                        "value":
                        "https://www.rabbitmq.com/documentation.html"
                    },
                    "rabbitmq_gui_url": {
                        "description": "URL to rabbitMQ admin GUI",
                        "value": {
                            "str_replace": {
                                "params": {
                                    "$HOST": {
                                        "get_param": "floating_ip"
                                    }
                                },
                                "template": "http://$HOST:15672"
                            }
                        }
                    },
                    "rabbitmq_url": {
                        "description": "URL to rabbitMQ server",
                        "value": {
                            "str_replace": {
                                "params": {
                                    "$HOST": {
                                        "get_param": "floating_ip"
                                    }
                                },
                                "template": "amqp://$HOST:5672"
                            }
                        }
                    },
                    ...
                }
            },
            "icon": "https://OPENSTACK_SERVICE_URL/swift/v1/27de3407ce
            279371e22dd3f33705/_MY_APPS/089506ca-daaf-420d-/icon.png",
            "id": "089506ca-daaf-420d-8331-7564a1f1bab8",
            "is_published": true,
            "metadata": {},
            "name": "Rabbitmq",
            "publisher": "Ormuco ",
            "requirements": {
                "ram": 1,
                "vcpus": 1
            },
            "write_access": true
        },
        {
            "background_color": "#ffffff",
            "banner": "https://OPENSTACK_SERVICE_URL/swift/v1/27de3407
            41279371e22dd3f33705/_MY_APPS/0d31ee60-5f40-4/banner.png",
            "created_date": "2021-05-26T15:46:38.360324",
            "description": {
                "en": "The Registry is a stateless, highly scalab...",
                "fr": "Le registre est une application cote serveu..."
            },
            "heat_template": {
                "description": "Docker Registry",
                "heat_template_version": "2017-09-01",
                "outputs": {
                    "Documentation": {
                        "description": "Application documentation",
                        "value": "https://docs.docker.com/registry/"
                    },
                    "URL": {
                        "description": "Docker Registry URL",
                        "value": {
                            "str_replace": {
                                "params": {
                                    "$HOST": {
                                        "get_param": "floating_ip"
                                    }
                                },
                                "template": "http://$HOST:5000"
                            }
                        }
                    }
                },
                ...
            },
            "icon": "https://OPENSTACK_SERVICE_URL/swift/v1/27de3407ce
            279371e22dd3f33705/_MY_APPS/0d31ee60-5f40-4630-/icon.png",
            "id": "0d31ee60-5f40-4630-8751-8b0a9f44dbe5",
            "is_published": true,
            "metadata": {},
            "name": "Docker Registry",
            "publisher": "Ormuco ",
            "requirements": {
                "ram": 2,
                "vcpus": 1
            },
            "write_access": true
        },
        ...
    ],
    "page": 1,
    "pages": 2
}
PATCH /reseller/apps_api/apps/(uuid)/unpublish

Unpublish an app. This means that the app with the uuid received will not be publicly available for all users in the reseller’s provider.

Parameters:
  • X-Requesting-User – Client uuid owner of the app. (optional). If this parameter is not sent, the default apps account will be used. This parameter must be sent by HTTP header.
  • uuid – App uuid.
Status Codes:

Example Response

{
    "background_color": "#b0a0a0",
    "banner": "https://OPENSTACK_SERVICE_URL/swift/v1/27de3407ce604127
    e22dd3f33705/_MY_APPS/386ec1ec-0620-425e-8188-05a60b2/banner.png",
    "created_date": "2022-03-09T22:54:46.568823",
    "description": {
        "en": "Apache is free and open-source cross-platform web ...",
        "fr": "Apache HTTP Server (Apache) est un serveur HTTP cre..."
    },
    "icon": "https://OPENSTACK_SERVICE_URL/swift/v1/27de3407ce60412793
    dd3f33705/_MY_APPS/386ec1ec-0620-425e-8188-05a60b26a727/icon.png",
    "id": "386ec1ec-0620-425e-8188-05a60b26a727",
    "is_published": true,
    "metadata": {},
    "name": "Apache",
    "publisher": "Ormuco ",
    "requirements": {
        "ram": 1,
        "vcpus": 1
    },
    "write_access": true
}
POST /reseller/apps_api/apps/(uuid)/template

Returns the app template string JSON-formatted with appended metadata.

Parameters:
  • X-Requesting-User – Client uuid owner of the app. (optional). If this parameter is not sent, the default apps account will be used. This parameter must be sent by HTTP header.
  • uuid – App uuid.
  • name – The name given to the new app instance.
Status Codes:

Note

The returned JSON string in this endpoint can be used to set the parameter template in the Openstack stack creation service. For more information about stack creation service please visit: Openstack Orchestration API.

PATCH /reseller/apps_api/apps/(uuid)/publish

Publish an app. This means that the app with the uuid received will be publicly available for all users in the provider, meaning that all users will see it on the marketplace page of the portal.

Parameters:
  • X-Requesting-User – Client uuid owner of the app. (optional). If this parameter is not sent, the default apps account will be used. This parameter must be sent by HTTP header.
  • uuid – App uuid.
Status Codes:

Example Response

{
    "background_color": "#b0a0a0",
    "banner": "https://OPENSTACK_SERVICE_URL/swift/v1/27de3407ce604127
    e22dd3f33705/_MY_APPS/386ec1ec-0620-425e-8188-05a60b2/banner.png",
    "created_date": "2022-03-09T22:54:46.568823",
    "description": {
        "en": "Apache is free and open-source cross-platform web ...",
        "fr": "Apache HTTP Server (Apache) est un serveur HTTP cre..."
    },
    "icon": "https://OPENSTACK_SERVICE_URL/swift/v1/27de3407ce60412793
    dd3f33705/_MY_APPS/386ec1ec-0620-425e-8188-05a60b26a727/icon.png",
    "id": "386ec1ec-0620-425e-8188-05a60b26a727",
    "is_published": true,
    "metadata": {},
    "name": "Apache",
    "publisher": "Ormuco ",
    "requirements": {
        "ram": 1,
        "vcpus": 1
    },
    "write_access": true
}
PATCH /reseller/apps_api/apps/(uuid)

Update an existing app. This will update only the parameters sent, i.e, if you don’t send the icon parameter, it won’t be updated and the old value will be kept.

Parameters:
  • X-Requesting-User – Client uuid owner of the app. (optional). If this parameter is not sent, the default apps account will be used. This parameter must be sent by HTTP header.
  • uuid – App uuid.
  • name – App name.
  • description – App description in different ISO countries code. The information entered must be valid JSON data.
  • vcpus – vcpus minimum requirement for the app instance.
  • ram – ram minimum requirement to the app instance.
  • background_color – Background color used to show the the app in the portal. Format Hexadecimal.
  • icon – Base64 string code for the app icon.
  • banner – Base64 string code for the app banner.
  • template – Base64 string code of the yaml template used for this new app. This needs to be a valid heat template.
  • metadata – Value to be placed in metadata field of the app. Usually is send as a empty json, but in the case of the VPN app, it requires this metadata: {“vpn”: “default”}. The information entered must be valid JSON data.
Status Codes:

Note

Please refer to Openstack heat template guide for guidance on how to construct the heat template. Also, it is highly recommended to validate the template parameter before sending the app create request. Please, use this service Validate Heat Template to make the validation.

Example Request

{
    "name": "Apache",
    "description": "{
        "en": "Apache is free and open-source cross-platform...",
        "fr": "Apache HTTP Server (Apache) est un serveur... "
    }",
    "requirements": {
        "vcpus": 1,
        "ram": 1
    },
    "background_color": "#b0a0a0",
    "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAA...",
    "banner": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQA...",
    "template": "data:application/x-yaml;base64,aGVhdF90ZW1wbGF0Z...",
    "metadata": {}
}

Example Response

{
    "background_color": "#b0a0a0",
    "banner": "https://OPENSTACK_SERVICE_URL/swift/v1/27de3407ce604127
    e22dd3f33705/_MY_APPS/7b6f45fa-0aac-42a0-d020ad2fd54f/banner.png",
    "created_date": "2022-03-09T15:13:28.869800",
    "description": {
        "en": "Apache is free and open-source cross-platform...",
        "fr": "Apache HTTP Server (Apache) est un serveur HTTP..."
    },
    "icon": "https://OPENSTACK_SERVICE_URL/swift/v1/27de3407ce60412793
    2dd3f33705/_MY_APPS/7b6f45fa-0aac-42a0-d020ad2fd54f/icon.png",
    "id": "7b6f45fa-0aac-42a0-d020ad2fd54f",
    "is_published": false,
    "metadata": {},
    "name": "Apache",
    "publisher": "Ormuco ",
    "requirements": {
        "ram": 1,
        "vcpus": 1
    },
    "write_access": true
}

Note

The banner and icon will be saved in the objectstorage openstack service in a container called _MY_APPS.

GET /reseller/apps_api/apps/(uuid)

Get app details.

Parameters:
  • X-Requesting-User – Client uuid owner of the app. (optional). If this parameter is not sent, the default apps account will be used. This parameter must be sent by HTTP header.
  • uuid – App uuid.
Status Codes:

Example Response

{
    "background_color": "#b0a0a0",
    "banner": "https://OPENSTACK_SERVICE_URL/swift/v1/27de3407ce604127
    e22dd3f33705/_MY_APPS/386ec1ec-0620-425e-8188-05a60b2/banner.png",
    "created_date": "2022-03-09T22:54:46.568823",
    "defaults": {
        "flavor": 100,
        "image": "ubuntu-18.04-amd64",
        "volume_size": 50
    },
    "description": {
        "en": "Apache is free and open-source cross-platform web ...",
        "fr": "Apache HTTP Server (Apache) est un serveur HTTP cre..."
    },
    "generic_parameters": [
        "flavor",
        "floating_ip",
        "floating_ip_id",
        "image",
        "key",
        "os_public_endpoint",
        "subnet",
        "subnet_net_id",
        "volume_type"
    ],
    "heat_template": {
        "description": "Apache HTTP Server",
        "heat_template_version": "2018-08-31",
        "outputs": {
            "Documentation": {
                "description": "Application documentation",
                "value": "http://httpd.apache.org/docs/"
            },
            "URL": {
                "description": "Apache HTTP Website",
                "value": {
                    "str_replace": {
                        "params": {
                            "$HOST": {
                                "get_param": "floating_ip"
                            }
                        },
                        "template": "http://$HOST:80"
                    }
                }
            }
        },
        ...
    },
    "icon": "https://OPENSTACK_SERVICE_URL/swift/v1/27de3407ce60412793
    dd3f33705/_MY_APPS/386ec1ec-0620-425e-8188-05a60b26a727/icon.png",
    "id": "386ec1ec-0620-425e-8188-05a60b26a727",
    "is_published": false,
    "metadata": {},
    "name": "Apache",
    "parameters": [
        {
            "constraints": null,
            "help": "All your data will be stored in this volume...",
            "id": "volume_size",
            "label": "VOLUME SIZE",
            "type": "number"
        }
    ],
    "publisher": "Ormuco ",
    "requirements": {
        "ram": 1,
        "vcpus": 1
    },
    "write_access": true
}
DELETE /reseller/apps_api/apps/(uuid)

Delete an existing app.

Parameters:
  • X-Requesting-User – Client uuid owner of the app. (optional). If this parameter is not sent, the default apps account will be used. This parameter must be sent by HTTP header.
  • uuid – App uuid.
Status Codes: