{"id":65297,"date":"2024-08-23T19:59:57","date_gmt":"2024-08-23T17:59:57","guid":{"rendered":"https:\/\/www.xenia-espresso.de\/?page_id=65297"},"modified":"2025-01-19T09:18:01","modified_gmt":"2025-01-19T08:18:01","slug":"api-beispiel","status":"publish","type":"page","link":"https:\/\/www.xenia-espresso.de\/en\/api-beispiel\/","title":{"rendered":"Support &#8211; API Beispiel"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8220;1&#8243; custom_padding_last_edited=&#8220;on|desktop&#8220; admin_label=&#8220;Firmware Inhalt&#8220; _builder_version=&#8220;4.22.2&#8243; custom_padding=&#8220;|0px|30px|0px|false|false&#8220; custom_padding_tablet=&#8220;&#8220; custom_padding_phone=&#8220;&#8220; border_color_all=&#8220;#E02B20&#8243; border_width_top=&#8220;2px&#8220; saved_tabs=&#8220;all&#8220; locked=&#8220;off&#8220; collapsed=&#8220;off&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_row admin_label=&#8220;\u00dcberschrift&#8220; _builder_version=&#8220;4.20.0&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_column type=&#8220;4_4&#8243; _builder_version=&#8220;4.20.0&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_text _builder_version=&#8220;4.25.2&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;]<\/p>\n<h1>API examples<\/h1>\n<p>The examples are written in Object Pascal and must be adapted to the respective language\/environment.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row column_structure=&#8220;2_5,3_5&#8243; custom_padding_last_edited=&#8220;on|tablet&#8220; admin_label=&#8220;script&#8220; _builder_version=&#8220;4.25.2&#8243; custom_margin=&#8220;||0px|&#8220; custom_margin_tablet=&#8220;&#8220; custom_margin_phone=&#8220;&#8220; custom_margin_last_edited=&#8220;on|desktop&#8220; custom_padding=&#8220;30px||0px|&#8220; custom_padding_tablet=&#8220;&#8220; custom_padding_phone=&#8220;&#8220; border_width_all=&#8220;3px&#8220; border_style_all=&#8220;dashed&#8220; border_width_top=&#8220;0px&#8220; border_width_right=&#8220;0px&#8220; border_width_bottom=&#8220;2px&#8220; border_style_bottom=&#8220;solid&#8220; border_width_left=&#8220;0px&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_column type=&#8220;2_5&#8243; _builder_version=&#8220;4.16&#8243; custom_padding=&#8220;|||&#8220; global_colors_info=&#8220;{}&#8220; custom_padding__hover=&#8220;|||&#8220;][et_pb_text admin_label=&#8220;Erkl\u00e4rung&#8220; _builder_version=&#8220;4.25.2&#8243; _module_preset=&#8220;default&#8220; text_text_color=&#8220;#000000&#8243; text_font_size=&#8220;22px&#8220; border_style_all=&#8220;none&#8220; border_width_bottom=&#8220;1px&#8220; global_colors_info=&#8220;{}&#8220;]<\/p>\n<p>executing a script (programmed extraction)<\/p>\n<p>[\/et_pb_text][\/et_pb_column][et_pb_column type=&#8220;3_5&#8243; _builder_version=&#8220;4.22.2&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_text admin_label=&#8220;Call&#8220; _builder_version=&#8220;4.25.2&#8243; _module_preset=&#8220;default&#8220; text_font=&#8220;||||||||&#8220; text_text_color=&#8220;#000000&#8243; border_style_all=&#8220;none&#8220; border_width_bottom=&#8220;1px&#8220; global_colors_info=&#8220;{}&#8220;]<\/p>\n<p>jsonToSend.Add(&#8218;{&#8222;ID&#8220;:&#8220;&#8218;+inttostr(scriptID)+'&#8220;}&#8216;);<br \/>http.Post(&#8218;http:\/\/&#8217;+sIPAdresse+&#8217;\/api\/v2\/scripts\/execute\/&#8216;, jsonToSend);<\/p>\n<p>sIPAdresse = die IPAdresse der Maschine im Netz<br \/>scriptID = die ID des Scriptes<\/p>\n<p><strong>\u00a0<\/strong><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8220;https:\/\/www.xenia-espresso.de\/wp-content\/uploads\/2024\/08\/scripid.png&#8220; title_text=&#8220;scripid&#8220; _builder_version=&#8220;4.25.2&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][\/et_pb_image][\/et_pb_column][\/et_pb_row][et_pb_row column_structure=&#8220;2_5,3_5&#8243; custom_padding_last_edited=&#8220;on|tablet&#8220; admin_label=&#8220;script anhalten&#8220; _builder_version=&#8220;4.25.2&#8243; custom_margin=&#8220;||0px|&#8220; custom_margin_tablet=&#8220;&#8220; custom_margin_phone=&#8220;&#8220; custom_margin_last_edited=&#8220;on|desktop&#8220; custom_padding=&#8220;30px||0px|&#8220; custom_padding_tablet=&#8220;&#8220; custom_padding_phone=&#8220;&#8220; border_width_all=&#8220;3px&#8220; border_style_all=&#8220;dashed&#8220; border_width_top=&#8220;0px&#8220; border_width_right=&#8220;0px&#8220; border_width_bottom=&#8220;2px&#8220; border_style_bottom=&#8220;solid&#8220; border_width_left=&#8220;0px&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_column type=&#8220;2_5&#8243; _builder_version=&#8220;4.16&#8243; custom_padding=&#8220;|||&#8220; global_colors_info=&#8220;{}&#8220; custom_padding__hover=&#8220;|||&#8220;][et_pb_text admin_label=&#8220;Erkl\u00e4rung&#8220; _builder_version=&#8220;4.25.2&#8243; _module_preset=&#8220;default&#8220; text_text_color=&#8220;#000000&#8243; text_font_size=&#8220;22px&#8220; border_style_all=&#8220;none&#8220; border_width_bottom=&#8220;1px&#8220; global_colors_info=&#8220;{}&#8220;]<\/p>\n<p>stop a script<\/p>\n<p>[\/et_pb_text][\/et_pb_column][et_pb_column type=&#8220;3_5&#8243; _builder_version=&#8220;4.22.2&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_text admin_label=&#8220;Call&#8220; _builder_version=&#8220;4.25.2&#8243; _module_preset=&#8220;default&#8220; text_font=&#8220;||||||||&#8220; text_text_color=&#8220;#000000&#8243; border_style_all=&#8220;none&#8220; border_width_bottom=&#8220;1px&#8220; global_colors_info=&#8220;{}&#8220;]<\/p>\n<p>http.get(&#8218;http:\/\/&#8217;+sipAdresse+&#8217;\/api\/v2\/scripts\/stop&#8216;);<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row column_structure=&#8220;2_5,3_5&#8243; custom_padding_last_edited=&#8220;on|tablet&#8220; admin_label=&#8220;script&#8220; _builder_version=&#8220;4.25.2&#8243; custom_margin=&#8220;||0px|&#8220; custom_margin_tablet=&#8220;&#8220; custom_margin_phone=&#8220;&#8220; custom_margin_last_edited=&#8220;on|desktop&#8220; custom_padding=&#8220;30px||0px|&#8220; custom_padding_tablet=&#8220;&#8220; custom_padding_phone=&#8220;&#8220; border_width_all=&#8220;3px&#8220; border_style_all=&#8220;dashed&#8220; border_width_top=&#8220;0px&#8220; border_width_right=&#8220;0px&#8220; border_width_bottom=&#8220;2px&#8220; border_style_bottom=&#8220;solid&#8220; border_width_left=&#8220;0px&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_column type=&#8220;2_5&#8243; _builder_version=&#8220;4.16&#8243; custom_padding=&#8220;|||&#8220; global_colors_info=&#8220;{}&#8220; custom_padding__hover=&#8220;|||&#8220;][et_pb_text admin_label=&#8220;Erkl\u00e4rung&#8220; _builder_version=&#8220;4.25.2&#8243; _module_preset=&#8220;default&#8220; text_text_color=&#8220;#000000&#8243; text_font_size=&#8220;22px&#8220; border_style_all=&#8220;none&#8220; border_width_bottom=&#8220;1px&#8220; global_colors_info=&#8220;{}&#8220;]<\/p>\n<p>change machine status<\/p>\n<p>[\/et_pb_text][\/et_pb_column][et_pb_column type=&#8220;3_5&#8243; _builder_version=&#8220;4.22.2&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_text admin_label=&#8220;Call&#8220; _builder_version=&#8220;4.25.2&#8243; _module_preset=&#8220;default&#8220; text_font=&#8220;||||||||&#8220; text_text_color=&#8220;#000000&#8243; border_style_all=&#8220;none&#8220; border_width_bottom=&#8220;1px&#8220; global_colors_info=&#8220;{}&#8220;]<\/p>\n<p>jsonToSend.Add(&#8218;{&#8222;action&#8220;:&#8220;&#8218;+inttostr(action)+'&#8220;}&#8216;);<br \/>http.Post(&#8218;http:\/\/&#8217;+sipAdresse+&#8217;\/api\/v2\/machine\/control\/&#8216;, jsonToSend);<\/p>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8220;Call&#8220; _builder_version=&#8220;4.25.2&#8243; _module_preset=&#8220;default&#8220; text_font=&#8220;||||||||&#8220; text_text_color=&#8220;#000000&#8243; border_style_all=&#8220;none&#8220; border_width_bottom=&#8220;1px&#8220; global_colors_info=&#8220;{}&#8220;]<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\" border=\"1\">\n<tbody>\n<tr>\n<td style=\"width: 50%;\">action = 0<\/td>\n<td style=\"width: 50%;\">Maschine ausschalten<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">action = 1<\/td>\n<td style=\"width: 50%;\">Maschine anschalten<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">action = 2<\/td>\n<td style=\"width: 50%;\">Maschine ECO-Modos<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">action = 3<\/td>\n<td style=\"width: 50%;\">Dampfboiler aus<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">action = 4<\/td>\n<td style=\"width: 50%;\">Dampfboiler an<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">action = 5<\/td>\n<td style=\"width: 50%;\">Maschine an + Dampfboiler aus<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row admin_label=&#8220;\u00dcberschrift&#8220; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; custom_margin=&#8220;40px||||false|false&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_column type=&#8220;4_4&#8243; _builder_version=&#8220;4.20.0&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_text _builder_version=&#8220;4.25.2&#8243; _module_preset=&#8220;default&#8220; custom_padding=&#8220;0px|||||&#8220; global_colors_info=&#8220;{}&#8220;]<\/p>\n<h1>Umsetzungen (Version 2)<\/h1>\n<p>&nbsp;<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row column_structure=&#8220;1_2,1_2&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_column type=&#8220;1_2&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_text _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;]<\/p>\n<p>Eine Umsetzung in iOS kann \u00fcber Kurzbefehle realisiert werden (die IP-Adresse ist zu ersetzen):<\/p>\n<p>[\/et_pb_text][\/et_pb_column][et_pb_column type=&#8220;1_2&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_image src=&#8220;https:\/\/www.xenia-espresso.de\/wp-content\/uploads\/2025\/01\/iOSAPI.jpg&#8220; title_text=&#8220;iOSAPI&#8220; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][\/et_pb_image][\/et_pb_column][\/et_pb_row][et_pb_row column_structure=&#8220;1_2,1_2&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_column type=&#8220;1_2&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_text _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;]<\/p>\n<p>Mit Postman (Windows\/Linux) kann man den Zugriff so realisieren:<\/p>\n<p>10.11.12.245 muss ersetzt werden durch die IPAdresse der eigenen Maschine.<\/p>\n<p>[\/et_pb_text][\/et_pb_column][et_pb_column type=&#8220;1_2&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_image src=&#8220;https:\/\/www.xenia-espresso.de\/wp-content\/uploads\/2025\/01\/postman1.png&#8220; title_text=&#8220;postman1&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][\/et_pb_image][et_pb_image src=&#8220;https:\/\/www.xenia-espresso.de\/wp-content\/uploads\/2025\/01\/postman2.png&#8220; title_text=&#8220;postman2&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][\/et_pb_image][et_pb_image src=&#8220;https:\/\/www.xenia-espresso.de\/wp-content\/uploads\/2025\/01\/postman3.png&#8220; title_text=&#8220;postman3&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][\/et_pb_image][\/et_pb_column][\/et_pb_row][et_pb_row column_structure=&#8220;1_3,1_3,1_3&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_column type=&#8220;1_3&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_text _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;]<\/p>\n<p>Mit der HTTP-Request App (Android) und Shortcuts auf dem Desktop:<\/p>\n<p>[\/et_pb_text][\/et_pb_column][et_pb_column type=&#8220;1_3&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_image src=&#8220;https:\/\/www.xenia-espresso.de\/wp-content\/uploads\/2025\/01\/HTTP-RequestApp1.jpg&#8220; title_text=&#8220;HTTP-RequestApp1&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][\/et_pb_image][et_pb_image src=&#8220;https:\/\/www.xenia-espresso.de\/wp-content\/uploads\/2025\/01\/HTTP-RequestApp3.jpg&#8220; title_text=&#8220;HTTP-RequestApp3&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][\/et_pb_image][\/et_pb_column][et_pb_column type=&#8220;1_3&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][et_pb_image src=&#8220;https:\/\/www.xenia-espresso.de\/wp-content\/uploads\/2025\/01\/HTTP-RequestApp2.jpg&#8220; title_text=&#8220;HTTP-RequestApp2&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][\/et_pb_image][et_pb_image src=&#8220;https:\/\/www.xenia-espresso.de\/wp-content\/uploads\/2025\/01\/HTTP-RequestApp4.jpg&#8220; title_text=&#8220;HTTP-RequestApp4&#8243; _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;][\/et_pb_image][et_pb_text _builder_version=&#8220;4.27.4&#8243; _module_preset=&#8220;default&#8220; global_colors_info=&#8220;{}&#8220;]<\/p>\n<p>Hinweis zu einer Alternative: als (raw) Body ggf.<\/p>\n<div class=\"bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code\">\n<div class=\"bbCodeBlock-content\" dir=\"ltr\">\n<pre class=\"bbCodeCode\" dir=\"ltr\" data-xf-init=\"code-block\" data-lang=\"\"><code>{\"action\":1}<\/code><\/pre>\n<\/div>\n<\/div>\n<p>\u00a0einsetzen<\/p>\n<p>&nbsp;<\/p>\n<p>Beispiel zum Import in die App:<\/p>\n<div class='w3eden'><!-- WPDM Link Template: Default Template -->\n\n<div class=\"link-template-default card mb-2\">\n    <div class=\"card-body\">\n        <div class=\"media\">\n            <div class=\"mr-3 img-48\"><img decoding=\"async\" class=\"wpdm_icon\" alt=\"Icon\" src=\"https:\/\/www.xenia-espresso.de\/wp-content\/plugins\/download-manager\/assets\/file-type-icons\/zip.svg\" \/><\/div>\n            <div class=\"media-body\">\n                <h3 class=\"package-title\"><a href='https:\/\/www.xenia-espresso.de\/en\/download\/http-request-app-beispiel-zum-import\/'>HTTP-Request App - Beispiel zum Import<\/a><\/h3>\n                <div class=\"text-muted text-small\"><i class=\"fas fa-copy\"><\/i> 1 file(s) <i class=\"fas fa-hdd ml-3\"><\/i> 10.44 KB<\/div>\n            <\/div>\n            <div class=\"ml-3\">\n                <a class='wpdm-download-link download-on-click btn btn-secondary btn-xs' rel='nofollow' href='#' data-downloadurl=\"https:\/\/www.xenia-espresso.de\/en\/download\/http-request-app-beispiel-zum-import\/?wpdmdl=66237&refresh=69f482f8c84fd1777631992\">Download<\/a>\n            <\/div>\n        <\/div>\n    <\/div>\n<\/div>\n\n<\/div>\n<p>&nbsp;<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>","protected":false},"excerpt":{"rendered":"<p>API Beispiele (Version 2) Die Beispiel sind in Objectpascal geschrieben und m\u00fcssen der jeweiligen Sprache\/Umgebung angepasst werden.Ausf\u00fchrung eines ScriptesjsonToSend.Add(&#8218;{&#8222;ID&#8220;:&#8220;&#8218;+inttostr(scriptID)+'&#8220;}&#8216;);http.Post(&#8218;http:\/\/&#8217;+sIPAdresse+&#8217;\/api\/v2\/scripts\/execute\/&#8216;, jsonToSend); sIPAdresse = die IPAdresse der Maschine im NetzscriptID = die ID des Scriptes \u00a0Anhalten eines Scripteshttp.get(&#8218;http:\/\/&#8217;+sipAdresse+&#8217;\/api\/v2\/scripts\/stop&#8216;);Maschinenstatus \u00e4ndernjsonToSend.Add(&#8218;{&#8222;action&#8220;:&#8220;&#8218;+inttostr(action)+'&#8220;}&#8216;);http.Post(&#8218;http:\/\/&#8217;+sipAdresse+&#8217;\/api\/v2\/machine\/control\/&#8216;, jsonToSend); action = 0 Maschine ausschalten action = 1 Maschine anschalten action = 2 Maschine ECO-Modos action = [&hellip;]<\/p>","protected":false},"author":2,"featured_media":61321,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"class_list":["post-65297","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/www.xenia-espresso.de\/en\/wp-json\/wp\/v2\/pages\/65297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xenia-espresso.de\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.xenia-espresso.de\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.xenia-espresso.de\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xenia-espresso.de\/en\/wp-json\/wp\/v2\/comments?post=65297"}],"version-history":[{"count":23,"href":"https:\/\/www.xenia-espresso.de\/en\/wp-json\/wp\/v2\/pages\/65297\/revisions"}],"predecessor-version":[{"id":66241,"href":"https:\/\/www.xenia-espresso.de\/en\/wp-json\/wp\/v2\/pages\/65297\/revisions\/66241"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.xenia-espresso.de\/en\/wp-json\/wp\/v2\/media\/61321"}],"wp:attachment":[{"href":"https:\/\/www.xenia-espresso.de\/en\/wp-json\/wp\/v2\/media?parent=65297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}