{"id":26099,"date":"2018-08-22T13:40:49","date_gmt":"2018-08-22T18:40:49","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=26099"},"modified":"2018-08-22T13:41:41","modified_gmt":"2018-08-22T18:41:41","slug":"using-curl-to-manage-ca-certificates","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/mtr-software\/mtr-api-reference\/rcell_api_appendix\/using-curl-to-manage-ca-certificates\/","title":{"rendered":"Using Curl to Manage CA certificates"},"content":{"rendered":"<p><strong>upload<\/strong> &#8211; allows to download a CA certificate to the device<\/p>\n<p class=\"MsoNormal\">Example (post request, using curl):<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"brush:xml\">curl -i -k -b \/tmp\/headers --http1.0 -F file=@filename.crt \"https:\/\/192.168.2.1\/api\/cacertificates\/upload?token=93CFDDC72CE62482990E91B74369FB\"\r\n\r\nHTTP\/1.0 200 OK\r\nAccess-Control-Allow-Origin: *\r\nSet-Cookie: token=93CFDDC72CE62482990E91B74369FB; Path=\/; Secure\r\nCache-Control: no-cache\r\nContent-type: application\/json\r\nContent-Length: 45\r\nConnection: close\r\nDate: Wed, 13 Jun 2018 14:24:27 GMT\r\nServer: rcell\r\n{\r\n     \"code\" : 200,\r\n     \"status\" : \"success\"\r\n}<\/pre>\n<p class=\"MsoNormal\"><strong>remove<\/strong> &#8211; allows to remove a CA certificate on the device<\/p>\n<p class=\"MsoNormal\">Example:<\/p>\n<p>&nbsp;<\/p>\n<p class=\"MsoNormal\">Delete request, using curl. E8730CC584B1EB172D71544D8913EE4736438DBF5D3C0F5BFC757E7228A97F73.crt is an internal filename, see in \u201cdetails\u201d request.<\/p>\n<pre class=\"brush:xml\">curl -i -k -b \/tmp\/headers --http1.0 -X \"DELETE\" \"https:\/\/192.168.2.1\/api\/cacertificates\/remove\/E8730CC584B1EB172D71544D8913EE4736438DBF5D3C0F5BFC757E7228A97F73.crt?token=93CFDDC72CE62482990E91B74369FB\"\r\nHTTP\/1.0 200 OK\r\nAccess-Control-Allow-Origin: *\r\nSet-Cookie: token=93CFDDC72CE62482990E91B74369FB; Path=\/; Secure\r\nCache-Control: no-cache\r\nContent-type: application\/json\r\nContent-Length:\r\nConnection: close\r\nDate: Wed, 13 Jun 2018 14:47:39 GMT\r\nServer: rcell\r\n{\r\n    \"code\" : 200, \r\n    \"status\" : \"success\"\r\n{<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>upload &#8211; allows to download a CA certificate to the device Example (post request, using curl): &nbsp; curl -i -k -b \/tmp\/headers &#8211;http1.0 -F file=@filename.crt &#8220;https:\/\/192.168.2.1\/api\/cacertificates\/upload?token=93CFDDC72CE62482990E91B74369FB&#8221; HTTP\/1.0 200 OK Access-Control-Allow-Origin: * Set-Cookie: token=93CFDDC72CE62482990E91B74369FB; Path=\/; Secure Cache-Control: no-cache Content-type: application\/json Content-Length: 45 Connection: close Date: Wed, 13 Jun 2018 14:24:27 GMT Server: rcell { &#8220;code&#8221; : [&hellip;]<\/p>\n","protected":false},"author":1478,"featured_media":0,"parent":13423,"menu_order":9,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-26099","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/26099","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/1478"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=26099"}],"version-history":[{"count":4,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/26099\/revisions"}],"predecessor-version":[{"id":32909,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/26099\/revisions\/32909"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/13423"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=26099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}