{"id":2920,"date":"2022-12-03T07:45:17","date_gmt":"2022-12-03T13:45:17","guid":{"rendered":"https:\/\/promincproductions.com\/blog\/?p=2920"},"modified":"2022-12-03T08:59:04","modified_gmt":"2022-12-03T14:59:04","slug":"qnap-container-station-api-with-postman","status":"publish","type":"post","link":"https:\/\/promincproductions.com\/blog\/qnap-container-station-api-with-postman\/","title":{"rendered":"QNAP Container Station API with Postman"},"content":{"rendered":"<p>Read on for an example on how to use the QNAP Container Station API to manage the Container Station configuration.  In this example you&#8217;ll learn how to get an Authentication cookie from the QNAP Container Station API and then use that to make subsequent requests to get a list of containers and modify the configuration on them. <\/p>\n\n\n\n<p>This tutorial uses Postman to store, manage, and request the API calls to the QNAP Container Station API.  Postman is a software application for making API requests.  Other methods of making API requests can be used of course &#8211; <code>curl<\/code> being the most common method by many programmers.  I&#8217;ve fallen in love with Postman however mainly on the basis of the ability to easily configure and store all of my API requests for any platform into one tool.<\/p>\n\n\n\n<p>Postman also offers Environments to store configuration variables for various servers, services, etc.  That is out of scope for this post &#8211; something I may have to cover at a later time&#8230;  But documentation on how to use that exists on the internet elsewhere already. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"600\" height=\"600\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/qnap-container-station-api-via-postman.png\" alt=\"Featured Image: QNAP Container Station with Postman\" class=\"wp-image-2935\" title=\"Featured Image: QNAP Container Station with Postman\" srcset=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/qnap-container-station-api-via-postman.png 600w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/qnap-container-station-api-via-postman-500x500.png 500w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/qnap-container-station-api-via-postman-150x150.png 150w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/qnap-container-station-api-via-postman-450x450.png 450w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Why Use the Container Station API<\/h2>\n\n\n\n<p>Getting back on track to this tutorial on how to use the Container Station API &#8211; I want to talk a bit about <em>why<\/em> one would want to use this.  For me, it was sparked by the limitations of how the QNAP Container Station software works.  As you may (or may not) know, QNAPs Container Station is really just a graphical interface for managing containers &#8211; I personally use <code>docker<\/code> all the time, but there are also <code>lxc<\/code> and <code>lxd<\/code> containers that can be used in Container Station.  While I like their GUI, it&#8217;s not very good&#8230;  (sorry QNAP &#8211; just speaking the truth here&#8230;)<\/p>\n\n\n\n<p>After a container is up and running, you can&#8217;t reconfigure it in the GUI.  It&#8217;s configuration can be changed via the command line, but by default QNAP doesn&#8217;t allow Docker to be easily accessed via the command line.  (see  my post <a href=\"https:\/\/promincproductions.com\/blog\/access-docker-command-via-ssh-on-qnap-ts-251\/\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"831\">Access Docker Command via SSH on QNAP TS-251<\/a> for some tricks on this)  But even if I have access to the Docker command, I&#8217;ll be honest &#8211; I&#8217;m a bit rusty on the docker commands as I don&#8217;t run them often enough&#8230;  But I created a new container with a newer version and simply needed to turn off the Auto Start property of the old container (didn&#8217;t want to delete in case I needed to fall back to it some day).  But for whatever reason the GUI would never let the <strong>Save<\/strong> button be activated and thus I couldn&#8217;t complete what I needed in the QNAP admin.<\/p>\n\n\n\n<p>Additionally, I&#8217;ve found the QNAP web admin to be painfully slow.  I am running a TS-251 which has a Celeron processor and isn&#8217;t one of their <em>powerhouse<\/em> models &#8211; I get that.  But at one point I waited 15 minutes for Container Station to load a page and it still never returned&#8230;  this isn&#8217;t manageable and I&#8217;m still not sure why it&#8217;s this painfully slow.  The irony of this is that the API calls respond in a fraction of a second and I can move on with my day.  In fact I think I spent less time researching how to use the API, not liking the documentation and thus wrote this post in hopes to help myself and others out in the future, AND changed the setting in less time than I spent trying to get the Container Station to load and save via the QNAP web admin&#8230;  Sad but true.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Download Postman on your Computer<\/h2>\n\n\n\n<p>If you don&#8217;t have Postman already installed, download it from their website.<\/p>\n\n\n\n<p>NOTE: They may ask you to create an account with Postman.  That&#8217;s your personal choice, but this tutorial works (at least at the time of writing) without needing an account.  I don&#8217;t have one personally.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\" id=\"https:\/\/www.postman.com\/downloads\/\"><a class=\"wp-block-button__link wp-element-button\">Download Postman<\/a><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Configure Postman<\/h2>\n\n\n\n<p>In Postman:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click the <strong>Import<\/strong> button<\/li>\n\n\n\n<li>Select <strong>Raw text<\/strong><\/li>\n\n\n\n<li>Paste the configuration below into the text area and click the <strong>Continue<\/strong> button.\n<ul class=\"wp-block-list\">\n<li>The following values will need to be set to your servers specifications before importing:\n<ul class=\"wp-block-list\">\n<li><code>&lt;qnap_server_ip_address&gt;<\/code>: The IP address of the QNAP server<\/li>\n\n\n\n<li><code>&lt;qnap_server_port&gt;<\/code>: The port of the QNAP server<\/li>\n\n\n\n<li><code>&lt;qnap_server_user_username&gt;<\/code>: The username of a user on the QNAP server<\/li>\n\n\n\n<li><code>&lt;qnap_server_user_password&gt;<\/code>: The password of a user on the QNAP server<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>A confirmation page will be shown &#8211; click the <strong>Import<\/strong> button.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n\t\"info\": {\n\t\t\"_postman_id\": \"f7794814-e7c0-4024-ac34-6464161650ee\",\n\t\t\"name\": \"QNAP Container Station\",\n\t\t\"schema\": \"https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json\"\n\t},\n\t\"item\": &#091;\n\t\t{\n\t\t\t\"name\": \"Container Station\",\n\t\t\t\"item\": &#091;\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Authentication\",\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"POST\",\n\t\t\t\t\t\t\"header\": &#091;],\n\t\t\t\t\t\t\"body\": {\n\t\t\t\t\t\t\t\"mode\": \"raw\",\n\t\t\t\t\t\t\t\"raw\": \"{\\\"username\\\": \\\"{{username}}\\\", \\\"password\\\": \\\"{{password}}\\\"}\",\n\t\t\t\t\t\t\t\"options\": {\n\t\t\t\t\t\t\t\t\"raw\": {\n\t\t\t\t\t\t\t\t\t\"language\": \"json\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{server_url}}container-station\/api\/v1\/login\",\n\t\t\t\t\t\t\t\"host\": &#091;\n\t\t\t\t\t\t\t\t\"{{server_url}}container-station\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": &#091;\n\t\t\t\t\t\t\t\t\"api\",\n\t\t\t\t\t\t\t\t\"v1\",\n\t\t\t\t\t\t\t\t\"login\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": &#091;]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"Auto start\",\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"PUT\",\n\t\t\t\t\t\t\"header\": &#091;],\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{server_url}}container-station\/api\/v1\/container\/docker\/d3110ef06b0ceb58feb0072ae36da52f557a1381c58043734ee7a713417827f1\/autostart\/off\",\n\t\t\t\t\t\t\t\"host\": &#091;\n\t\t\t\t\t\t\t\t\"{{server_url}}container-station\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": &#091;\n\t\t\t\t\t\t\t\t\"api\",\n\t\t\t\t\t\t\t\t\"v1\",\n\t\t\t\t\t\t\t\t\"container\",\n\t\t\t\t\t\t\t\t\"docker\",\n\t\t\t\t\t\t\t\t\"d3110ef06b0ceb58feb0072ae36da52f557a1381c58043734ee7a713417827f1\",\n\t\t\t\t\t\t\t\t\"autostart\",\n\t\t\t\t\t\t\t\t\"off\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": &#091;]\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"name\": \"List containers\",\n\t\t\t\t\t\"request\": {\n\t\t\t\t\t\t\"method\": \"GET\",\n\t\t\t\t\t\t\"header\": &#091;],\n\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\"raw\": \"{{server_url}}container-station\/api\/v1\/container\",\n\t\t\t\t\t\t\t\"host\": &#091;\n\t\t\t\t\t\t\t\t\"{{server_url}}container-station\"\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"path\": &#091;\n\t\t\t\t\t\t\t\t\"api\",\n\t\t\t\t\t\t\t\t\"v1\",\n\t\t\t\t\t\t\t\t\"container\"\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"response\": &#091;]\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t],\n\t\"event\": &#091;\n\t\t{\n\t\t\t\"listen\": \"prerequest\",\n\t\t\t\"script\": {\n\t\t\t\t\"type\": \"text\/javascript\",\n\t\t\t\t\"exec\": &#091;\n\t\t\t\t\t\"\"\n\t\t\t\t]\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t\"listen\": \"test\",\n\t\t\t\"script\": {\n\t\t\t\t\"type\": \"text\/javascript\",\n\t\t\t\t\"exec\": &#091;\n\t\t\t\t\t\"\"\n\t\t\t\t]\n\t\t\t}\n\t\t}\n\t],\n\t\"variable\": &#091;\n\t\t{\n\t\t\t\"key\": \"server_url\",\n\t\t\t\"value\": \"http:\/\/&lt;qnap_server_ip_address&gt;:&lt;qnap_server_port&gt;\/\",\n\t\t\t\"type\": \"default\"\n\t\t},\n\t\t{\n\t\t\t\"key\": \"username\",\n\t\t\t\"value\": \"&lt;qnap_server_user_username&gt;\",\n\t\t\t\"type\": \"default\"\n\t\t},\n\t\t{\n\t\t\t\"key\": \"password\",\n\t\t\t\"value\": \"&lt;qnap_server_user_password&gt;\",\n\t\t\t\"type\": \"default\"\n\t\t}\n\t]\n}<\/code><\/pre>\n\n\n\n<p>This creates a collection of requests with your configuration set in Postman.  These can be clicked on to run the requests.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"256\" height=\"182\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image.png\" alt=\"Imported collection of QNAP Container Station requests in Postman\" class=\"wp-image-2922\" title=\"Imported collection of QNAP Container Station requests in Postman\" srcset=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image.png 256w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-150x107.png 150w\" sizes=\"(max-width: 256px) 100vw, 256px\" \/><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">How to Use the QNAP Container Station API<\/h2>\n\n\n\n<p>An authentication cookie needs to be fetched and stored in Postman before future requests will function as expected.  To do this, run the <strong>Authentication<\/strong> request.  A response similar to this will show indicating success.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"532\" height=\"276\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-1.png\" alt=\"Example response from the QNAP Container Station Authorization API\" class=\"wp-image-2923\" title=\"Example response from the QNAP Container Station Authorization API\" srcset=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-1.png 532w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-1-500x259.png 500w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-1-150x78.png 150w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-1-450x233.png 450w\" sizes=\"(max-width: 532px) 100vw, 532px\" \/><figcaption class=\"wp-element-caption\">Example response from the <strong>Authentication<\/strong> API<\/figcaption><\/figure>\n<\/div>\n\n\n<p>More importantly, you&#8217;ll be able to see the cookie needed is now set.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"462\" height=\"162\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-2.png\" alt=\"Cookie set in Postman from making an Authentication request to the QNAP Container Station API\" class=\"wp-image-2924\" title=\"Cookie set in Postman from making an Authentication request to the QNAP Container Station API\" srcset=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-2.png 462w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-2-150x53.png 150w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-2-450x158.png 450w\" sizes=\"(max-width: 462px) 100vw, 462px\" \/><figcaption class=\"wp-element-caption\">Authentication cookie is set in Postman<\/figcaption><\/figure>\n<\/div>\n\n\n<p>With this now set, the other requests within this collection will function as expected.  They will utilize the cookie set by the <strong>Authentication<\/strong> request and thus the other requests will succeed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">List Containers<\/h3>\n\n\n\n<p>Now that the <strong>Authentication<\/strong> cookie has been set, a list of the containers in Container Station can be obtained by calling the <strong>List Containers<\/strong> API request.  Open that request in Postman and click the <strong>Send<\/strong> button (no configuration is needed for this request).  The response is a JSON object of all of the container information from QNAPs Container Station.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"428\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-3-1024x428.png\" alt=\"Example response of the list of containers from the QNAP Container Station List Containers API request\" class=\"wp-image-2928\" title=\"Example response of the list of containers from the QNAP Container Station List Containers API request\" srcset=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-3-1024x428.png 1024w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-3-500x209.png 500w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-3-768x321.png 768w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-3-150x63.png 150w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-3-600x251.png 600w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-3-450x188.png 450w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-3-1360x568.png 1360w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-3.png 1382w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Example response of a list of the containers in QNAPs Container Station<\/figcaption><\/figure>\n<\/div>\n\n\n<h3 class=\"wp-block-heading\">Modify a containers Auto-Start setting<\/h3>\n\n\n\n<p>Now that we are authenticated and know container information, we can use the API to modify the settings of a container.  As just one example, let&#8217;s change the <strong>Auto-Start<\/strong> configuration setting on a container.<\/p>\n\n\n\n<p>For this, the <strong>Auto Start<\/strong> API in the Postman collection provided in this tutorial will be used.  Open the request in Postman and modify the URL.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"205\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-4-1024x205.png\" alt=\"Container Station Auto Start API URL parameters\" class=\"wp-image-2929\" title=\"Container Station Auto Start API URL parameters\" srcset=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-4-1024x205.png 1024w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-4-500x100.png 500w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-4-768x154.png 768w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-4-150x30.png 150w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-4-600x120.png 600w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-4-450x90.png 450w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-4-1360x273.png 1360w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-4.png 1396w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Example request for the Container Station <strong>Auto Start<\/strong> API<\/figcaption><\/figure>\n<\/div>\n\n\n<ul class=\"wp-block-list\">\n<li><code>container_type<\/code>: (red highlight in above screenshot) The type of container.  This is obtained from the <code>type<\/code> property of the <strong>List Containers<\/strong> API response.  Valid values:\n<ul class=\"wp-block-list\">\n<li><code>lxc<\/code><\/li>\n\n\n\n<li><code>lxd<\/code><\/li>\n\n\n\n<li><code>docker<\/code><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>container_id<\/code>: (green highlighted in above screenshot) The ID of the container.  This is obtained from the <code>id<\/code> property of the <strong>List Containers<\/strong> API response.<\/li>\n\n\n\n<li><code>state<\/code>: (yellow highlight in above screenshot) The state of the <strong>Auto Start<\/strong> setting that you wish to set it to.  Valid values:\n<ul class=\"wp-block-list\">\n<li><code>on<\/code><\/li>\n\n\n\n<li><code>off<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>Once the URL is configured press the <strong>Send<\/strong> button in Postman and the response will indicate the current state of the container &#8211; including the value of the <code>autostart<\/code> property that was just set.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"363\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-5-1024x363.png\" alt=\"Example response from the Auto Start Container Station API after turning autostart on\" class=\"wp-image-2930\" title=\"Example response from the Auto Start Container Station API after turning autostart on\" srcset=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-5-1024x363.png 1024w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-5-500x177.png 500w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-5-768x272.png 768w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-5-150x53.png 150w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-5-600x213.png 600w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-5-450x159.png 450w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-5-1360x482.png 1360w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-5.png 1392w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Example response from the Container Station <strong>Auto Start<\/strong> API after turning this setting on.<\/figcaption><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"1024\" height=\"356\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-6-1024x356.png\" alt=\"Example response from the Auto Start Container Station API after turning autostart off\" class=\"wp-image-2931\" title=\"Example response from the Auto Start Container Station API after turning autostart off\" srcset=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-6-1024x356.png 1024w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-6-500x174.png 500w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-6-768x267.png 768w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-6-450x156.png 450w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-6-1360x473.png 1360w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-6-150x52.png 150w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-6-600x209.png 600w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/image-6.png 1387w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Example response from the Container Station <strong>Auto Start<\/strong> API after turning this setting off.<\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Next Steps<\/h2>\n\n\n\n<p>There is a lot more that can be done with the API.  This tutorial outlines the basics on how to get setup and make a useful call to the API to change a setting on a container.  But there are other uses of the API and QNAP has documented all of those functions already (see references below).<\/p>\n\n\n\n<p>Postman is such a powerful tool and this tutorial only scratches the surface of how it can be used.  The purpose here was to get you headed down the right path of getting Postman setup, how to use it, and thus you can run from here as needed.  You can duplicate requests in Postman, change the name and the path and arguments as needed and from there you&#8217;ll have a great <em>toolbox<\/em> at your disposal for the next time you have a need to work with QNAPs Container Station via the API.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">QNAP Container Station API References<\/h2>\n\n\n\n<p>NOTE: At the time of writing, QNAP Container Station 2 was used.  Days before writing this, QNAP had just recently announced that Container Station 3.0 was in Beta.  I have not (<em>yet<\/em>&#8230;) opted into this Beta program and thus I don&#8217;t know if this process will work in the future or not.  I&#8217;m excited to find out!<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"http:\/\/qnap-dev.github.io\/container-station-api\/system.html\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"832\">Getting started with the QNAP Container Station API and Authentication<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/qnap-dev.github.io\/container-station-api\/container.html#list-containers\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"833\">List Containers<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/qnap-dev.github.io\/container-station-api\/container.html#start-a-container\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"834\">Start and stop a container<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/qnap-dev.github.io\/container-station-api\/resource.html\" target=\"_blank\" rel=\"noopener\" data-lasso-id=\"835\">Configuring an existing container<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Read on for an example on how to use the QNAP Container Station API to manage the Container [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2935,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":true},"categories":[384],"tags":[382,335,383,330],"class_list":["post-2920","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-qnap","tag-api","tag-container-station","tag-postman","tag-qnap"],"jetpack_featured_media_url":"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2022\/12\/qnap-container-station-api-via-postman.png","jetpack_shortlink":"https:\/\/wp.me\/p4BbcR-L6","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/2920","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/comments?post=2920"}],"version-history":[{"count":8,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/2920\/revisions"}],"predecessor-version":[{"id":2940,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/2920\/revisions\/2940"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/media\/2935"}],"wp:attachment":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/media?parent=2920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/categories?post=2920"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/tags?post=2920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}