{"id":5860,"date":"2024-04-17T12:10:38","date_gmt":"2024-04-17T12:10:38","guid":{"rendered":"https:\/\/accuweb.cloud\/api\/docs\/8-6-1\/api-overview\/"},"modified":"2024-05-29T08:21:50","modified_gmt":"2024-05-29T08:21:50","slug":"api-overview","status":"publish","type":"docs","link":"https:\/\/accuweb.cloud\/api\/docs\/latest\/api-overview\/","title":{"rendered":"API Overview"},"content":{"rendered":"<p>The API empowers developers to streamline a series of essential actions throughout the application lifecycle and enhances the platform\u2019s capabilities by integrating it with various services. Through our platform API, you have the capability to automatically generate environments, launch applications, and conduct additional tasks that were previously exclusive to the platform dashboard (though not restricted to these responsibilities).<\/p>\n<p>The Platform API adheres to REST principles. A REST API defines a collection of functions that developers can request and subsequently receive a response for. This interaction occurs through the HTTP protocol. The benefit of this methodology lies in the extensive reach of the HTTP protocol, enabling the REST API to be compatible with nearly all programming languages.<\/p>\n<h2>How to Use Platform API<\/h2>\n<p>All API calls are\u00a0<b>GET<\/b>\u00a0or\u00a0<b>POST<\/b>\u00a0HTTP requests to the URL with a set of parameters:<\/p>\n<p class=\"example\">https:\/\/<a href=\"https:\/\/accuweb.cloud\/api\/docs\/8-6-1\/others\/user-environment-domain\/\">[hoster-api-host]<\/a>\/1.0\/<\/p>\n<p class=\"example\"><a href=\"https:\/\/accuweb.cloud\/api\/docs\/8-6-1\/others\/user-environment-domain\/\">[hoster-api-host]<\/a> &#8211; You can get this information from <a href=\"https:\/\/accuweb.cloud\/api\/docs\/8-6-1\/others\/user-environment-domain\/\">here<\/a>. The &#8220;User Environment Domain(s)&#8221; field corresponds to the URL type for API access.<\/p>\n<p class=\"example\">Each method is provided with a response example. The request&#8217;s response is\u00a0<b>UTF-8<\/b>\u00a0encoded.<\/p>\n<h2>Request Parameters<\/h2>\n<p>Each request has a set of mandatory parameters that are required to execute the called operation. Additionally, methods can have optional parameters for the request customization (e.g. to perform extra actions). You can find a list of all parameters for a particular method within the API documentation.<\/p>\n<p>All API methods require authentication and action target details, provided through the appropriate\u00a0<b><i>session (token) (mandatory)<\/i><\/b>\u00a0and\u00a0<b><i>envName (appid) <\/i><\/b>\u00a0parameters.<\/p>\n<p>The text value of the parameters should be provided in the UTF-8 code. The sequence of the parameters in the request is not important.<\/p>\n<h2>Request Authentication<\/h2>\n<p>The\u00a0<b>session (token)<\/b>\u00a0parameter is responsible for authentication, i.e. it determines the user who performs the action.<\/p>\n<p>You can get either generate <span style=\"text-decoration: underline;\"><strong>session id<\/strong><\/span> or you can use <span style=\"text-decoration: underline;\"><strong>API token<\/strong><\/span> for this parameter.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>API Token<\/strong><\/span> &#8211; You can generate API toke from the user account. Here is how you can generate <a href=\"https:\/\/accuweb.cloud\/api\/docs\/8-6-1\/others\/personal-access-tokens\/\">API access token<\/a>.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Session ID<\/strong><\/span> &#8211; You can get your session by calling the <a href=\"https:\/\/accuweb.cloud\/api\/docs\/8-6-1\/users\/authentication\/#signin-appid-login-password-authenticationresponse\"><b>Users&gt; Authentication&gt; Signin<\/b><\/a>\u00a0method. Due to security reasons, this API method (and other ones that require a password as a parameter, e.g. signup or change password) can be called via POST request only. After obtaining a session, you can use it to authenticate and execute other methods.<\/p>\n<p>It is recommended to close the working session after completing all the needed operations with API &#8211; call the\u00a0<a href=\"https:\/\/accuweb.cloud\/api\/docs\/8-6-1\/users\/authentication\/#signout-appid-session-response\"><b>Users&gt; Authentication&gt; Signout<\/b><\/a>\u00a0method.<\/p>\n<h2>Request Target<\/h2>\n<p>The request&#8217;s target is defined with one of the following parameters:<\/p>\n<ul>\n<li><b><i>appid<\/i><\/b> (optional &#8211; when method is target to user account) &#8211; specifies the action target. To simplify API usage, this parameter can be omitted if the default &#8220;dashboard&#8221; value is used (i.e. when the API method is applied to the current user account)<\/li>\n<li><b><i>envName<\/i><\/b>\u00a0&#8211; a user-friendly alias for the appid parameter if the method is applied to the specific environment within the current user account<\/li>\n<\/ul>\n<h2>Platform API Response<\/h2>\n<p>The response will not include the information of the parameter with the\u00a0<i>null<\/i>\u00a0value.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The API empowers developers to streamline a series of essential actions throughout the application lifecycle and enhances the platform\u2019s capabilities by integrating it with various services. Through our platform API, you have the capability to automatically generate environments, launch applications, and conduct additional tasks that were previously exclusive to the platform dashboard (though not restricted [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5424,"parent":2563,"menu_order":1,"comment_status":"open","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_links_to":"","_links_to_target":""},"doc_tag":[],"class_list":["post-5860","docs","type-docs","status-publish","has-post-thumbnail","hentry"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/accuweb.cloud\/api\/wp-json\/wp\/v2\/docs\/5860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/accuweb.cloud\/api\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/accuweb.cloud\/api\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/accuweb.cloud\/api\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/accuweb.cloud\/api\/wp-json\/wp\/v2\/comments?post=5860"}],"version-history":[{"count":10,"href":"https:\/\/accuweb.cloud\/api\/wp-json\/wp\/v2\/docs\/5860\/revisions"}],"predecessor-version":[{"id":7307,"href":"https:\/\/accuweb.cloud\/api\/wp-json\/wp\/v2\/docs\/5860\/revisions\/7307"}],"up":[{"embeddable":true,"href":"https:\/\/accuweb.cloud\/api\/wp-json\/wp\/v2\/docs\/2563"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/accuweb.cloud\/api\/wp-json\/wp\/v2\/media\/5424"}],"wp:attachment":[{"href":"https:\/\/accuweb.cloud\/api\/wp-json\/wp\/v2\/media?parent=5860"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/accuweb.cloud\/api\/wp-json\/wp\/v2\/doc_tag?post=5860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}