Official Content

The Mini App Center offers an API that provides endpoints for retrieving and modifying data from the Mini App. This article offers an overview of these Endpoints.

Check the generic variables required to use the API.

Endpoints

Below is a summary of the available endpoints for this API:

Method Path Description
GET /miniapps/{id} Gets Mini App details.
POST /miniapps/upload Creates a Mini App with additional attributes and locations.
POST /miniapps Creates a Mini App.
PUT /miniapps/{id} Updates a Mini App.
DELETE /miniapps/{id} Deletes a Mini App.
POST /miniapps/{id}/attributes Assigns a value to an additional attribute of the Mini App.
DELETE /miniapps/{id}/attributes/{field} Deletes a value to an additional attribute of the Mini App.
GET /miniapps/{id}/locations Gets a list of locations of Mini App.
POST /miniapps/{id}/locations Creates a location for Mini App.
PUT /miniapps/{id}/locations/{location_id} Updates the location of Mini App.
DELETE /miniapps/{id}/locations/{location_id} Deletes location of Mini App.
GET /miniapps/{id}/versions/{version_id} Gets Mini App version details.
POST /miniapps/{id}/versions/upload Creates a version of Mini App with compatibilities.
POST /miniapps/{id}/versions Creates a version of a Mini App.
PUT /miniapps/{id}/versions/{version_id} Updates a version of a Mini App.
POST /miniapps/{id}/versions/{version_id}/compatibility Adds Super App version compatibility to a version of a Mini App.
POST /miniapps/{id}/versions/{version_id}/compatibility/delete Deletes Super App version compatibility to a version of a Mini App.
POST /miniapps/{id}/versions/{version_id}/send_to_review Sends to review a version of a Mini App.
POST /miniapps/{id}/versions/{version_id}/in_review Sets in review a version of a Mini App.
POST /miniapps/{id}/versions/{version_id}/rejected Rejects a version of a Mini App.
POST /miniapps/{id}/versions/{version_id}/ready Sets as ready a version of a Mini App.
 
Note: This endpoint requires a Mini App Center API token related to Member Organization User scope. Read more at: How to create API Key as an Organization Administrator User.

GET /miniapps/{id}

This endpoint gets details about a specific Mini App identified by its unique id.

Parameters

Name Type Description
id string Mini app ID (required)

Response

{
    "data": {
        "id": "string",
        "organization_id": "GUID",
        "name": "string",
        "description": "string",
        "superapp_id": "string",
        "type": "string",
        "keywords": "string",
        "icon": "URL",
        "card": "URL",
        "banner": "URL",
        "additional_attributes": [
            {
                "field": "string",
                "value": "string"
            },
            ...
        ]
    }
}

If an error has occurred, it will return HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X GET "$BASE_URL/v1/miniapps/{id}" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json"

POST /miniapps/upload

Uploads a Bundle file to create a Mini App with additional attributes and locations. Note that the file extension must be ".mac" or the one indicated in the "File Types" parameter.

Request Body

The supported option is binary. It is useful for its simplicity and encodes the binary data directly in the request body.

It is mandatory to set a filename header value with the document name and extension. For example:

filename: MiniApp.mac
Note: To learn how to create the MiniApp.mac file, read HowTo: Create Mini App Bundle.

Response

If the creation is successful, it will return HTTP response Status "201 Created" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/miniapps/upload" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H 'filename: MiniApp.mac' \
    -d '@/C:/temp/MiniApp.mac'

POST /miniapps

Creates a Mini App.

Request Body

{
    "id": "string",
    "organization_id": "GUID",    /*Only with Site Admin API token*/
    "name": "string",
    "description": "string",
    "superapp_id": "string",
    "type": "string",    /*Native, WEB*/
    "keywords": "string",
    "icon": "object_id",
    "card": "object_id",
    "banner": "object_id"
}

To learn how to generate an "object_id" read HowTo: Upload an image, video, or audio file via an API object Using Postman.

Response

If the creation is successful, it will return HTTP response Status "201 Created" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/miniapps" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "id": "com.genexus.verdant.coffeemuffins",
            "name":"Coffee & Muffins",
            "superapp_id":"com.genexus.verdantbank",
            "type":"native",
            "description":"Coffee & Muffins Mini App",
            "keywords":"coffee cafe muffins breakfast",
            "icon":"gxupload:fe4602263a224b68a6cdd8c5533e5700"
        }'

PUT /miniapps/{id}

Updates details of a specific Mini App identified by its unique id.

Parameters

Name Type Description
id string Mini app ID (required)

Request Body

{
    "organization_id": "GUID",    /*Only with Site Admin API token*/
    "name": "string",
    "description": "string",
    "superapp_id": "string",
    "type": "string",    /*Native, WEB*/
    "keywords": "string",
    "icon": "object_id",
    "card": "object_id",
    "banner": "object_id"
}

Response

If the update is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X PUT "$BASE_URL/v1/miniapps/{id}" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "name":"Coffee & Muffins",
            "superapp_id":"com.genexus.verdantbank",
            "type":"native",
            "description":"Coffee & Muffins Mini App",
            "keywords":"coffee cafe muffins breakfast",
            "icon":"gxupload:fe4602263a224b68a6cdd8c5533e5700",
            "card":"gxupload:32d77315af2a45aea39b99bb7b5a07a9"
        }'

DELETE /miniapps/{id}

Deletes a Mini App identified by its id.

Parameters

Name Type Description
id string Mini app ID (required)

Response

If the deletion is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X DELETE "$BASE_URL/v1/miniapps/{id}" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json"

POST /miniapps/{id}/attributes

Assigns a value to an additional attribute of a Mini App identified by its id.

Request Body

{
    "field": "string",
    "value": "string"
}

Response

If the creation is successful, it will return HTTP response Status "201 Created" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/miniapps/{id}/attributes" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "field": "COUNTRY",
            "value": "Uruguay"
        }'

DELETE /miniapps/{id}/attributes/{field}

Deletes an additional attribute of a Mini App identified by its id.

Parameters

Name Type Description
id string Mini app ID (required)
field string Field (required)

Response

If the deletion is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X DELETE "$BASE_URL/v1/miniapps/{id}/attributes/{field}" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json"

GET /miniapps/{id}/locations

This endpoint gets a list of locations associated with a Mini App identified by its id.

Parameters

Name Type Description
id string Mini app ID (required)
location_id string Location ID (required)

Response

{
    "data": [
        {
            "id": "int",
            "name": "string",
            "geo_point": "GeoPoint"
        },
        ...
    ]
}

If an error has occurred, it will return HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X GET "$BASE_URL/v1/miniapps/{id}/locations/{location_id}" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json"

POST /miniapps/{id}/locations

Creates a new location associated with a Mini App identified by its id.

Request Body

{
    "name": "string",
    "geo_point": "GeoPoint"
}
GeoPoint: Geography object represented by the WKT text (https://en.wikipedia.org/wiki/Well-known_text).
Sample: "POINT(-56.163740158081055 -34.92478600243492)"

Response

{
    "data": {
        "id": "int"
    }
}

If the creation is successful, it will return HTTP response Status "201 Created". Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/miniapps/{id}/locations" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "name": "Central",
            "geo_point": "POINT(-56.163740158081055 -34.92478600243492)"
        }'

PUT /miniapps/{id}/locations/{location_id}

Updates the details of a specific location associated with a Mini App.

Parameters

Name Type Description
id string Mini app ID (required)
location_id string Location ID (required)

Request Body

{
    "name": "string",
    "geo_point": "GeoPoint"
}
GeoPoint: Geography object represented by the WKT text (https://en.wikipedia.org/wiki/Well-known_text).
Sample: "POINT(-56.163740158081055 -34.92478600243492)"

Response

If the update is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X PUT "$BASE_URL/v1/miniapps/{id}/locations/{location_id}" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "name": "Central",
            "geo_point": "POINT(-56.163740158081055 -34.92478600243492)"
        }'

DELETE /miniapps/{id}/locations/{location_id}

Deletes a specific location associated with a Mini App.

Parameters

Name Type Description
id string Mini app ID (required)
location_id string Location ID (required)

Response

If the deletion is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X DELETE "$BASE_URL/v1/miniapps/{id}/locations/{location_id}" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json"

GET /miniapps/{id}/versions/{version_id}

Gets details about a specific version of a Mini App.

Parameters

Name Type Description
id string Mini app ID (required)
version_id int Version ID (required)

Response

{
    "data": {
        "id": "int",
        "code": "string",
        "platform_id": "string",
        "metadata": "URL",
        "integrated_security": "boolean",
        "main_name": "string",
        "main_type": "string",
        "service_url": "URL"
    }
}

If an error has occurred, it will return HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X GET "$BASE_URL/v1/miniapps/{id}/versions/{version_id}" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json"

POST /miniapps/{id}/versions/upload

Uploads a Bundle file to create a version of mini app {id}. Note that the file extension must be ".mac" or the one indicated in the "File Types" parameter.

Request Body

The supported option is binary. It is useful for its simplicity and encodes the binary data directly in the request body.

It is mandatory to set a filename header value with the document name and extension. For example:

filename: MiniAppVersion.mac
Note: To learn how to create the MiniAppVersion.mac file, read HowTo: Create Mini App Version Bundle.

Response

If the creation is successful, it will return HTTP response Status "201 Created" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/miniapps/upload" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H 'filename: MiniAppVersion.mac' \
    -d '@/C:/temp/MiniAppVersion.mac'

POST /miniapps/{id}/versions

This endpoint creates a new version of the Mini App identified by its id.

Request Body

{
    "code": "string",
    "platform_id": "string",
    "metadata": "object_id",
    "integrated_security": "boolean",
    "main_name": "string",
    "main_type": "string",    /*Panel, Menu*/
    "service_url": "URL"
}

To learn how to generate an "object_id" read HowTo: Upload an image, video, or audio file via an API object Using Postman.

Response

{
    "data": {
        "id": "int",
        "code": "string",
    }
}

If the creation is successful, it will return HTTP response Status "201 Created". Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/miniapps/{id}/versions" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "platform_id": "iOS",
            "metadata": "gxupload:f292ef3f9ac94294a66cc353c4802c35",
            "integrated_security": true,
            "main_name": "startObject",
            "main_type": "Panel",
            "service_url": "https://apps6.genexus.com/Id555317f4080a0da816dc4eb15d69bc1b/"
        }'

PUT /miniapps/{id}/versions/{version_id}

Updates an existing version of a Mini App.

Parameters

Name Type Description
id string Mini app ID (required)
version_id int Version ID (required)

Request Body

{
    "platform_id": "string",
    "metadata": "object_id",
    "integrated_security": "boolean",
    "main_name": "string",
    "main_type": "string",    /*Panel, Menu*/
    "service_url": "URL"
}

To learn how to generate an "object_id" read HowTo: Upload an image, video, or audio file via an API object Using Postman.

Response

If the update is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X PUT "$BASE_URL/v1/miniapps/{id}/versions/{version_id}" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "platform_id": "iOS",
            "metadata": "gxupload:f292ef3f9ac94294a66cc353c4802c35",
            "integrated_security": true,
            "main_name": "startObject",
            "main_type": "Panel",
            "service_url": "https://apps6.genexus.com/Id555317f4080a0da816dc4eb15d69bc1b/"
        }'

POST /miniapps/{id}/versions/{version_id}/compatibility

Adds compatibility with the version of a Super App in the Mini App version.

Parameters

Name Type Description
id string Mini app ID (required)
version_id int Version ID (required)

Request Body

{
    "superapp_version": "int"
}

Response

If the compatibility is successfully added, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/miniapps/{id}/versions/{version_id}/compatibility" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "superapp_version": 1
        }'

POST /miniapps/{id}/versions/{version_id}/compatibility/delete

Deletes compatibility with the version of a Super App in the Mini App version.

Parameters

Name Type Description
id string Mini app ID (required)
version_id int Version ID (required)

Request Body

{
    "superapp_version": "int"
}

Response

If the compatibility is successfully deleted, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X PUT "$BASE_URL/v1/miniapps/{id}/versions/{version_id}/compatibility/delete" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
    -d '{
            "superapp_version": 1
        }'

POST /miniapps/{id}/versions/{version_id}/send_to_review

Sends to review a particular version of a Mini App identified by its id.

Parameters

Name Type Description
id string Mini app ID (required)
version_id int Version ID (required)

Response

If status setting is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/miniapps/{id}/versions/{version_id}/send_to_review" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \

POST /miniapps/{id}/versions/{version_id}/in_review

Sets a version of a Mini App as "in review".

Parameters

Name Type Description
id string Mini app ID (required)
version_id int Version ID (required)

Response

If status setting is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/miniapps/{id}/versions/{version_id}/in_review" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \

POST /miniapps/{id}/versions/{version_id}/rejected

This endpoint sets a version of a Mini App identified by its id and as "rejected".

Parameters

Name Type Description
id string Mini app ID (required)
version_id int Version ID (required)

Response

If status setting is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/miniapps/{id}/versions/{version_id}/rejected" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \

POST /miniapps/{id}/versions/{version_id}/ready

Sets a version of a Mini App identified by its id as "ready".

Parameters

Name Type Description
id string Mini app ID (required)
version_id int Version ID (required)

Response

If status setting is successful, it will return HTTP response Status "204 No Content" and no body. Otherwise, it will show HTTP StatusCode 40x and the body as errors.

cURL Sample

curl -X POST "$BASE_URL/v1/miniapps/{id}/versions/{version_id}/ready" \
    -H "APIKey-Auth: $API_TOKEN" \
    -H "Accept: application/json" \
 
Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant