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 }
/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 |
|
|
color | ||
css |
|
|
date | ||
image |
|
|
text |
|
|
textarea |
|
|
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" } } }
- 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" } } }
- 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" } } }
- 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" } } }
- 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" } } }
- 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" } } }
- 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" } } }
- 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" } } }
- 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" } } }
- 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 }
/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 }
/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.