hmLoadTopic({
hmKeywords:"",
hmTitle:"Postavi ESET PROTECT On-Prem REST API",
hmDescription:"Slijedite korake u nastavku za postavljanje ESET PROTECT On-Prem REST API:",
hmPrevLink:"how_api_works.html",
hmNextLink:"api.html",
hmParentLink:"rest_api.html",
hmBreadCrumbs:"<a href=\"rest_api.html\">ESET PROTECT On-Prem REST API<\/a>",
hmTitlePath:"ESET PROTECT On-Prem REST API > Postavi ESET PROTECT On-Prem REST API",
hmHeader:"<h1 class=\"p_Heading1\"><span class=\"f_Heading1\">Postavi ESET PROTECT On-Prem REST API<\/span><\/h1>\n\r",
hmBody:"<p class=\"p_Normal\">Slijedite korake u nastavku za postavljanje ESET PROTECT On-Prem REST API:<\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 20px; margin-left: 0;\"><span class=\"f_Normal\" style=\"display:inline-block;width:20px;margin-left:-20px\">1.<\/span>Aktivirajte REST API u odjeljku <span class=\"f_UI\">Više<\/span> &gt; <a href=\"admin_server_settings.html#api\" class=\"topiclink\">Postavke<\/a>.<\/p>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 10px 0;\"><table class=\"Table_important\" >\n\r<tr class=\"Table_important\">\n\r<td class=\"Table_important\" style=\"width:4px; background-color:#E9A514;\"><br \/>\n\r<\/td>\n\r<td class=\"Table_important\" style=\"width:20px;\"><p class=\"p_Normal\"><img alt=\"VAŽNO\" title=\"VAŽNO\" width=\"20\" height=\"20\" style=\"margin:2px 0 0 0;width:20px;height:20px;border:none\" src=\".\/images\/important.svg\"\/><\/p>\n\r<\/td>\n\r<td class=\"Table_important\"><p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 13px; margin-left: 0;\"><span class=\"f_Normal\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:13px;margin-left:-13px\">&#8226;<\/span>Obavezno otvorite API portove u svom lokalnom firewallu.<\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 13px; margin-left: 0;\"><span class=\"f_Normal\" style=\"font-family: Arial,\'Lucida Sans Unicode\',\'Lucida Grande\',\'Lucida Sans\';display:inline-block;width:13px;margin-left:-13px\">&#8226;<\/span>Za korištenje REST API, peer certifikat ESET PROTECT za poslužitelj (bez obzira koristi li se kao REST poslužiteljski certifikat ili ne) mora sadržavati <span class=\"f_CodeHighlighted\">localhost<\/span> polje <span class=\"f_UI\">Common name<\/span>\/<span class=\"f_UI\">Host<\/span>. Ako peer (poslužiteljski) certifikat ne ispunjava ovaj zahtjev, <a href=\"certificates_certificate_era.html\" class=\"topiclink\">kreirajte novi certifikat<\/a> i <a href=\"set_new_era_server_certificate.html\" class=\"topiclink\">mijenjajte poslužiteljski certifikat<\/a>.<\/p><\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 20px; margin-left: 0;\"><span class=\"f_Normal\" style=\"display:inline-block;width:20px;margin-left:-20px\">2.<\/span>Dodijelite API korisnicima <span class=\"f_UI\">API<\/span> <a href=\"admin_ar_permissions_list.html\" class=\"topiclink\">skup dopuštenja<\/a>.<\/p>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 10px 0;\"><table class=\"Table_important\" >\n\r<tr class=\"Table_important\">\n\r<td class=\"Table_important\" style=\"width:4px; background-color:#E9A514;\"><br \/>\n\r<\/td>\n\r<td class=\"Table_important\" style=\"width:20px;\"><p class=\"p_Normal\"><img alt=\"VAŽNO\" title=\"VAŽNO\" width=\"20\" height=\"20\" style=\"margin:2px 0 0 0;width:20px;height:20px;border:none\" src=\".\/images\/important.svg\"\/><\/p>\n\r<\/td>\n\r<td class=\"Table_important\"><p class=\"p_Normal\">Administratorski račun ne može koristiti API.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 20px; margin-left: 0;\"><span class=\"f_Normal\" style=\"display:inline-block;width:20px;margin-left:-20px\">3.<\/span>Za automatizaciju interakcija s ESET PROTECT On-Prem API, možete koristiti <a href=\"admin_server_settings.html#api\" class=\"topiclink\">ugrađeni Swagger UI<\/a> (dostupan od ESET PROTECT On-Prem verzije 13.1).<\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: -42px; margin: 0 0 10px 55px;\"><img id=\"toggle0186a1_ICON\" class=\"dropdown-toggle-icon\" alt=\"arrow_down_business\" width=\"21\" height=\"21\" style=\"margin:0;width:21px;height:21px;border:none\" src=\".\/images\/arrow_down_business.svg\"\/> <a id=\"toggle0186a1_LINK\" class=\"dropdown-toggle\" href=\"javascript:void(0)\" data-type=\"dropdown\" data-state=\"0\" data-icon=\"toggle0186a1_ICON\" data-src0=\".\/images\/arrow_down_business.svg\" data-src1=\".\/images\/arrow_up_business.svg\">Što je Swagger UI?<\/a><\/p>\n\r<div id=\"toggle0186a1\" class=\"dropdown-toggle-body\" style=\"text-align: left; padding: 0 0 0 0; margin: 0 0 10px 38px;display:none\"><table style=\"border:none; border-spacing:0;\" role=\"presentation\">\n\r<tr>\n\r<td style=\"vertical-align:top; padding:0; border:none\"><p class=\"p_Normal\"><a href=\"https:\/\/swagger.io\/\" target=\"_blank\" onclick=\"return HMTrackTopiclink(this);\" class=\"weblink\">Swagger UI<\/a> je open-source okvir koji pomaže programerima u dizajniranju, izgradnji, dokumentiranju i korištenju RESTful web servisa. Koristeći Swagger UI, možete testirati API pozive putem web stranice:<\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 20px; margin-left: 0;\"><span class=\"f_Normal\" style=\"display:inline-block;width:20px;margin-left:-20px\">1.<\/span>Omogući Swagger UI ESET PROTECT <a href=\"admin_server_settings.html#api\" class=\"topiclink\">u postavkama<\/a> servera.<\/p>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 20px; margin-left: 0;\"><span class=\"f_Normal\" style=\"display:inline-block;width:20px;margin-left:-20px\">2.<\/span>Omogućena ugrađena funkcija Swagger UI dostupna je na . <a href=\"https:\/\/localhost:9443\/swagger\" target=\"_blank\" onclick=\"return HMTrackTopiclink(this);\" class=\"weblink\">https:\/\/localhost:9443\/swagger<\/a> Zamijenite <span class=\"f_CodeHighlighted\">localhost<\/span> ga imenom servera ili IP adresom ako je potrebno.<\/p>\n\r<p class=\"p_Normal\">Swagger UI pruža <a href=\"api.html\" class=\"topiclink\">potpune pozive API<\/a>. Trebaš samo promijeniti vrijednosti parametara u pozivima.<\/p>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 10px 0;\"><table class=\"Table_note\" >\n\r<tr class=\"Table_note\">\n\r<td class=\"Table_note\" style=\"width:4px; background-color:#3DAAE1;\"><br \/>\n\r<\/td>\n\r<td class=\"Table_note\" style=\"width:20px;\"><p class=\"p_Normal\"><img alt=\"Napomena\" title=\"Napomena\" width=\"20\" height=\"20\" style=\"margin:2px 0 0 0;width:20px;height:20px;border:none\" src=\".\/images\/note.svg\"\/><\/p>\n\r<\/td>\n\r<td class=\"Table_note\"><p class=\"p_Normal\">Swagger UI dostupna je samo na engleskom jeziku.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<p class=\"p_Normal\">Za automatizaciju interakcija implementirajte API pozive REST svoje klijentske aplikacije (na primjer <a href=\"https:\/\/www.postman.com\/\" target=\"_blank\" onclick=\"return HMTrackTopiclink(this);\" class=\"weblink\">Postman<\/a>) ili možete koristiti naredbeni redak (<a href=\"https:\/\/curl.se\/\" target=\"_blank\" onclick=\"return HMTrackTopiclink(this);\" class=\"weblink\">curl<\/a>).<\/p>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 10px 0;\"><table class=\"Table_note\" >\n\r<tr class=\"Table_note\">\n\r<td class=\"Table_note\" style=\"width:4px; background-color:#3DAAE1;\"><br \/>\n\r<\/td>\n\r<td class=\"Table_note\" style=\"width:20px;\"><p class=\"p_Normal\"><img alt=\"Napomena\" title=\"Napomena\" width=\"20\" height=\"20\" style=\"margin:2px 0 0 0;width:20px;height:20px;border:none\" src=\".\/images\/note.svg\"\/><\/p>\n\r<\/td>\n\r<td class=\"Table_note\"><p class=\"p_Normal\">Server REST radi lokalno na ESET PROTECT serveru. Ne možete koristiti ESET Connect s ESET PROTECT On-Prem REST API.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 20px; margin-left: 0;\"><span class=\"f_Normal\" style=\"display:inline-block;width:20px;margin-left:-20px\">4.<\/span>Pokrenite <span class=\"f_CodeHighlighted\"><a href=\"https:\/\/help.eset.com\/getHelp?product=protect_admin&amp;version=13.1&amp;lang=hr-HR&amp;topic=api_GetTokens_post\" onclick=\"return HMTrackTopiclink(this);\" class=\"weblink\">GetTokens<\/a><\/span> zahtjev za prijavu na REST server: U Swagger UI, proširi <span class=\"f_CodeHighlighted\">GetTokens<\/span> &gt; kliknite <span class=\"f_UI\">Isprobaj,<\/span> &gt; unesite točne podatke u tijelo zahtjeva i kliknite <span class=\"f_UI\">Izvrši<\/span>.<\/p>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 10px 0;\"><table class=\"Table_small_no_header\" >\n\r<tr class=\"Table_small_no_header\">\n\r<td class=\"Table_small_no_header\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTable\">Metoda<\/span><\/p>\n\r<\/td>\n\r<td class=\"Table_small_no_header\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTable\">POST<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"Table_small_no_header\">\n\r<td class=\"Table_small_no_header\" style=\"background-color:#F4F5F4;\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTable\">Funkcija<\/span><\/p>\n\r<\/td>\n\r<td class=\"Table_small_no_header\" style=\"background-color:#F4F5F4;\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTable\">getTokens<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"Table_small_no_header\">\n\r<td class=\"Table_small_no_header\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTable\">URL<\/span><\/p>\n\r<\/td>\n\r<td class=\"Table_small_no_header\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTable\">https:\/\/protect_server:9443\/GetTokens<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<tr class=\"Table_small_no_header\">\n\r<td class=\"Table_small_no_header\" style=\"background-color:#F4F5F4;\"><p class=\"p_NormalTable\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTable\">Tijelo<\/span><\/p>\n\r<\/td>\n\r<td class=\"Table_small_no_header\" style=\"background-color:#F4F5F4;\"><p class=\"p_NormalTableCode\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTableCode\">{<\/span><\/p>\n\r<p class=\"p_NormalTableCode\" style=\"page-break-inside: avoid; page-break-after: avoid; margin: 0 6px 0 34px;\"><span class=\"f_NormalTableCode\">&quot;username&quot; : &quot;api&quot;,<\/span><\/p>\n\r<p class=\"p_NormalTableCode\" style=\"page-break-inside: avoid; page-break-after: avoid; margin: 0 6px 0 34px;\"><span class=\"f_NormalTableCode\">&quot;password&quot; : &quot;Admin.12345678&quot;,<\/span><\/p>\n\r<p class=\"p_NormalTableCode\" style=\"page-break-inside: avoid; page-break-after: avoid; margin: 0 6px 0 34px;\"><span class=\"f_NormalTableCode\">&quot;grant_type&quot; : &quot;password&quot;<\/span><\/p>\n\r<p class=\"p_NormalTableCode\" style=\"page-break-inside: avoid; page-break-after: avoid;\"><span class=\"f_NormalTableCode\">}<\/span><\/p>\n\r<\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r<p class=\"p_Normal\" style=\"text-indent: 0; padding-left: 20px; margin-left: 0;\"><span class=\"f_Normal\" style=\"display:inline-block;width:20px;margin-left:-20px\">5.<\/span>Odgovor vraća <span class=\"f_CodeHighlighted\">accessToken<\/span> Nakon toga možete koristiti <span class=\"f_CodeHighlighted\">accessToken<\/span> u drugim API zahtjevima kao token nositelja (<span class=\"f_CodeHighlighted\">Authorization: Bearer<\/span>). U Swagger UI, kliknite <span class=\"f_UI\">Autoriziraj<\/span> &gt; i zalijepi klik <span class=\"f_UI\">Autoriziraj<\/span>. <span class=\"f_CodeHighlighted\">accessToken<\/span> &gt; Možete izvršavati i druge pozive, a Swagger UI automatski uključuje autorizacijski token u svaki poziv.<\/p>\n\r<div style=\"text-align: left; text-indent: 0; padding: 0 0 0 0; margin: 0 0 10px 0;\"><table class=\"Table_note\" >\n\r<tr class=\"Table_note\">\n\r<td class=\"Table_note\" style=\"width:4px; background-color:#3DAAE1;\"><br \/>\n\r<\/td>\n\r<td class=\"Table_note\" style=\"width:20px;\"><p class=\"p_Normal\"><img alt=\"Napomena\" title=\"Napomena\" width=\"20\" height=\"20\" style=\"margin:2px 0 0 0;width:20px;height:20px;border:none\" src=\".\/images\/note.svg\"\/><\/p>\n\r<\/td>\n\r<td class=\"Table_note\"><p class=\"p_Normal\">Pogledajte i <a href=\"how_api_works.html#examples\" class=\"topiclink\">primjere API poziva<\/a> i <a href=\"api.html\" class=\"topiclink\">popis svih API poziva<\/a> dostupnih u ESET PROTECT On-Prem.<\/p>\n\r<\/td>\n\r<\/tr>\n\r<\/table>\n\r<\/div>\n\r"
})
