App-Arena Developer documentation

App-Arena.com provides an infrastructure to manage and scale web-apps. Developers can publish and sell own web-apps through our sales channels. Sales partners can integrate our Web-App-CMS in their third-party software solutions and sell all published apps of the platform under their name and brand.

The code of this documentation is open source, and available on github. We appreciate every contribution to make this documentation better.

The main documentation for the site is organized into a couple sections:

Tools and Help

API-Explorer - Quick overview of all available requests and interactive testing

Glossary

Config-Value

Config values are used to provide content, settings and style for all applications. There is a list of different config types, which have different attributes.

Note

data_* parameters are different for each config type. The following table will list all parameters for all config types.

Config-Type Parameter Description
checkbox
  • string data_caption_off
  • string data_caption_on
  • string data_label
  • Caption for the ‘Off’-value
  • Caption for the ‘On’-value
  • Label for the checkbox
color    
css
  • enum data_compiler
  • [css | less] Compiler to process the value with
date    
image
  • string data_alt
  • string data_title
  • int data_height
  • int data_min_height
  • int data_max_height
  • int data_width
  • int data_min_width
  • int data_max_width
  • array data_format
  • bool data_nullable
  • HTML image alt attribute
  • HTML image title attribute
  • Forced image height (when set, image will be cropped)
  • Minimal allowed height value for this image
  • Max. allowed height value for this image
  • Forced image width (when set, image will be cropped)
  • Minimal allowed width value for this image
  • Max. allowed width value for this image
  • [jpg | png | gif ] Array of accepted image formats
  • Image value can be NULL or not
text
  • string data_type
  • string data_placeholder
  • string data_pattern
  • int data_min
  • int data_max
  • int data_min_length
  • int data_max_length
  • HTML5 input data type
  • HTML5 placeholder attribute
  • RegExp for input validation. Defines an input mask
  • Minimum value (validation for data_type “number”)
  • Maximum value (validation for data_type “number”)
  • Min. number of characters
  • Max. number of characters
textarea
  • enum data_editor
  • bool data_code_view
  • [wysiwyg, code, none] Rendered frontend editor
  • Code view allowed in the frontend
select    
multiselect    

Instance

An instance is a copy of an app template. Instances will be assigned to users so that they can modify and apps.

Template

A template is a predefined set of config values, translations and settings which can be generated instances with exactly the settings of.

API

API - Getting started

Note

Test all available requests in our API-Explorer.

API key

To request restricted information from the API, you need to add an API key to your request header:

GET /api/v1/models HTTP/1.1
Host: v2.app-arena.com
Authorization: Basic YOURAPIKEY

If you do not have access to the developer section yet, please drop us an email to s.buckpesch at app-arena.com with your contact data and will we get in touch with you and sent you an API key.

API Endpoint

All API URLs listed in this documentation are relative to https://v2.app-arena.com/api/v1/.

HTTP Verbs

The App-Arena API is a RESTful API. All requests can be made using one of the following HTTP verbs

  Valid for Description
GET Entity, Collection Request a single entity or a whole collection
POST Collection Creates a new entity in a collection
PUT Entity Updates an entity
DELETE Entity Deletes an entity

Passing Request Data

Request data is passed to the API by POSTing JSON objects to the API endpoints with the appropriate parameters. The documentation for each API call will contain more detail on the parameters accepted by the call.

Response Formats

We respond using HTTP Status Codes so that you can see immediately if you request was successful or an error occured. A complete list of HTTP response formats you can find here: HTTP-Statuscodes

  HTTP-Response on Success
GET 200 (OK)
POST 201 (Created)
PUT 200 (OK)
DELETE 204 (No content)

API - Companies calls

Tip

Test all of those requests in our API-Explorer.

/companies

POST /api/v1/companies
Example request body
{
    "name"              :"New App-Arena customer. {{$timestamp}}",
    "subdomain"         :"apparena_customer_{{$timestamp}}",
    "address1"          :"My street 1",
    "address2"          :"My street 2",
    "zip"               :"12345",
    "city"              :"My city",
    "country"           :"DE",
    "logo"              :"https://app-manager.s3.amazonaws.com/apps/models/3/0/4/0/de_DE/AppArena_Logo_aufweiss300x80_1413369016_0.png",
    "color1"            :"#478AB8",
    "color2"            :"#2D343D",
    "font"              :"helvetica-neue"
}
Data:
  • name (string) – (Required) Name of the company
  • parent_id (integer) – (Optional) ID of the company whos customer the newly created company should be like
  • subdomain (string) – (Required) Subdomain for all apps the company will create
  • address1 (string) – (Optional) Address field 1, e.g. Street 1
  • address2 (string) – (Optional) Address field 2, e.g. Street 2
  • zip (string) – (Optional) Zip code
  • city (string) – (Optional) City
  • country (string) – (Optional) Two letter country code http://en.wikipedia.org/wiki/ISO3166-1alpha-2
  • logo (string) – (Optional) Url to the company logo
  • color1 (string) – (Optional) Primary company color
  • color2 (string) – (Optional) Secondary company color
  • font (string) – (Optional) Company font name
Example response body
{
    "address1": "My street 1",
    "address2": "My street 2",
    "city": "My city",
    "color1": "#478AB8",
    "color2": "#2D343D",
    "country": "DE",
    "id": 440,
    "logo": "https:\/\/app-manager.s3.amazonaws.com\/apps\/models\/3\/0\/4\/0\/de_DE\/AppArena_Logo_aufweiss300x80_1413369016_0.png",
    "name": "New App-Arena customer. 1430140889",
    "parent_id": 1,
    "subdomain": "apparena_customer_1430140889",
    "timestamp": 1430140930,
    "zip": "12345",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/companies\/440"
        }
    }
}
GET /api/v1/companies
Example request body
{
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/companies?page=1"
        },
        "first": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/companies"
        },
        "last": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/companies?page=1"
        }
},
"_embedded": {
    "data": [
        {  ... },
        {
            "id": 1,
            "name": "iConsultants GmbH",
            "subdomain": "app-arena",
            "address1": "Kleingedankstr. 12",
            "zip": "50677",
            "city": "Kölle",
            "country": "DE",
            "logo": "https:\/\/app-manager.s3.amazonaws.com\/apps\/models\/3\/0\/4\/0\/de_DE\/AppArena_Logo_aufweiss300x80_1413369016_0.png",
            "color1": "#478AB8",
            "color2": "#2D343D",
            "users": { },
            "_links": {
                "self": {
                    "href": "https:\/\/v2.app-arena.com\/api\/v1\/companies\/1"
                }
            }
        }
        {  ... },
    ]
}

Parameter documentation of the companies.

/companies/:company_id

GET /api/v1/companies/:company_id
Path arguments:company_id – id of the company.
Example request body
{
    "id": 363,
    "name": "New App-Arena customer. 1429097807",
    "subdomain": "apparena_customer_1429097807",
    "address1": "My street 1",
    "address2": "My street 2",
    "zip": "12345",
    "city": "My city",
    "country": "DE",
    "logo": "https:\/\/app-manager.s3.amazonaws.com\/apps\/models\/3\/0\/4\/0\/de_DE\/AppArena_Logo_aufweiss300x80_1413369016_0.png",
    "color1": "#478AB8",
    "color2": "#2D343D",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/companies\/363"
        }
    }
}

Parameter documentation of the companies.

PUT /api/v1/companies/:company_id
Path arguments:company_id – id of the company.
Example request body
{
    "name"          :"Updated New Company Name _{{$timestamp}}",
    "subdomain"     :"updated_my_subdomain_{{$timestamp}}",
    "address1"      :"Updated My street 1",
    "address2"      :"Updated My street 2",
    "zip"           :"11112345",
    "city"          :"Updated My city",
    "country"       :"AT",
    "logo"          :"https://app-manager.s3.amazonaws.com/apps/models/3/0/4/0/de_DE/AppArena_Logo_aufweiss300x80_1413369016_0.png",
    "color1"        :"#111111",
    "color2"        :"#222222",
    "font"          :"verdana"
}
Data:
  • name (string) – (Required) Name of the company
  • subdomain (string) – (Optional) Subdomain for all apps the company will create
  • address1 (string) – (Optional) Address field 1, e.g. Street 1
  • address2 (string) – (Optional) Address field 1, e.g. Street 2
  • zip (string) – (Optional) Zip code
  • city (string) – (Optional) city
  • country (string) – (Optional) Two letter country code http://en.wikipedia.org/wiki/ISO3166-1alpha-2
  • corporate_identity (object) – (Optional) Corporate Identity configuration for faster app setup (values will be used as default settings, when creating apps)
  • logo (string) – (Optional) Url to the company logo
  • color1 (string) – (Optional) Primary company color
  • color2 (string) – (Optional) Secondary company color
  • font (string) – (Optional) Company font name
Example response body
{
    "address1": "Updated My street 1",
    "address2": "Updated My street 2",
    "city": "Updated My city",
    "color1": "#111111",
    "color2": "#222222",
    "country": "AT",
    "id": 440,
    "logo": "https:\/\/app-manager.s3.amazonaws.com\/apps\/models\/3\/0\/4\/0\/de_DE\/AppArena_Logo_aufweiss300x80_1413369016_0.png",
    "name": "Updated New Company Name_1430141082",
    "parent_id": 1,
    "subdomain": "updated_my_subdomain_1430141082",
    "timestamp": 1430141123,
    "zip": "11112345",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/companies\/440"
        }
    }
}
DELETE /api/v1/companies/:company_id

Successful DELETE requests will return HTTP-Status code 204.

/companies/:company_id/customers

GET /api/v1/companies/:company_id/customers
Path arguments:company_id – id of the company.
Example request body
{
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/companies\/383\/customers"
        }
    },
    "_embedded": {
        "data": [
            {
                "id": 363,
                "name": "New App-Arena customer. 1429097807",
                "subdomain": "apparena_customer_1429097807",
                "address1": "My street 1",
                "address2": "My street 2",
                "zip": "12345",
                "city": "My city",
                "country": "DE",
                "logo": "https:\/\/app-manager.s3.amazonaws.com\/apps\/models\/3\/0\/4\/0\/de_DE\/AppArena_Logo_aufweiss300x80_1413369016_0.png",
                "color1": "#478AB8",
                "color2": "#2D343D",
                "_links": {
                    "self": {
                        "href": "https:\/\/v2.app-arena.com\/api\/v1\/companies\/363"
                    }
                }
            }
        ]
    },
    "page_count": 0,
    "page_size": 25,
    "total_items": 0
}

Parameter documentation of the companies.

/companies/:company_id/instances

GET /api/v1/companies/:company_id/instances
Path arguments:company_id – id of the company.
Example request body
{
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/companies\/383\/instances"
        }
    },
    "_embedded": {
        "data": [
            {
                "active": 1,
                "base_url": "https:\/\/adventskranz.onlineapp.co\/",
                "description": "The description of my new instance.",
                "id": 9627,
                "lang_tag": "en_US",
                "m_id": 299,
                "name": "New Instance 1427295997",
                "template_id": 780,
                "timestamp": 1427296778,
                "_links": {
                    "self": {
                        "href": "https:\/\/v2-stage.app-arena.com\/api\/v1\/instances\/9627"
                    }
                }
            }
        ]
    },
    "page_count": 0,
    "page_size": 25,
    "total_items": 0
}

Link to the parameter documentation.

/companies/:company_id/users

GET /api/v1/companies/:company_id/users
Path arguments:company_id – id of the company.
Example request body
{
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/companies\/383\/users"
        }
    },
    "_embedded": {
        "data": [
            {
                "id": 8012,
                "username": "user-1429943426",
                "password": "$2y$15$6pE0VJ0CPHrnTzyx49HBjOtTQ4ywPl2CGgoewZLVV3yXKKomTyK\/C",
                "email": "extremterro@outlook.de",
                "displayName": null,
                "lang_tag": "de_DE",
                "state": 1,
                "roles": [
                    "user",
                    "admin"
                ],
                "company_id": 427,
                "_links": {
                    "self": {
                        "href": "https:\/\/v2.app-arena.com\/api\/v1\/companies\/427\/users\/8012"
                    }
                }
            }
        ]
    },
    "page_count": 1,
    "page_size": 25,
    "total_items": 1
}
Data:
  • id (string) – ID of the User
  • username (string) – Username created by the User
  • password (string) – Password for the User
  • email (string) – Email of the current User
  • displayName (string) – Username which is displayed
  • lang_tag (string) – Language of the current User
  • state (int) – (NOCH EINFÜGEN)
  • roles (string) – Die dem User zugeteilte Rolle z.B. Admin oder User
  • company_id (int) – ID of the company of the User

API - Instances calls

Tip

Test all of those requests in our API-Explorer.

/instances

POST /api/v1/instances
Create a new instance
{
    "template_id":    780,
    "name":           "New Instance {{$timestamp}}",
    "description":    "The description of my new instance.",
    "lang_tag":       "en_US"
}
Data:
  • name (string) – (Required) Name of the instance
  • template_id (integer) – (Required) Template ID the instance should be created of
  • company_id (int) – (Optional) Company_id of the company the instance should be created for
  • template_type (enum) – (Optional) The entity the instance should be generated of
  • description (string) – (Optional) Description of the instance.
  • lang_tag (enum) – (Optional) [“sq_AL”, “ar_DZ”, “ar_BH”, “ar_EG”, “ar_IQ”, “ar_JO”, “ar_KW”, “ar_LB”, “ar_LY”, “ar_MA”, “ar_OM”, “ar_QA”, “ar_SA”, “ar_SD”, “ar_SY”, “ar_TN”, “ar_AE”, “ar_YE”, “be_BY”, “bg_BG”, “ca_ES”,”zh_CN”, “zh_HK”, “zh_SG”, “hr_HR”, “cs_CZ”, “da_DK”, “nl_BE”, “nl_NL”, “en_AU”, “en_CA”, “en_IN”, “en_IE”,”en_MT”, “en_NZ”, “en_PH”, “en_SG”, “en_ZA”, “en_GB”, “en_US”, “et_EE”, “fi_FI”, “fr_BE”, “fr_CA”, “fr_FR”,”fr_LU”, “fr_CH”, “de_AT”, “de_DE”, “de_LU”, “de_CH”, “el_CY”, “el_GR”, “iw_IL”, “hi_IN”, “hu_HU”, “is_IS”,”in_ID”, “ga_IE”, “it_IT”, “it_CH”, “ja_JP”, “ja_JP”, “ko_KR”, “lv_LV”, “lt_LT”, “mk_MK”, “ms_MY”, “mt_MT”, “no_NO”, “no_NO”, “pl_PL”, “pt_BR”, “pt_PT”, “ro_RO”, “ru_RU”, “sr_BA”, “sr_ME”, “sr_CS”, “sr_RS”, “sk_SK”,”sl_SI”, “es_AR”, “es_BO”, “es_CL”, “es_CO”, “es_CR”, “es_DO”, “es_EC”, “es_SV”, “es_GT”, “es_HN”, “es_MX”,”es_NI”, “es_PA”, “es_PY”, “es_PE”, “es_PR”, “es_ES”, “es_US”, “es_UY”, “es_VE”, “sv_SE”, “th_TH”, “th_TH”,”tr_TR”, “uk_UA”, “vi_VN”]
Newly created instance object
{
    "active": 1,
    "base_url": "https:\/\/adventskranz.onlineapp.co\/",
    "description": "The description of my new instance.",
    "expiration_date": "2015-04-27",
    "fb_app_id": "725444547534506",
    "fb_app_namespace": "advents-kranz",
    "fb_page_id": null,
    "fb_page_name": null,
    "fb_page_url": "",
    "id": 9865,
    "lang_tag": "en_US",
    "m_id": 299,
    "name": "New Instance 1429522046",
    "template_id": 780,
    "timestamp": 1429522082,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9865"
        }
    }
}

Link to the parameter documentation.

GET /api/v1/instances
Retrieve a list of instances.
{
    "_links": {
        "self": {
            "href": "https://v2-stage.app-arena.com/api/v1/instances?page=1"
        },
        "first": {
            "href": "https://v2-stage.app-arena.com/api/v1/instances"
        },
        "last": {
            "href": "https://v2-stage.app-arena.com/api/v1/instances?page=371"
        },
        "next": {
            "href": "https://v2-stage.app-arena.com/api/v1/instances?page=2"
        }
    },
    "_embedded": {
        "data": [
            {  ... },
            {
                "active": 1,
                "base_url": "https://dev.iconsultants.eu/git/Photopuzzle-App/",
                "description": "",
                "id": 68,
                "lang_tag": "en_US",
                "m_id": 42,
                "name": "Test Photopuzzle",
                "template_id": 0,
                "_links": {
                    "self": {
                        "href": "https://v2-stage.app-arena.com/api/v1/instances/68"
                    }
                }
            },
            {  ... },
        ]
    },
    "page_count": 371,
    "page_size": 25,
    "total_items": 9270
}

Link to the parameter documentation.

/instances/:i_id

GET /api/v1/instances/:i_id
Path arguments:i_id – ID of the instance.
Retrieve basic information of a single instance.
{
    "active": 1,
    "base_url": "https:\/\/adventskranz.onlineapp.co\/",
    "description": "The description of my new instance.",
    "expiration_date": "2015-05-05",
    "fb_app_id": "725444547534506",
    "fb_app_namespace": "advents-kranz",
    "fb_page_id": null,
    "fb_page_name": null,
    "fb_page_url": "",
    "id": 9905,
    "lang_tag": "en_US",
    "m_id": 299,
    "name": "New Instance 1430202395",
    "template_id": 780,
    "timestamp": 1430202441,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9905"
        }
    }
}
Data:
  • active (bool) – Is this instance active or not (can it be used by the client)
  • base_url (string) – Public URI to access the instance
  • description (string) – Description for the instance
  • expiration_date (string) – Until which date the instance can be used. Format: YYYY-MM-DD
  • fb_app_id (string) – Facebook App ID used for this instance,
  • fb_app_namespace (string) – Facebook App namespace used for this instance
  • fb_page_id (string) – Facebook Fanpage ID the instance is installed on
  • fb_page_name (string) – Facebook Fanpage Name the instance is installed on
  • fb_page_url (string) – Facebook Fanpage Url the instance is installed on
  • id (int) – ID of the instance
  • lang_tag (string) – language of for new instances
  • m_id (int) – ID of the app model of the instance
  • name (string) – Name of the instance
  • template_id (int) – ID of the template of this instance
  • timestamp (int) – Creation/Update time on the server
PUT /api/v1/instances/:i_id
Path arguments:i_id – ID of the instance.
Example request body
{
    "name": "This is my new instance name. It's changed!",
    "expiration_date": "2015-12-24"
}

Link to the parameter documentation.

Example response body
{
    "active": 1,
    "base_url": "https:\/\/adventskranz.onlineapp.co\/",
    "description": "The description of my new instance.",
    "expiration_date": "2015-12-24",
    "fb_app_id": "725444547534506",
    "fb_app_namespace": "advents-kranz",
    "fb_page_id": "",
    "fb_page_name": "",
    "fb_page_url": "https:\/\/www.facebook.com\/",
    "id": 9759,
    "lang_tag": "en_US",
    "m_id": 299,
    "name": "This is my new instance name. It's changed!",
    "template_id": 780,
    "timestamp": 1427960768,
    "_links": {
    "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9759"
        }
    }
}

Link to the parameter documentation.

DELETE /api/v1/instances/:i_id
Path arguments:i_id – id of the instance.

Successful DELETE requests will return HTTP-Status code 204.

/instances/:i_id/configs

GET /api/v1/instances/:i_id/configs
Path arguments:i_id – id of the instance.
Example request body
{
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9847\/configs?page=1"
        },
        "first": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9847\/configs"
        },
        "last": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9847\/configs?page=11"
        },
        "next": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9847\/configs?page=2"
        }
    },
    "_embedded": {
        "data": [
            {  ... },
            {
                "description": "Show debug information for this instance?",
                "id": "admin_debug_mode",
                "lang_tag": "de_DE",
                "name": "[Show debug information]",
                "template_id": 0,
                "type": "checkbox",
                "value": 0,
                "_links": {
                    "self": {
                        "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9847\/configs\/admin_debug_mode"
                    }
                }
            },
            {  ... },
        }
    }
}

Documentation of the configs parameter.

/instances/:i_id/configs/:config_id

GET /api/v1/instances/:i_id/configs/:config_id(checkbox)
Path arguments:
  • model_id – ID of the config.
  • i_id – ID of the instance.
Retrieve basic information of a single model.
{
    "description": "Zusätzliche Loginabfrage für Export und löschen der Userdaten, inklusive Log-Eintrag der angemeldeten Person. Funktioniert nur mit App-Internen Logins, nicht mit Social-Connects!",
    "id": "activate_admin_secure_login",
    "instance_id": 9849,
    "lang_tag": "de_DE",
    "name": "[Admin Sicherheitslogin aktivieren]",
    "template_id": 780,
    "type": "checkbox",
    "value": 0,
    "timestamp": 1429104304,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9849\/configs\/activate_admin_secure_login"
        }
    }
}

Documentation of the configs parameter.

GET /api/v1/instances/:i_id/configs/:config_id(color)
Path arguments:
  • model_id – ID of the config.
  • i_id – ID of the instance.
Retrieve basic information of a single model.
{
    "description": "Die Hintergrundfarbe betrifft alle Seiten der App, inklusive Footer. Empfehlung: Wählen Sie eine helle, neutrale Farbe (z.B. weiß). Weitere Infos siehe Grafikleitfaden.",
    "id": "app_color_1",
    "instance_id": 9849,
    "lang_tag": "de_DE",
    "name": "Hintergrundfarbe",
    "template_id": 780,
    "type": "color",
    "value": "#ffffff",
    "timestamp": 1429104762,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9849\/configs\/app_color_1"
        }
    }
}

Documentation of the configs parameter.

GET /api/v1/instances/:i_id/configs/:config_id(css)
Path arguments:
  • model_id – ID of the config.
  • i_id – ID of the instance.
Retrieve basic information of a single model.
{
    "compiler": "less",
    "description": "Diese CSS Konfiguration wird vom Entwickler erstellt und enthält die wichtigsten CSS Formatierungen der App.",
    "id": "css_app",
    "instance_id": 9849,
    "lang_tag": "de_DE",
    "name": "CSS der Applikation",
    "src": "https:\/\/www.app-arena.com\/uploads\/apps\/model\/299\/0\/de_DE\/css\/css_app.css",
    "template_id": 780,
    "type": "css",
    "value": "Here you find the complete styling of the application."
    "timestamp": 1429104816,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9849\/configs\/css_app"
        }
    }
}

Documentation of the configs parameter.

GET /api/v1/instances/:i_id/configs/:config_id(date)
Path arguments:
  • model_id – ID of the config.
  • i_id – ID of the instance.
Retrieve basic information of a single model.
{
    "description": "Nutzer können ab 0.01 Uhr des von Ihnen festgelegten Datums teilnehmen.",
    "id": "door_11_validity_period_start",
    "instance_id": 9849,
    "lang_tag": "de_DE",
    "name": "Startdatum für die Teilnahme",
    "template_id": 780,
    "type": "date",
    "value": "2014-12-11",
    "timestamp": 1429105031,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9849\/configs\/door_11_validity_period_start"
        }
    }
}

Documentation of the configs parameter.

GET /api/v1/instances/:i_id/configs/:config_id(image)
Path arguments:
  • model_id – ID of the config.
  • i_id – ID of the instance.
Retrieve basic information of a single model.
{
    "description": "Das Unternehmenslogo wird auf der Header-Grafik abgebildet. Alternativ können Sie das Logo in Ihre Grafiken integrieren und die automatische Ansicht des Logos in dem Punkt Header deaktivieren. Empfohlene Größe: 180 x 180 px. Weitere Infos siehe Grafikleitfaden.",
    "height": "",
    "id": "app_logo",
    "instance_id": 9849,
    "lang_tag": "de_DE",
    "name": "Unternehmenslogo",
    "size": "",
    "src": "https:\/\/app-manager.s3.amazonaws.com\/apps\/models\/2\/9\/9\/0\/de_DE\/01_01_logo_1411631048_0.png",
    "template_id": 780,
    "type": "image",
    "value": "https:\/\/app-manager.s3.amazonaws.com\/apps\/models\/2\/9\/9\/0\/de_DE\/01_01_logo_1411631048_0.png",
    "width": "",
    "timestamp": 1429105088,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9849\/configs\/app_logo"
        }
    }
}

Documentation of the configs parameter.

GET /api/v1/instances/:i_id/configs/:config_id(multiselect)
Path arguments:
  • model_id – ID of the config.
  • i_id – ID of the instance.
Retrieve basic information of a single model.
{
    "description": "Geben Sie hier an, welche Art von Inhalten Sie hinter dem Türchen anzeigen möchten. Die jeweiligen Inhalte legen Sie innerhalb der nächsten Schritte fest. Weitere Infos siehe Konfigurationsleitfaden.",
    "id": "door_1_pages_activated",
    "instance_id": 9849,
    "lang_tag": "de_DE",
    "name": "Inhalte des Türchens",
    "source": [
        {
            "value": "none",
            "text": "Keine Seite"
        },
        {
            "value": "page",
            "text": "Inhaltsseite"
        },
        {
            "value": "quiz",
            "text": "Quiz-Seite"
        }
    ],
    "template_id": 780,
    "type": "multiselect",
    "value": [
        "page",
        "quiz"
    ],
    "timestamp": 1429105338,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9849\/configs\/door_1_pages_activated"
        }
    }
}

Documentation of the configs parameter.

GET /api/v1/instances/:i_id/configs/:config_id(select)
Path arguments:
  • model_id – ID of the config.
  • i_id – ID of the instance.
Retrieve basic information of a single model.
{
    "description": "Wählen Sie eine der vordefinierten Schriftarten aus oder legen Sie per CSS eine eigene Schriftart fest. Weitere Infos siehe Grafikleitfaden.",
    "id": "app_font_body",
    "instance_id": 9849,
    "lang_tag": "de_DE",
    "name": "Schriftart für Textkörper",
    "source": [
        {  ... },
        {
            "value": "arial",
            "text": "Arial"
        },
        {
            "value": "delius-Swash",
            "text": "Delius Swash Caps"
        }
        {  ... },
    ],
    "template_id": 780,
    "type": "select",
    "value": "source-sans-pro",
    "timestamp": 1429105490,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9849\/configs\/app_font_body"
        }
    }
}

Documentation of the configs parameter.

GET /api/v1/instances/:i_id/configs/:config_id(text)
Path arguments:
  • model_id – ID of the config.
  • i_id – ID of the instance.
Retrieve basic information of a single model.
{
    "description": "Die E-Mail-Adresse des Ansprechpartners wird nicht veröffentlicht oder an Dritte weitergegeben. Beispiel: maxmustermann@unternehmensname.com.",
    "format": "text",
    "id": "admin_mails",
    "instance_id": 9849,
    "lang_tag": "de_DE",
    "maxlength": "",
    "name": "E-Mail-Adresse des Ansprechpartners (nicht öffentlich sichtbar)",
    "placeholder": "",
    "template_id": 780,
    "type": "text",
    "value": "",
    "timestamp": 1429105669,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9849\/configs\/admin_mails"
        }
    }
}

Documentation of the configs parameter.

GET /api/v1/instances/:i_id/configs/:config_id(textarea)
Path arguments:
  • model_id – ID of the config.
  • i_id – ID of the instance.
Retrieve basic information of a single model.
{
    "description": "<p>Erklärung, die ein Admin bestätigen muss, bevor er die Teilnehmer-Daten des Wettbewerbs exportieren darf.\ \ <\/p>",
    "id": "admin_export_terms",
    "instance_id": 9849,
    "lang_tag": "de_DE",
    "name": "[Erklärung zur Datenverwendung beim Export]",
    "template_id": 780,
    "type": "textarea",
    "value": "<h3>Erklärung zur vertraulichen Datenverwendung<\/h3>Hiermit bestätige ich, dass die durch diese Facebook Applikation erhobenen Daten ausschließlich zur Durchführung dieses Wettbewerbs verwendet werden. Zudem bestätige ich die Daten nach Ablauf der Werbeaktion zu löschen. Die iConsultants GmbH wird von jeglicher Haftung, die durch den Missbrauch der zur Verfügung gestellten Daten entsteht, befreit.",
    "timestamp": 1429105717,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9849\/configs\/admin_export_terms"
        }
    }
}

Documentation of the configs parameter.

PUT /api/v1/instances/:i_id/configs/:config_id(checkbox)
Path arguments:
  • i_id – ID of the instance.
  • model_id – ID of the config.
Example request body
{
    "name":               "Updated Name of Checkbox",
    "value":              false,
    "description":        "Updated description of my checkbox",
    "data_caption_off":   "Updated Custom Off",
    "data_caption_on":    "Updated Custom On",
    "data_label":         "Updated Optional label"
}
Example response body
{
    "description": "Zusätzliche Loginabfrage für Export und löschen der Userdaten, inklusive Log-Eintrag der angemeldeten Person. Funktioniert nur mit App-Internen Logins, nicht mit Social-Connects!",
    "id": "activate_admin_secure_login",
    "instance_id": 9910,
    "lang_tag": "de_DE",
    "name": "[Admin Sicherheitslogin aktivieren]",
    "template_id": 780,
    "type": "checkbox",
    "value": 0,
    "timestamp": 1430291456,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9910\/configs\/activate_admin_secure_login"
        }
    }
}

Table with data_ parameters and the description of them.

PUT /api/v1/instances/:i_id/configs/:config_id(color)
Path arguments:
  • i_id – ID of the instance.
  • model_id – ID of the config.
Example request body
{
    "name":       "Updated Name of Color",
    "value":      "#EEEEEE",
    "description":"Updated The description of my color"
}
Data:
  • name (string) – (Optional) Name for the config value
  • value (string) – (Optional) Default value for the config element
  • description (string) – (Optional) Description for the instance
Example response body
{
    "description": "Die Hintergrundfarbe betrifft alle Seiten der App, inklusive Footer. Empfehlung: Wählen Sie eine helle, neutrale Farbe (z.B. weiß). Weitere Infos siehe Grafikleitfaden.",
    "id": "app_color_1",
    "instance_id": 9910,
    "lang_tag": "de_DE",
    "name": "Hintergrundfarbe",
    "template_id": 780,
    "type": "color",
    "value": "#ffffff",
    "timestamp": 1430291613,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9910\/configs\/app_color_1"
        }
    }
}

Table with data_ parameters and the description of them.

PUT /api/v1/instances/:i_id/configs/:config_id(css)
Path arguments:
  • i_id – ID of the instance.
  • model_id – ID of the config.
Example request body
{
    "name":           "Updated Name of my CSS config",
    "value":          "body { text-align:center; text-color:red; } h1.h1, h2, h3 { font-size: 30px; }",
    "description":    "Updated The description of my config value.",
    "data_compiler":  "css"
}
Data:
  • name (string) – (Optional) Name for the config value
  • value (string) – (Optional) Default value for the config element
  • description (string) – (Optional) Description for the instance
Example response body
{
    "compiler": "less",
    "description": "Diese CSS Konfiguration wird vom Entwickler erstellt und enthält die wichtigsten CSS Formatierungen der App.",
    "id": "css_app",
    "instance_id": 9910,
    "lang_tag": "de_DE",
    "name": "CSS der Applikation",
    "src": "https:\/\/www.app-arena.com\/uploads\/apps\/model\/299\/0\/de_DE\/css\/css_app.css",
    "template_id": 780,
    "type": "css",
    "value": "Here you find the complete styling of the application.",
    "timestamp": 1430291682,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9910\/configs\/css_app"
        }
    }
}

Table with data_ parameters and the description of them.

PUT /api/v1/instances/:i_id/configs/:config_id(date) DEPRECATED
Path arguments:
  • i_id – ID of the instance.
  • model_id – ID of the config.
Example request body
{
    "name":       "Updated Name of my date",
    "value":      "1911-02-22",
    "description":"Updated Enter a valid date"
}
Data:
  • name (string) – (Optional) Name for the config value
  • value (string) – (Optional) value for the config element
  • description (string) – (Optional) Description for the instance
Example response body
{
    "description": "Nutzer können ab 0.01 Uhr des von Ihnen festgelegten Datums teilnehmen.",
    "id": "door_11_validity_period_start",
    "instance_id": 9910,
    "lang_tag": "de_DE",
    "name": "Startdatum für die Teilnahme",
    "template_id": 780,
    "type": "date",
    "value": "2014-12-11",
    "timestamp": 1430291882,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9910\/configs\/door_11_validity_period_start"
        }
    }
}

Table with data_ parameters and the description of them.

PUT /api/v1/instances/:i_id/configs/:config_id(image)
Path arguments:
  • i_id – ID of the instance.
  • model_id – ID of the config.
Example request body
{
    "name":           "Updated Name of my image config value",
    "value":          "https://app-manager.s3.amazonaws.com/apps/models/3/0/4/0/de_DE/AppArena_Logo_aufblau_1426686667_0.png",
    "description":    "Updated The description of my config value.",
    "data_alt":       "Updated Service Flatrate promotion image",
    "data_title":     "Updated Save 25% in may on our service flatrate",
    "data_max_height":2000,
    "data_max_width": 2000,
    "data_min_height":200,
    "data_min_width" :200,
    "data_height":    600,
    "data_width":     1000,
    "data_format":    ["jpg"],
    "data_nullable":  true
}
Data:
  • name (string) – (Optional) Name for the config value
  • value (string) – (Optional) value for the config element
  • description (string) – (Optional) Description for the instance
Example response body
{
    "description": "Das Unternehmenslogo wird auf der Header-Grafik abgebildet. Alternativ können Sie das Logo in Ihre Grafiken integrieren und die automatische Ansicht des Logos in dem Punkt "Header” deaktivieren. Empfohlene Größe: 180 x 180 px. Weitere Infos siehe Grafikleitfaden.",
    "height": "",
    "id": "app_logo",
    "instance_id": 9910,
    "lang_tag": "de_DE",
    "name": "Unternehmenslogo",
    "size": "",
    "src": "https:\/\/app-manager.s3.amazonaws.com\/apps\/models\/2\/9\/9\/0\/de_DE\/01_01_logo_1411631048_0.png",
    "template_id": 780,
    "type": "image",
    "value": "https:\/\/app-manager.s3.amazonaws.com\/apps\/models\/2\/9\/9\/0\/de_DE\/01_01_logo_1411631048_0.png",
    "width": "",
    "timestamp": 1430291933,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9910\/configs\/app_logo"
        }
    }
}

Table with data_ parameters and the description of them.

PUT /api/v1/instances/:i_id/configs/:config_id(multiselect)
Path arguments:
  • i_id – ID of the instance.
  • model_id – ID of the config.
Example request body
{
    "name":"Updated Name of my config value",
    "description":"Updated The description of my config value.",
    "source":[
        {
            "value": "updated_value_id_1",
            "text": "Updated Text for value 1"
        },
        {
            "value": "value_id_2",
            "text": "Updated Text for value 2"
        },
        {
            "value": "updated_value_id_3",
            "text": "Updated Text for value 3"
        }
    ],
    "value":[ "page" ]
}
Data:
  • name (string) – (Optional) Name for the config value
  • value (array) – (Optional) All values which should be selected by defaul
  • description (string) – (Optional) Description for the instance
  • source (array) – (Optional) All available options of the select config value
Example response body
{
    "description": "Geben Sie hier an, welche Art von Inhalten Sie hinter dem Türchen anzeigen möchten. Die jeweiligen Inhalte legen Sie innerhalb der nächsten Schritte fest. Weitere Infos siehe Konfigurationsleitfaden.",
    "id": "door_1_pages_activated",
    "instance_id": 9910,
    "lang_tag": "de_DE",
    "name": "Inhalte des Türchens",
    "source": [
        {
            "value": "none",
            "text": "Keine Seite"
        },
        {
            "value": "page",
            "text": "Inhaltsseite"
        },
        {
            "value": "quiz",
            "text": "Quiz-Seite"
        }
    ],
    "template_id": 780,
    "type": "multiselect",
    "value": [
    "page",
    "quiz"
    ],
    "timestamp": 1430291995,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9910\/configs\/door_1_pages_activated"
        }
    }
}

Table with data_ parameters and the description of them.

PUT /api/v1/instances/:i_id/configs/:config_id(select)
Path arguments:
  • i_id – ID of the instance.
  • model_id – ID of the config.
Example request body
{
    "name":"Updated Name of my config value",
    "description":"The description of my config value.",
    "source":[
        {
            "value": "ubuntu",
            "text": "New Ubuntu text"
        },
        {
            "value": "updated_value_id_2",
            "text": "Updated Text for value 2"
        },
        {
            "value": "value_id_3",
            "text": "Updated Text for value 3"
        }
    ],
    "value":"ubuntu"
}
Data:
  • name (string) – (Optional) Name for the config value
  • value (string) – (Optional) Default value for the config element
  • description (string) – (Optional) Description for the instance
  • source (array) – (Optional) All available options of the select config value
Example response body
{
    "description": "Wählen Sie eine der vordefinierten Schriftarten aus oder legen Sie per CSS eine eigene Schriftart fest. Weitere Infos siehe Grafikleitfaden.",
    "id": "app_font_body",
    "instance_id": 9910,
    "lang_tag": "de_DE",
    "name": "Schriftart für Textkörper",
    "source": [
        {
            "value": "arial",
            "text": "Arial"
        },
        {
            "value": "delius-Swash",
            "text": "Delius Swash Caps"
        }
    ],
    "template_id": 780,
    "type": "select",
    "value": "source-sans-pro",
    "timestamp": 1430292095,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9910\/configs\/app_font_body"
        }
    }
}

Table with data_ parameters and the description of them.

PUT /api/v1/instances/:i_id/configs/:config_id(text)
Path arguments:
  • i_id – ID of the instance.
  • model_id – ID of the config.
Example request body
{
    "name":"Updated Name of my config value",
    "value":"updated@email.com",
    "description":"Updated Enter a valid Email (max. 22 lowercase characters or numbers, no whitespaces, @).",
    "data_type":"email",
    "data_placeholder":"Updated Enter email here",
    "data_pattern":"[a-zA-Z0-9@]{22}"
}
Data:
  • name (string) – (Optional) Name of the config value
  • value (string) – (Optional) value for the config element
  • description (string) – (Optional) Description for the config value
  • min (integer) – (Optional) Minimum value (validation for type “number”)
  • max (integer) – (Optional) Maximum value (validation for type “number”)
  • max_lenght (integer) – (Optional) Maximum value (validation for type “text”)
  • min_lenght (integer) – (Optional) Minimum value (validation for type “text”)
  • pattern (string) – (Optional) Regular expression for input validation defines an input mask
Example response body
{
    "description": "Die E-Mail-Adresse des Ansprechpartners wird nicht veröffentlicht oder an Dritte weitergegeben. Beispiel: maxmustermann@unternehmensname.com.",
    "format": "text",
    "id": "admin_mails",
    "instance_id": 9910,
    "lang_tag": "de_DE",
    "maxlength": "",
    "name": "E-Mail-Adresse des Ansprechpartners (nicht öffentlich sichtbar)",
    "placeholder": "",
    "template_id": 780,
    "type": "text",
    "value": "",
    "timestamp": 1430292203,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9910\/configs\/admin_mails"
        }
    }
}

Table with data_ parameters and the description of them.

PUT /api/v1/instances/:i_id/configs/:config_id(textarea)
Path arguments:
  • i_id – ID of the instance.
  • model_id – ID of the config.
Example request body
{
    "name":       "Updated Name of my config value",
    "value":      "<h1>Updated This is my default HTML content</h1>",
    "description":"Updated The description of my config value.",
    "data_editor":"code"
}
Data:
  • name (string) – (Optional) Name of the config value
  • value (string) – (Optional) Default value for the config element
  • description (string) – (Optional) Description for the config value
  • editor (enum) – (Optional) Which editor should be shown to the user?
Example response body
{
    "description": "<p>Erklärung, die ein Admin bestätigen muss, bevor er die Teilnehmer-Daten des Wettbewerbs exportieren darf.\ \ <\/p>",
    "id": "admin_export_terms",
    "instance_id": 9910,
    "lang_tag": "de_DE",
    "name": "[Erklärung zur Datenverwendung beim Export]",
    "template_id": 780,
    "type": "textarea",
    "value": "<h3>Erklärung zur vertraulichen Datenverwendung<\/h3>Hiermit bestätige ich, dass die durch diese Facebook Applikation erhobenen Daten ausschließlich zur Durchführung dieses Wettbewerbs verwendet werden. Zudem bestätige ich die Daten nach Ablauf der Werbeaktion zu löschen. Die iConsultants GmbH wird von jeglicher Haftung, die durch den Missbrauch der zur Verfügung gestellten Daten entsteht, befreit.",
    "timestamp": 1430292255,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9910\/configs\/admin_export_terms"
        }
    }
}

Table with data_ parameters and the description of them.

DELETE /api/v1/instances/:i_id/configs/:config_id

Successful DELETE requests will return HTTP-Status code 204.

/instances/:i_id/languages

GET /api/v1/instances/:i_id/languages
Example request body
{
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9847\/languages?page=1"
        },
        "first": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9847\/languages"
        },
        "last": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9847\/languages?page=1"
        }
    },
    "_embedded": {
        "data": [
            {
                "lang_id": 409,
                "name": "German (Germany)",
                "is_activated": 1,
                "lang_tag": "de_DE"
            },
            {
                "lang_id": 410,
                "name": "English (United States)",
                "is_activated": 0,
                "lang_tag": "en_US"
            },
            {
                "lang_id": 413,
                "name": "French (France)",
                "is_activated": 0,
                "lang_tag": "fr_FR"
            },
            {
                "lang_id": 488,
                "name": "German (Austria)",
                "is_activated": 0,
                "lang_tag": "de_AT"
            },
            {
                "lang_id": 490,
                "name": "Italian (Italy)",
                "is_activated": 0,
                "lang_tag": "it_IT"
            },
            {
                "lang_id": 524,
                "name": "Spanish (Spain)",
                "is_activated": 0,
                "lang_tag": "es_ES"
            }
        ]
    },
    "page_count": 1,
    "page_size": 25,
    "total_items": 6
}

Documentation for the language.

/instances/:i_id/languages/:lang_tag

PUT /api/v1/instances/:i_id/languages/:lang_tag
Path arguments:
  • i_id – ID of the instance.
  • lang_tag – ID of the language.
Example request body
{
    "is_activated":0
}
Example response body
{
    "is_activated": 0,
    "lang_tag": "en_US",
    "timestamp": 1430141442,
    "id": "en_US",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9903\/languages\/en_US"
        }
    }
}

/instances/:i_id/languages/:lang_tag/translations

GET /api/v1/instances/:i_id/languages/:lang_tag/translations
Path arguments:
  • i_id – ID of the instance.
  • lang_tag – ID of the language.
Example request body
{
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9847\/languages\/en_US\/translations?page=1"
        },
        "first": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9847\/languages\/en_US\/translations"
        },
        "last": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9847\/languages\/en_US\/translations?page=19"
        },
        "next": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/instances\/9847\/languages\/en_US\/translations?page=2"
        }
    },
    "_embedded": {
    "data": [
        {  ... },
        {
            "translation_id": "vote",
            "value": "Abstimmen"
        },
        {
            "translation_id": "please_enter_custom_field",
            "value": "Bitte geben Sie einen Wert für %s an."
        },
        {
            "translation_id": "select_video",
            "value": "Video auswählen"
        },
        {  ... },
    }
}

Documentation for the language.

/instances/{i_id}/languages/:lang_tag/translation/:translation_id

PUT /api/v1/instances/{i_id}/languages/:lang_tag/translation/:translation_id
Path arguments:
  • i_id – ID of the translation.
  • lang_tag – ID of the language.
  • translation_id – ID of the translation.
Example request body
{
    "value":"UPDATED Il mio test translation!"
}
Data:value (string) – (Required) Translation

Documentation for the language.

API - Models calls

Tip

Test all of those requests in our API-Explorer.

/models

POST /api/v1/models
Create a new model
{
    "name":           "My shiny new app",
    "description":    "Using this app you will superpower your skills.",
    "base_url":       "https://www.url-to-your-app.com/appsubfolder/"
}
Data:
  • name (string) – (Required) Name of the model.
  • description (string) – (Optional) Description of the model.
  • base_url (string) – (Optional) Public Url path to your app
Newly created model object
{
    "app_domain": "",
    "base_url": "https:\/\/www.url-to-your-app.com\/appsubfolder\/",
    "created_at": "2015-03-24",
    "description": "Using this app you will superpower your skills.",
    "fb_app_id": "",
    "fb_app_namespace": "",
    "fb_app_secret": "",
    "fb_canvas_url": "",
    "id": 312,
    "lang_tag": "de_DE",
    "name": "My shiny new app",
    "secret": "fd0691803888c9171abfde4ec8d00747",
    "validity": "",
    "timestamp": 1427207187,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/312"
        }
    }
}
GET /api/v1/models
Retrieve a list of models.
{
   "_links":{ ... },
   "_embedded":{
      "data":[
         {  ... },
         {
            "base_url":"https:\/\/dev.iconsultants.eu\/git\/Photopuzzle-App\/",
            "description":"A Picture Puzzle Application in which the user have to find the right picture part in the full image.",
            "id":42,
            "lang_tag":"de_DE",
            "name":"*BETA* Picture puzzle",
            "_links":{
               "self":{
                  "href":"https:\/\/v2.app-arena.com\/api\/v1\/models\/42"
               }
            }
         },
         {  ... },
      ]
   },
   "page_count":8,
   "page_size":25,
   "total_items":176
}

Documentation of the models.

/models/:model_id

GET /api/v1/models/:model_id
Path arguments:model_id – ID of the model.
Retrieve basic information of a single model.
{
   "app_domain":"your-domain.com",
   "base_url":"https:\/\/www.your-domain.com\/myappsubfolder\/",
   "created_at":"2015-03-05",
   "description":"Get new super-powers using this cool web-app.",
   "fb_app_id":"1234567890123456",
   "fb_app_secret":"1234567890123456789012345612345678901234567890",
   "id":310,
   "lang_tag":"de_DE",
   "name":"My Super-Power App",
   "secret":"12345678901234567890123456",
   "validity":"90",
   "_links":{
      "self":{
         "href":"https:\/\/v2.app-arena.com\/api\/v1\/models\/310"
      }
   }
}
Data:
  • app_domain (string) – Date of Build.
  • base_url (string) – Error from Sphinx build process.
  • created_at (string) – Build id.
  • description (string) – Description for the model
  • fb_app_id (string) – Facebook app id
  • fb_app_secret (string) – Facebook App, used to install apps to the clients fanpages
  • id (string) – ID of the model
  • lang_tag (string) – Default language of for new instances
  • name (string) – Name of the model
  • secret (string) – Model secret, which is needed to generate a signature (e.g. Client-Browser HTTP requests to the API)
  • validity (int) – How many days a new instance of this model will be available until it expires
PUT /api/v1/models/:model_id
Path arguments:model_id – ID of the model.
Retrieve basic information of a single model.
{
    "name":"UPDATED New app model {{$timestamp}}",
    "description":"UPDATED This is my test description",
    "base_url":"https://UPDATED.url-to-my-app.com/myappsubfolder/",
    "lang_tag": "en_US"
}
Data:
  • name (string) – (Required) Name of the model
  • description (string) – (Optional) Description of the model
  • base_url (string) – (Optional) Url to the app
  • lang_tag (enum) – (Optional) Default language for the model (“sq_AL”, “ar_DZ”, “ar_BH”, “ar_EG”, “ar_IQ”, “ar_JO”, “ar_KW”,”ar_LB”, “ar_LY”, “ar_MA”, “ar_OM”, “ar_QA”, “ar_SA”, “ar_SD”, “ar_SY”, “ar_TN”, “ar_AE”, “ar_YE”,”be_BY”, “bg_BG”, “ca_ES”, “zh_CN”, “zh_HK”, “zh_SG”, “hr_HR”, “cs_CZ”, “da_DK”, “nl_BE”, “nl_NL”, “en_AU”, “en_CA”,”en_IN”, “en_IE”, “en_MT”, “en_NZ”, “en_PH”, “en_SG”, “en_ZA”, “en_GB”, “en_US”, “et_EE”, “fi_FI”, “fr_BE”,”fr_CA”, “fr_FR”, “fr_LU”, “fr_CH”, “de_AT”, “de_DE”, “de_LU”, “de_CH”, “el_CY”, “el_GR”, “iw_IL”, “hi_IN”, “hu_HU”,”is_IS”, “in_ID”, “ga_IE”, “it_IT”, “it_CH”, “ja_JP”, “ja_JP”, “ko_KR”, “lv_LV”, “lt_LT”, “mk_MK”, “ms_MY”, “mt_MT”,”no_NO”, “no_NO”, “pl_PL”, “pt_BR”, “pt_PT”, “ro_RO”, “ru_RU”, “sr_BA”, “sr_ME”, “sr_CS”, “sr_RS”, “sk_SK”, “sl_SI”,”es_AR”, “es_BO”, “es_CL”, “es_CO”, “es_CR”, “es_DO”, “es_EC”, “es_SV”, “es_GT”, “es_HN”, “es_MX”, “es_NI”, “es_PA”, “es_PY”, “es_PE”, “es_PR”, “es_ES”, “es_US”, “es_UY”, “es_VE”, “sv_SE”, “th_TH”, “th_TH”, “tr_TR”, “uk_UA”, “vi_VN”
Example response body.
{
    "app_domain": "",
    "base_url": "https:\/\/UPDATED.url-to-my-app.com\/myappsubfolder\/",
    "created_at": "2015-04-27",
    "description": "UPDATED This is my test description",
    "fb_app_id": "",
    "fb_app_namespace": "",
    "fb_app_secret": "",
    "fb_canvas_url": "",
    "id": 317,
    "lang_tag": "en_US",
    "name": "New app model 1430141524",
    "secret": "da8a0ad63edbaced92b1d99f46c4cacf",
    "validity": "",
    "timestamp": 1430141572,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/317"
        }
    }
}
DELETE /api/v1/models/:model_id

Successful DELETE requests will return HTTP-Status code 204.

/models/:model_id/configs

Note

data_* parameters are different for each config type. The following table will list all parameters for all config types.

Config-Type Parameter Description
checkbox
  • string data_caption_off
  • string data_caption_on
  • string data_label
  • Caption for the ‘Off’-value
  • Caption for the ‘On’-value
  • Label for the checkbox
color    
css
  • enum data_compiler
  • [css | less] Compiler to process the value with
date    
image
  • string data_alt
  • string data_title
  • int data_height
  • int data_min_height
  • int data_max_height
  • int data_width
  • int data_min_width
  • int data_max_width
  • array data_format
  • bool data_nullable
  • HTML image alt attribute
  • HTML image title attribute
  • Forced image height (when set, image will be cropped)
  • Minimal allowed height value for this image
  • Max. allowed height value for this image
  • Forced image width (when set, image will be cropped)
  • Minimal allowed width value for this image
  • Max. allowed width value for this image
  • [jpg | png | gif ] Array of accepted image formats
  • Image value can be NULL or not
text
  • string data_type
  • string data_placeholder
  • string data_pattern
  • int data_min
  • int data_max
  • int data_min_length
  • int data_max_length
  • HTML5 input data type
  • HTML5 placeholder attribute
  • RegExp for input validation. Defines an input mask
  • Minimum value (validation for data_type “number”)
  • Maximum value (validation for data_type “number”)
  • Min. number of characters
  • Max. number of characters
textarea
  • enum data_editor
  • bool data_code_view
  • [wysiwyg, code, none] Rendered frontend editor
  • Code view allowed in the frontend
select    
multiselect    
POST /api/v1/models/:model_id/configs(checkbox)
Path arguments:model_id – ID of the model.
Retrieves a paginated list of config values of a model
{
    "config_id":  "config_checkbox_{{$timestamp}}",
    "type":       "checkbox",
    "name":       "Name of Checkbox",
    "value":      true,
    "description":"The description of my checkbox",
    "data_caption_off":"Custom Off",
    "data_caption_on":"Custom On",
    "data_label":"Optional label"
}
Data:
  • config_id (string) – (Required) Identifier for the new config value
  • type (enum) – (Required) Type of the config element
  • name (string) – (Required) Name for the config value
  • value (bool) – (Required) Default value for the config element
  • description (string) – (Optional) Description for the config value

Table with data_ parameters and the description of them.

Example response body.
{
    "description": "The description of my checkbox",
    "id": "config_checkbox_1430141851",
    "lang_tag": "en_US",
    "meta_data": [ ],
    "name": "Name of Checkbox",
    "type": "checkbox",
    "value": 1,
    "timestamp": 1430141892,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/317\/configs\/config_checkbox_1430141851"
        }
    }
}
POST /api/v1/models/:model_id/configs(color)
Path arguments:model_id – ID of the model.
Retrieves a paginated list of config values of a model
{
    "config_id":      "config_color_{{$timestamp}}",
    "type":           "color",
    "name":           "Name of Color",
    "value":          "#335566",
    "description":    "The description of my color"
}
Data:
  • config_id (string) – (Required) Identifier for the new config value
  • type (enum) – (Required) Type of the config element
  • name (string) – (Required) Name for the config value
  • value (string) – (Required) Default value for the config element
  • description (string) – (Optional) Description for the config value
Example response body.
{
    "description": "The description of my color",
    "id": "config_color_1430141894",
    "lang_tag": "en_US",
    "meta_data": [ ],
    "name": "Name of Color",
    "type": "color",
    "value": "#335566",
    "timestamp": 1430141935,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/317\/configs\/config_color_1430141894"
        }
    }
}
POST /api/v1/models/:model_id/configs(css)
Path arguments:model_id – ID of the model.
Retrieves a paginated list of config values of a model
{
    "config_id":      "config_css_{{$timestamp}}",
    "type":           "css",
    "name":           "Name of my CSS config",
    "value":          "body { text-align:center; } h1.h1, h2, h3 { font-size: 30px; }",
    "description":    "The description of my config value.",
    "data_compiler":  "less"
}
Data:
  • config_id (string) – (Required) Identifier for the new config value
  • type (enum) – (Required) Type of the config element
  • name (string) – (Required) Name for the config value
  • value (string) – (Required) Default value for the config element
  • description (string) – (Optional) Description for the config value

Table with data_ parameters and the description of them.

Example response body.
{
    "description": "The description of my config value.",
    "id": "config_css_1430142010",
    "lang_tag": "en_US",
    "meta_data": [ ],
    "name": "Name of my CSS config",
    "type": "css",
    "value": "body { text-align:center; } h1.h1, h2, h3 { font-size: 30px; }",
    "timestamp": 1430142051,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/317\/configs\/config_css_1430142010"
        }
    }
}
POST /api/v1/models/:model_id/configs(date) DEPRECATED
Path arguments:model_id – ID of the model.
Retrieves a paginated list of config values of a model
{
    "config_id":      "config_date_{{$timestamp}}",
    "name":           "Updated Name of my date",
    "type":           "date",
    "value":          "2011-11-11",
    "description":    "Updated Enter a valid date"
}
Data:
  • name (string) – (Required) Name for the config value
  • value (string) – (Required) Default value for the config element
  • description (string) – (Optional) Description for the config value
Example response body.
{
    "description": "Updated Enter a valid date",
    "id": "config_date_1430142048",
    "lang_tag": "en_US",
    "meta_data": [ ],
    "name": "Updated Name of my date",
    "type": "date",
    "value": "2011-11-11",
    "timestamp": 1430142089,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/317\/configs\/config_date_1430142048"
        }
    }
}
POST /api/v1/models/:model_id/configs(image)
Path arguments:model_id – ID of the model.
Retrieves a paginated list of config values of a model
{
    "config_id":          "config_image_{{$timestamp}}",
    "type":               "image",
    "name":               "Name of my image config value",
    "value":              "https://www.app-arena.com/media/wysiwyg/serviceflatrate.png",
    "description":        "The description of my config value.",
    "data_alt":           "Service Flatrate promotion image",
    "data_title":         "Save 25% in may on our service flatrate",
    "data_max_height":    1000,
    "data_max_width":     1000,
    "data_min_height":    100,
    "data_min_width":     100,
    "data_height":        300,
    "data_width":         500,
    "data_format":        ["jpg","png","gif"],
    "data_nullable":      false
}
Data:
  • config_id (string) – (Required) Identifier for the new config value
  • type (enum) – (Required) Type of the config element
  • name (string) – (Required) Name for the config value
  • value (string) – (Required) Default value for the config element
  • description (string) – (Optional) Description for the config value

Table with data_ parameters and the description of them.

Example response body.
{
    "description": "The description of my config value.",
    "id": "config_image_1430142090",
    "lang_tag": "en_US",
    "meta_data": {
        "tag": '<img src="https:\/\/www.app-arena.com\/media\/wysiwyg\/serviceflatrate.png' \/>"
    },
    "name": "Name of my image config value",
    "type": "image",
    "value": "https:\/\/www.app-arena.com\/media\/wysiwyg\/serviceflatrate.png",
    "timestamp": 1430142131,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/317\/configs\/config_image_1430142090"
        }
    }
}
POST /api/v1/models/:model_id/configs(text)
Path arguments:model_id – ID of the model.
Retrieves a paginated list of config values of a model
{
    "config_id":          "config_text_{{$timestamp}}",
    "type":               "text",
    "name":               "Name of my config value",
    "value":              "my_username",
    "description":        "Enter a valid Username (max. 12 lowercase characters or numbers, no whitespaces).",
    "data_type":          "text",
    "data_placeholder":   "Enter username here",
    "data_pattern":       "[a-z0-9]{12}"
}
Data:
  • config_id (string) – (Required) Identifier for the new config value
  • type (enum) – (Required) Type of the config element
  • name (string) – (Required) Name for the config value
  • value (string) – (Required) Default value for the config element
  • description (string) – (Optional) Description for the config value

Table with data_ parameters and the description of them.

Example response body.
{
    "description": "Enter a valid Username (max. 12 lowercase characters or numbers, no whitespaces).",
    "id": "config_text_1430142145",
    "lang_tag": "en_US",
    "meta_data": [ ],
    "name": "Name of my config value",
    "type": "text",
    "value": "my_username",
    "timestamp": 1430142186,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/317\/configs\/config_text_1430142145"
        }
    }
}
POST /api/v1/models/:model_id/configs(textarea)
Path arguments:model_id – ID of the model.
Retrieves a paginated list of config values of a model
{
    "config_id":"config_textarea_{{$timestamp}}",
    "type":"textarea",
    "name":"Name of my config value",
    "value":"<h1>This is my default HTML content</h1>",
    "description":"The description of my config value.",
    "data_editor":"wysiwyg",
    "data_code_view":false
}
Data:
  • config_id (string) – (Required) Identifier for the new config value
  • type (enum) – (Required) Type of the config element
  • name (string) – (Required) Name for the config value
  • value (string) – (Required) Default value for the config element
  • description (string) – (Optional) Description for the config value
  • editor (enum) – (Optional) “wysiwyg”, “code”, “none” | Which editor should be shown to the user?
  • code_view (bool) – (Optional) Is the code-view button available in the wysiwyg-editor?

Table with data_ parameters and the description of them.

Example response body.
{
    "description": "The description of my config value.",
    "id": "config_textarea_1430142205",
    "lang_tag": "en_US",
    "meta_data": [ ],
    "name": "Name of my config value",
    "type": "textarea",
    "value": "<h1>This is my default HTML content<\/h1>",
    "timestamp": 1430142246,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/317\/configs\/config_textarea_1430142205"
        }
    }
}
POST /api/v1/models/:model_id/configs(select)
Path arguments:model_id – ID of the model.
Retrieves a paginated list of config values of a model
{
    "config_id":"config_select_{{$timestamp}}",
    "type":"select",
    "name":"Name of my config value",
    "description":"The description of my config value.",
    "source":[
        {
            "value": "value_id_1",
            "text": "Text for value 1"
        },
        {
            "value": "value_id_2",
            "text": "Text for value 2"
        },
        {
            "value": "value_id_3",
            "text": "Text for value 3"
        }
    ],
    "value":"value_id_2"
}
Data:
  • config_id (string) – (Required) Identifier for the new config value
  • type (enum) – (Required) Type of the config element
  • name (string) – (Required) Name for the config value
  • value (string) – (Required) Default value for the config element
  • description (string) – (Optional) Description for the config value
  • source (array) – (Required) All available options of the config element
Example response body.
{
    "description": "The description of my config value.",
    "id": "config_select_1430142251",
    "lang_tag": "en_US",
    "meta_data": [ ],
    "name": "Name of my config value",
    "source": [
        {
            "value": "value_id_1",
            "text": "Text for value 1"
        },
        {
            "value": "value_id_2",
            "text": "Text for value 2"
        },
        {
            "value": "value_id_3",
            "text": "Text for value 3"
        }
    ],
    "type": "select",
    "value": "value_id_2",
    "timestamp": 1430142293,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/317\/configs\/config_select_1430142251"
        }
    }
}
POST /api/v1/models/:model_id/configs(multiselect)
Path arguments:model_id – ID of the model.
Retrieves a paginated list of config values of a model
{
    "config_id":"config_multiselect_{{$timestamp}}",
    "type":"multiselect",
    "name":"Name of my config value",
    "description":"The description of my config value.",
    "source":[
        {
            "value": "value_id_1",
            "text": "Text for value 1"
        },
        {
            "value": "value_id_2",
            "text": "Text for value 2"
        },
        {
            "value": "value_id_3",
            "text": "Text for value 3"
        }
    ],
    "value":[ "value_id_2", "value_id_3" ]
}
Data:
  • config_id (string) – (Required) Identifier for the new config value
  • type (enum) – (Required) Type of the config element
  • name (string) – (Required) Name for the config value
  • value (array) – (Optional) Default value for the config element
  • description (string) – (Optional) Description for the config value
  • source (array) – (Required) All available options of the config element
Example response body.
{
    "description": "The description of my config value.",
    "id": "config_multiselect_1430142358",
    "lang_tag": "en_US",
    "meta_data": [ ],
    "name": "Name of my config value",
    "source": [
        {
            "value": "value_id_1",
            "text": "Text for value 1"
        },
        {
            "value": "value_id_2",
            "text": "Text for value 2"
        },
        {
            "value": "value_id_3",
            "text": "Text for value 3"
        }
    ],
    "type": "multiselect",
    "value": [
        "value_id_2",
        "value_id_3"
    ],
    "timestamp": 1430142399,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/317\/configs\/config_multiselect_1430142358"
        }
    }
}
GET /api/v1/models/:model_id/configs
Path arguments:model_id – ID of the model.
Retrieves a paginated list of config values of a model
{
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/318\/configs"
        }
    },
    "_embedded": {
        "data": [
            {
                "app_domain": "",
                "base_url": "https:\/\/www.url-to-your-app.com\/appsubfolder\/",
                "created_at": "2015-03-24",
                "description": "Using this app you will superpower your skills.",
                "fb_app_id": "",
                "fb_app_namespace": "",
                "fb_app_secret": "",
                "fb_canvas_url": "",
                "id": 312,
                "lang_tag": "de_DE",
                "name": "My shiny new app",
                "secret": "fd0691803888c9171abfde4ec8d00747",
                "validity": "",
                "timestamp": 1427207187,
                "_links": {
                    "self": {
                        "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/312"
                    }
                }
            }
        ]
    },
    "page_count": 0,
    "page_size": 25,
    "total_items": 0
}
Data:
  • app_domain (string) – Date of Build.
  • base_url (string) – Error from Sphinx build process.
  • created_at (string) – Build id.
  • description (string) – Description for the model
  • fb_app_id (string) – Facebook app id
  • fb_app_secret (string) – Facebook App, used to install apps to the clients fanpages
  • id (string) – ID of the model
  • lang_tag (string) – Default language of for new instances
  • name (string) – Name of the model
  • secret (string) – Model secret, which is needed to generate a signature (e.g. Client-Browser HTTP requests to the API)
  • validity (int) – How many days a new instance of this model will be available until it expires

/models/:model_id/configs/:config_id

GET /api/v1/models/:model_id/configs/:config_id(checkbox)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Retrieve basic information of a single model.
{
    "description": "The description of my checkbox",
    "id": "config_checkbox_1429099711",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Name of Checkbox",
    "type": "checkbox",
    "value": 1,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/316\/configs\/config_checkbox_1429099711"
        }
    }
}

Documentation of the configs.

GET /api/v1/models/:model_id/configs/:config_id(color)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Retrieve basic information of a single model.
{
    "description": "The description of my color",
    "id": "config_color_1429099923",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Name of color",
    "type": "color",
    "value": 1,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/316\/configs\/config_color_1429099923"
        }
    }
}

Documentation of the configs.

GET /api/v1/models/:model_id/configs/:config_id(css)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Retrieve basic information of a single model.
{
    "description": "The description of my config value.",
    "id": "config_css_1429099927",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Name of my CSS config",
    "type": "css",
    "value": "body { text-align:center; } h1.h1, h2, h3 { font-size: 30px; }",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/316\/configs\/config_css_1429099927"
        }
    }
}

Documentation of the configs.

GET /api/v1/models/:model_id/configs/:config_id(date)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Retrieve basic information of a single model.
{
    "description": "Updated Enter a valid date",
    "id": "config_date_1429099929",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Updated Name of my date",
    "type": "date",
    "value": "2011-11-11",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/316\/configs\/config_date_1429099929"
        }
    }
}

Documentation of the configs.

GET /api/v1/models/:model_id/configs/:config_id(image)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Retrieve basic information of a single model.
{
    "description": "The description of my config value.",
    "id": "config_image_1429099933",
    "lang_tag": "de_DE",
    "meta_data": {
        "tag": "<img src='https:\/\/www.app-arena.com\/media\/wysiwyg\/serviceflatrate.png' \/>"
    },
    "name": "Name of my image config value",
    "type": "image",
    "value": "https:\/\/www.app-arena.com\/media\/wysiwyg\/serviceflatrate.png",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/316\/configs\/config_image_1429099933"
        }
    }
}

Documentation of the configs.

GET /api/v1/models/:model_id/configs/:config_id(text)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Retrieve basic information of a single model.
{
    "description": "Enter a valid Username (max. 12 lowercase characters or numbers, no whitespaces).",
    "id": "config_text_1429099936",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Name of my config value",
    "type": "text",
    "value": "my_username",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/316\/configs\/config_text_1429099936"
        }
    }
}

Documentation of the configs.

GET /api/v1/models/:model_id/configs/:config_id(textarea)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Retrieve basic information of a single model.
{
    "description": "The description of my config value.",
    "id": "config_textarea_1429099939",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Name of my config value",
    "type": "textarea",
    "value": "<h1>This is my default HTML content<\/h1>",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/316\/configs\/config_textarea_1429099939"
        }
    }
}

Documentation of the configs.

GET /api/v1/models/:model_id/configs/:config_id(select)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Retrieve basic information of a single model.
{
    "description": "The description of my config value.",
    "id": "config_select_1429099941",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Name of my config value",
    "source": [
        {
            "value": "value_id_1",
            "text": "Text for value 1"
        },
        {
            "value": "value_id_2",
            "text": "Text for value 2"
        },
        {
            "value": "value_id_3",
            "text": "Text for value 3"
        }
    ],
    "type": "select",
    "value": "value_id_2",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/316\/configs\/config_select_1429099941"
        }
    }
}

Documentation of the configs.

GET /api/v1/models/:model_id/configs/:config_id(multiselect)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Retrieve basic information of a single model.
{
    "description": "The description of my config value.",
    "id": "config_multiselect_1429099943",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Name of my config value",
    "source": [
        {
            "value": "value_id_1",
            "text": "Text for value 1"
        },
        {
            "value": "value_id_2",
            "text": "Text for value 2"
        },
        {
            "value": "value_id_3",
            "text": "Text for value 3"
        }
    ],
    "type": "multiselect",
    "value": [
        "value_id_2",
        "value_id_3"
    ],
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/316\/configs\/config_multiselect_1429099943"
        }
    }
}

Documentation of the configs.

PUT /api/v1/models/:model_id/configs/:config_id(checkbox)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Example request body
{
    "name":               "Updated Name of Checkbox",
    "value":              false,
    "description":        "Updated description of my checkbox",
    "data_caption_off":   "Updated Custom Off",
    "data_caption_on":    "Updated Custom On",
    "data_label":         "Updated Optional label"
}
Data:
  • name (string) – (Optional) Name of the config value
  • value (bool) – (Optional) Value for the config element
  • description (string) – (Optional) Description for the config value
Example response body
{
    "description": "The description of my checkbox",
    "id": "config_checkbox_1430221458",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Name of Checkbox",
    "type": "checkbox",
    "value": 1,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/319\/configs\/config_checkbox_1430221458"
        }
    }
}

Table with data_ parameters and the description of them.

PUT /api/v1/models/:model_id/configs/:config_id(color)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Example request body
{
    "name":               "Updated Name of color",
    "value":              "#FFFFFF",
    "description":        "Updated description of my color"
}
Data:
  • name (string) – (Optional) Name of the config value
  • value (bool) – (Optional) Value for the config element
  • description (string) – (Optional) Description for the config value
Example response body
{
    "description": "The description of my color",
    "id": "config_color_1430226121",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Name of Color",
    "type": "color",
    "value": "#335566",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/319\/configs\/config_color_1430226121"
        }
    }
}
PUT /api/v1/models/:model_id/configs/:config_id(css)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Example request body
{
    "name":"Updated Name of my CSS config",
    "value":"body { text-align:center; color:red; } h1.h1, h2, h3 { font-size: 30px; }",
    "description":"Updated The description of my config value.",
    "data_compiler":"css"
}
Data:
  • name (string) – (Optional) Name of the config value
  • value (bool) – (Optional) Value for the config element
  • description (string) – (Optional) Description for the config value
Example response body
{
    "description": "The description of my config value.",
    "id": "config_css_1430226124",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Name of my CSS config",
    "type": "css",
    "value": "body { text-align:center; } h1.h1, h2, h3 { font-size: 30px; }",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/319\/configs\/config_css_1430226124"
        }
    }
}

Table with data_ parameters and the description of them.

PUT /api/v1/models/:model_id/configs/:config_id(data) DEPRECATED
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Example request body
{
    "name":               "Updated Name of my date",
    "value":              1911-02-22,
    "description":        "Updated Enter a valid date",
}
Data:
  • name (string) – (Optional) Name of the config value
  • value (bool) – (Optional) Value for the config element
  • description (string) – (Optional) Description for the config value
Example response body
{
    "description": "Updated Enter a valid date",
    "id": "config_date_1430226133",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Updated Name of my date",
    "type": "date",
    "value": "2011-11-11",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/319\/configs\/config_date_1430226133"
        }
    }
}
PUT /api/v1/models/:model_id/configs/:config_id(image)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Example request body
{
    "name":"Updated Name of my image config value",
    "value":null,
    "description":"Updated The description of my config value.",
    "data_alt": "Updated Service Flatrate promotion image",
    "data_title": "Updated Save 25% in may on our service flatrate",
    "data_max_height":2000,
    "data_max_width":2000,
    "data_min_height":200,
    "data_min_width":200,
    "data_height":600,
    "data_width":1000,
    "data_format":["jpg"],
    "data_nullable":true
}
Data:
  • name (string) – (Optional) Name of the config value
  • value (string) – (Optional) Value for the config element
  • description (string) – (Optional) Description for the config value
Example response body
{
    "description": "The description of my config value.",
    "id": "config_image_1430226136",
    "lang_tag": "de_DE",
    "meta_data": {
        "tag": "<img src='https:\/\/www.app-arena.com\/media\/wysiwyg\/serviceflatrate.png' \/>"
    },
    "name": "Name of my image config value",
    "type": "image",
    "value": "https:\/\/www.app-arena.com\/media\/wysiwyg\/serviceflatrate.png",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/319\/configs\/config_image_1430226136"
        }
    }
}

Table with data_ parameters and the description of them.

PUT /api/v1/models/:model_id/configs/:config_id(text)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Example request body
{
    "name":"Updated Name of my config value",
    "value":"updated@email.com",
    "description":"Updated Enter a valid Email (max. 22 lowercase characters or numbers, no whitespaces, @).",
    "data_type":"email",
    "data_placeholder":"Updated Enter email here",
    "data_pattern":"[a-zA-Z0-9@]{22}"
}
Data:
  • name (string) – (Optional) Name of the config value
  • value (string) – (Optional) Value for the config element
  • description (string) – (Optional) Description for the config value
Example response body
{
    "description": "Enter a valid Username (max. 12 lowercase characters or numbers, no whitespaces).",
    "id": "config_text_1430226138",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Name of my config value",
    "type": "text",
    "value": "my_username",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/319\/configs\/config_text_1430226138"
        }
    }
}

Table with data_ parameters and the description of them.

PUT /api/v1/models/:model_id/configs/:config_id(textarea)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Example request body
{
    "name":"Updated Name of my config value",
    "value":"<h1>Updated This is my default HTML content</h1>",
    "description":"Updated The description of my config value.",
    "data_editor":"code"
}
Data:
  • name (string) – (Optional) Name of the config value
  • value (string) – (Optional) Value for the config element
  • description (string) – (Optional) Description for the config value
Example response body
{
    "description": "The description of my config value.",
    "id": "config_textarea_1430226141",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Name of my config value",
    "type": "textarea",
    "value": "<h1>This is my default HTML content<\/h1>",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/319\/configs\/config_textarea_1430226141"
        }
    }
}

Table with data_ parameters and the description of them.

PUT /api/v1/models/:model_id/configs/:config_id(select)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Example request body
{
    "name":"Updated Name of my config value",
    "description":"The description of my config value.",
    "source":[
        {
            "value": "updated_value_id_1",
            "text": "Updated Text for value 1"
        },
        {
            "value": "updated_value_id_2",
            "text": "Updated Text for value 2"
        },
        {
            "value": "value_id_3",
            "text": "Updated Text for value 3"
        }
    ],
    "value":"updated_value_id_1"
}
Data:
  • name (string) – (Optional) Name of the config value
  • value (string) – (Optional) Value for the config element
  • description (string) – (Optional) Description for the config value
  • source (array) – (Optional) All available options of the select config value
Example response body
{
    "description": "The description of my config value.",
    "id": "config_select_1430226143",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Name of my config value",
    "source": [
        {
            "value": "value_id_1",
            "text": "Text for value 1"
        },
        {
            "value": "value_id_2",
            "text": "Text for value 2"
        },
        {
            "value": "value_id_3",
            "text": "Text for value 3"
        }
    ],
    "type": "select",
    "value": "value_id_2",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/319\/configs\/config_select_1430226143"
        }
    }
}
PUT /api/v1/models/:model_id/configs/:config_id(multiselect)
Path arguments:
  • model_id – ID of the model.
  • config_id – ID of the config.
Example request body
{
    "name":"Updated Name of my config value",
    "description":"Updated The description of my config value.",
    "source":[
        {
            "value": "updated_value_id_1",
            "text": "Updated Text for value 1"
        },
        {
            "value": "value_id_2",
            "text": "Updated Text for value 2"
        },
        {
            "value": "updated_value_id_3",
            "text": "Updated Text for value 3"
        }
    ],
    "value":[ "updated_value_id_3", "updated_value_id_1" ]
}
Data:
  • name (string) – (Optional) Name of the config value
  • value (array) – (Optional) All values which should be selected by default
  • description (string) – (Optional) Description for the config value
  • source (array) – (Optional) All available options of the select config value
Example response body
{
    "description": "The description of my config value.",
    "id": "config_multiselect_1430226146",
    "lang_tag": "de_DE",
    "meta_data": [ ],
    "name": "Name of my config value",
    "source": [
        {
            "value": "value_id_1",
            "text": "Text for value 1"
        },
        {
            "value": "value_id_2",
            "text": "Text for value 2"
        },
        {
            "value": "value_id_3",
            "text": "Text for value 3"
        }
    ],
    "type": "multiselect",
    "value": [
    "value_id_2",
    "value_id_3"
    ],
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/319\/configs\/config_multiselect_1430226146"
        }
    }
}
DELETE /api/v1/models/:model_id/configs/:config_id

Successful DELETE requests will return HTTP-Status code 204.

/models/:model_id/languages

POST /api/v1/models/:model_id/languages
Path arguments:model_id – ID of the model.
Example request body
{
    "lang_tag":"fr_FR"
}
Example response body
{
    "is_activated": 0,
    "lang_tag": "fr_FR",
    "timestamp": 1430211490,
    "id": "fr_FR",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/318\/languages\/fr_FR"
        }
    }
}
Data:
  • lang_tag (enum) – (Required) Language tag of the language to add to the model
  • is_activated – (Optional) If the new language is activated immediately
GET /api/v1/models/:model_id/languages
Path arguments:model_id – ID of the model.
Retrieve basic information of a single model.
{
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/316\/languages?page=1"
        },
        "first": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/316\/languages"
        },
        "last": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/316\/languages?page=1"
        }
    },
    "_embedded": {
        "data": [
            {
                "lang_id": 528,
                "name": "de",
                "is_activated": 1,
                "lang_tag": "de_DE"
            }
        ]
    },
    "page_count": 1,
    "page_size": 25,
    "total_items": 1
}

Documentation of the languages of models.

/models/:model_id/languages/:lang_tag

PUT /api/v1/models/:model_id/languages/:lang_tag
Path arguments:
  • model_id – ID of the model.
  • lang_tag – ID of the language.
Example request body
{
    "is_activated":1
}
Example response body
{
    "is_activated": 1,
    "lang_tag": "fr_FR",
    "timestamp": 1430211734,
    "id": "fr_FR",
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/318\/languages\/fr_FR"
        }
    }
}
Data:is_activated (boolean) – (Required) If the new language is activated immediately
DELETE /api/v1/models/:model_id/languages/:lang_tag

Successful DELETE requests will return HTTP-Status code 204.

/models/:model_id/languages/:lang_tag/translations

POST /api/v1/models/:model_id/languages/:lang_tag/translations
Path arguments:
  • model_id – ID of the model.
  • lang_tag – ID of the language.
Example request body
{
    "translation_id":"test_translation",
    "value":"Il mio test translations!"
}
Example response body
{
    "id": "test_translation",
    "translation": "Il mio test translations!",
    "timestamp": 1430211997,
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/318\/languages\/fr_FR\/translations\/test_translation"
        }
    }
}
Data:
  • translation_id (string) – (Required) Translation ID
  • value (string) – (Required) Translation
GET /api/v1/models/:model_id/languages/:lang_tag/translations
Path arguments:
  • model_id – ID of the model.
  • lang_tag – ID of the language.
Example request body.
{
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/316\/languages\/%7B%7Blang_tag%7D%7D\/translations"
        }
    },
    "_embedded": {
        "data": [ ]
    },
    "page_count": 0,
    "page_size": 25,
    "total_items": 0
}
Example response body.
{
    "_links": {
        "self": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/318\/languages\/fr_FR\/translations?page=1"
        },
        "first": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/318\/languages\/fr_FR\/translations"
        },
        "last": {
            "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/318\/languages\/fr_FR\/translations?page=1"
        }
    },
    "_embedded": {
        "data": [
            {
                "id": "test_translation",
                "value": "Il mio test translations!",
                "_links": {
                    "self": {
                        "href": "https:\/\/v2.app-arena.com\/api\/v1\/models\/318\/languages\/fr_FR\/translations\/test_translation"
                    }
                }
            }
        ]
    },
    "page_count": 1,
    "page_size": 25,
    "total_items": 1
}

Documentation of the languages of models.

/models/:model_id/languages/:lang_tag/translations/:translation_id

PUT /models/:model_id/languages/:lang_tag/translations/:translation_id
Path arguments:
  • i_id – ID of the translation.
  • lang_tag – ID of the language.
  • translation_id – ID of the translation.
Example request body
{
    "value":"UPDATED Il mio test translation!"
}
Data:value (string) – (Required) Translation
DELETE /models/:model_id/languages/:lang_tag

Successful DELETE requests will return HTTP-Status code 204.

Working with POSTman

Postman is an easy to use Google Chrome extension, which enables you to send HTTP-Request to a server. As we are running all our API tests using POSTman, we prepared a collection of requests for you, so that you have examples of all available requests of the App-Manager API.

Import an environment

  1. Download one of our environment files

  2. Import the environment-file

https://app-manager.s3.amazonaws.com/api/tutorials/POSTman-add-environment-1.png https://app-manager.s3.amazonaws.com/api/tutorials/POSTman-add-environment-2.png

Import the collection

Click the import button on the top left cornor and import one of our collections using ‘Download from link’

https://app-manager.s3.amazonaws.com/api/tutorials/POSTman-import-collection-1.png

Send your first request

So select the currently imported environment in the top-navigation, select one of the imported requests and hit the SEND-Button.

https://app-manager.s3.amazonaws.com/api/tutorials/POSTman-send-request-1.png

Adding an API key

As you might noticed, you do not have permissions to send all of the requests in the collection. To submit even restricted requests you need to add an API Key.

SDK

PHP-SDK

Getting started

You can find our PHP SDK on github.

Installation

composer require app-arena/php-sdk

Usage

Use the Composer Autoloader to start using the App-Manager

// In your index.php
define("ROOT_PATH", realpath(dirname(__FILE__)));
require ROOT_PATH . '/vendor/autoload.php';

$m_id = 123; // Set your app-arena Model ID here

// Clear the cache before, requestion Instance in for each
$am = new \AppManager\AppManager(
    $m_id,
    array(
        "root_path" => ROOT_PATH,
        "cache_dir" => "/var/cache"
    )
);
// Get all necessary instance information to start working
$config = $am->getConfigs();
$translation = $am->getTranslations();
$info = $am->getInfos();

Now the connection is build up and you can start using you App-Instance. The App-Manager SDK automatically tries to get your Instance ID (i_id) from GET-Parameters or from Cookies. So your Url should be something like this:

http://www.domainofmyapp.com/mypage.php?i_id=1234

Methods

Method Description Parameters Response
addParams($params) This will add parameters to the smartLink Url. These parameters will be available as GET-Parameters, when a user* clicks on the smartLink. The parameters will be available as GET parameters as well in the facebook page tab* or within an iframe array $params Array of parameters which should be passed through  
cleanCache() Cleans the cache, so that a fresh API call will be done    
getBaseUrl() Returns the BaseUrl your Sharing Url is generated with. By default it will use the currently used domain   string
getBrowser() Returns user browser information   array
getBrowserName() Returns the users browser name   string
getBrowserVersion() Returns user browser major version   int
getConfig($config_id, $attr = “value”) Returns the value of a config value String $config_id Config identifier to get the data for String string array $attr Attribute or Attributes which should be returned
getConfigs() Returns all Config Elements of the current instance as array   array
getCssHelper() (DEPRECATED) Returns CSS Helper object to compile and concatenate Less, CSS and Config-Type (CSS) values   CSS
getCssFiles($css_config) Returns CSS Helper object to compile and concatenate Less, CSS and Config-Type (CSS) values array $css_config Array to define the compilation process (@see CSS Config. ) array List of compiled CSS file path’s
getDevice() Returns user device information   array
getDeviceType() Returns the device type of the current device mobile, tablet, desktop   string
getEnvironment() Returns if the app currently running on a website, facebook or direct website means the app is embedded via iframe to a website facebook means the app is embedded in a facebook page tab direct means the app is being accessed directly without iframe embed   string
getFacebookInfo() Returns all available Facebook information, like currently used fanpage and canvas information.    
getIId() Returns the currently used Instance ID   int
getInfo($attr) Returns an attribute of the instance String $attr Attribute you want to return string
getInfos() Returns all basic information of the current instance   array
getLang() Returns the currently used Language as Language Code (e.g. de_DE, en_US, ...)   string
getMId() Returns the model ID of the currently selected instance   int
getParams() Returns all params submitted to the SmartLink before redirection   array
getTranslation($translation_id, $args = array() Returns the translation for the submitted ID String $translation_id Config identifier to get the data Array $args Array of values to replace in the translation (@see http://php.net/manual/de/function.vsprintf.php ) string
getTranslations() Returns all translations for the currently set language   array
getUrl() Returns the SmartLink Url for Sharing   string
getUrlLong() Returns the SmartLink Url without Url Shortener bool $shorten Shorten URL using smartl.ink string
renderSharePage ($debug = false) Renders the complete HTML of the Share page including all meta tags and redirection. bool $debug - Show debug information on the page? string
setBaseUrl($base_url) Sets a new base url for your sharing links (->getUrl()). string $base_url New base url void
setFilename($filename) Sets the filename for the SmartLink (default: smartlink.php) string $filename void
setLang($lang) Sets a new language for the current instance string $lang 5 char Language Code,e .g. de_DE  
setMeta($meta) Sets the meta data for SmartLink Share page. All key value pairs will be generated as meta information into the head of the share page. The array keys title, desc, image are the most important. The array values can be Strings or config identifiers of the instance array $meta (see description) array
setParams($params) This will reset all parameters of the smartLink Url. These parameters will be available as GET-Parameters, when a user* clicks on the smartLink. The parameters will be available as GET parameters as well in the facebook page tab* or within an iframe array $params Array of parameters which should be passed through  

PHP-SDK - CSS, LESS and SCSS

The App-Manager SDK provides a helper to enable you to compile, concatenate and minify all your CSS and Less-Files. As well config values (type CSS) can be included in the process. The output file will be automatically saved to your file cache to keep your app fast. The App-Manager SDK uses the great PHP Less compiler by Josh Schmidt and the PHP SCSS compiler by Leaf Corcoran.

The CSS-Helper Class provides the following functions:

  • Compile Less and SCSS files (including @imports), CSS Files and Config value (CSS)
  • Compiles Bootstrap CSS :-)
  • Dynamically replace Variables with values you submit
  • Search and Replace strings

Getting started

To request compiled CSS files, you need to tell the SDK, what files to include in your compiled files. Your “input” is defined in an array:

// And here is your initialization code:
define("ROOT_PATH", realpath(dirname(__FILE__)));
$am = new \AppManager\AppManager(
   $m_id,
   array(
        "root_path" => ROOT_PATH,
        "cache_dir" => "/var/cache"
    )
);

/**
 * This example config files will return 2 compiled css files: file1 and file2
 * array(
 *      files         -> Array list of files (using an absolute path) to include in the compilation
 *      config_values -> App-Manager config values of type CSS to include in the compilation
 *      variables     -> Less or Scss Variables which will be replaced in all files
 *      replacements  -> String replacements in all files (e.g. to fix a relative filepath')
 * )
 */
$css_config = array(
    'file1' => array(
        'files' => array(
            ROOT_PATH . '/css/less/bootstrap-custom.less',
            ROOT_PATH . '/css/scss/bootstrap-social.scss',
            ROOT_PATH . '/js/vendor_bower/font-awesome/css/font-awesome.min.css'
        ),
        'config_values' => array(),
        'variables' => array(
            'brand-primary' => $am->getConfig('color_primary'), // Use a config value to set a color
            'border-radius-base' => '0px',
            'border-radius-large' => '0px',
            'border-radius-small' => '0px',
        ),
        'replacements' => array(
            '../fonts/fontawesome' => '../../js/vendor_bower/font-awesome/fonts/fontawesome'
        ),
    ),
    'file2' => array(
        'files' => array(
            ROOT_PATH . '/css/style.css'
            ROOT_PATH . '/css/less/app.less',
        ),
        'config_values' => array( 'css_app', 'css_user' ), // A list of config value IDs to include in the CSS
        'variables' => array(
            'primary' => '#478AB8',
            'secondary' => '#2D343D',
            'highlight' => '#efefef',
        ),
        'replacements' => array()
    ),
);

$css_files = $am->getCssFiles($css_config);

Now you got an array containing two CSS file path’s. To use them in your app just print them in your HTML head section:

<head>
...
<?php
foreach ($css_files as $css_file) {
    ?>
    <link type="text/css" rel="stylesheet" href="<?php echo $css_file ?>" />
    <?php
}
?>
...
</head>

Note

Test all available requests in our API-Explorer_.

Overwriting variables using SCSS

In you CSS-Config file you can set variables, which will be set before your source files are being compiled. When you use SCSS source files, please assure, that all variables you want to overwrite are flagged with !default

$primary: #112233 !default;

h1 {
    color: $primary;
}

With the above configuration for ‘file2’, the compiled CSS would look like this:

h1 {
    color: #478AB8;
}

JS-SDK

Getting started

You can find our JS SDK on github.

Installation

  1. Clone the repository
  2. npm install
  3. npm run build (production & develop) | npm run build:prod (production) | npm run build:dev (develop)

Usage

Methods

Method Description Parameters Response
init(params) This will add parameters to the smartLink Url. These parameters will be available as GET-Parameters, when a user* clicks on the smartLink. The parameters will be available as GET parameters as well in the facebook page tab* or within an iframe array $params Array of parameters which should be passed through  

Integrator

If you want to integrate the App-Manager to your system and you want to sell apps on your website, please get started with one of the following topics:

Integration guide

Note

Before you can integrate App-Arena to your systems backend, you have to generate an API key. Once you got it, you can start requesting our API.

To make it easy here are some examples for an integration. All requests are available in a POSTman.

Scenario 1: Create a new customer

Each user is part of a company. So before creating a user you need to create a company or assign the user to an existing company by submitting the company_id in your POST request.

Create a new customer (company)

Send a POST request to create a new company. Do not forget to add your API Key to the request, as it is not possible to send POST requests without authentication.

Header

POST /api/v1/companies HTTP/1.1
Host: v2.app-arena.com
Content-Type: application/json
Authorization: Basic c2J1Y2twZXNjaDphcGlrZXk=

Parameters

{
  "name"            :"Big star cooperation",
  "subdomain"       :"big_star_corp"
}

Example response

{
    "id":           17,
    "name":         "New App-Arena customer 1421685371",
    "parent_id":    1,
    "subdomain":    "company_subdomain",
    "timestamp":    1421685366,
    "_links": {
        "self": {
            "href": "http:\/\/v2.app-arena.com\/api\/v1\/companies\/17"
        }
    }
}

A new company_id (in the example response the company_id is 17) has been generated... You should have it in mind for the following request...

Create a new user for this customer

So now you’ve got a new company set up. So now it’s time to create the first user for this company. Send a POST request including your [API key](api_key) to create a user.

Note

If you are using our POSTman collection you can just send the next request to create a user without replacing the :company_id in the request, as the POST /companies request adds a company_id environment variable in its POSTman tests.

Header

POST /api/v1/companies/17/users HTTP/1.1
Host: v2.app-arena.com
Content-Type: application/json
Authorization: Basic c2J1Y2twZXNjaDphcGlrZXk=

Parameters

{
    "username":  "dhasselhoff",
    "email":     "david@hasselhoff.com",
    "name":      "David Hasselhoff",
    "password":  "iSetGermanyFree!",
    "roles":     [ "user", "admin" ],
    "lang_tag":  "en_US"
}

Example response

TODO

Szenario 2: Create a new instance for a customer

Ok, so an empty account is boring... Give your customer some apps they are impressed of. :-) Let’s create a photo contest demo (template_id 728)

Header

POST /api/v1/instances HTTP/1.1
Host: v2.app-arena.com
Content-Type: application/json
Authorization: Basic c2J1Y2twZXNjaDphcGlrZXk=

Parameters

{
    "template_id": 728,
    "name":"My customers new photo contest demo",
    "description": "The description of my new instance.",
    "lang_tag":"en_US"
}

An example response would look like this:

Example response

You’re done :-) - Tell your customer about it!

Great! Now let’s send your customer all necessary information, so that he can start using and configuring his app:

Dear David,

we've setup a new photo-contest demo app for you. You can access your app here:

App-Url: https://www.fotowettbewerb.co/?i_id=1234

If you want to change the content of your app just visit the configuration wizard interface and login using your access data:

Wizard-Url: https://manager.app-arena.com/instances/....
Username:   dhasselhoff
Password:   iSetGermanyFree!

Thanks a lot,
Your App-Support Team