<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question How to GET Get Service Definition APIs in HDP 2.5.0 in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-GET-Get-Service-Definition-APIs-in-HDP-2-5-0/m-p/218528#M180429</link>
    <description>&lt;P&gt;In HDP 2.5.0 we can get policy and repository through REST API, But we can't get "servicedef"&lt;/P&gt;&lt;P&gt;In HDP doc only Repository API and Policy API is mentioned. So we can't Get Service Definition in HDP 2.5.0 ?&lt;/P&gt;&lt;H3&gt;&lt;A href="https://cwiki.apache.org/confluence/display/RANGER/Apache+Ranger+0.6+-+REST+APIs+for+Service+Definition%2C+Service+and+Policy+Management#ApacheRanger0.6-RESTAPIsforServiceDefinition,ServiceandPolicyManagement-GetServiceDefinitionbyid"&gt;Apache Ranger Public REST API&lt;BR /&gt;&lt;BR /&gt;&lt;/A&gt;&lt;/H3&gt;&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://cwiki.apache.org/confluence/display/RANGER/Apache+Ranger+0.6+-+REST+APIs+for+Service+Definition%2C+Service+and+Policy+Management#ApacheRanger0.6-RESTAPIsforServiceDefinition,ServiceandPolicyManagement-GetServiceDefinitionbyid"&gt;Get Service Definition by id&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt; :high_voltage:&lt;/img&gt; root@pravin1  /tmp  curl -u admin:admin -X GET &lt;A href="http://172.26.74.244:6080/service/public/v2/api/servicedef/1" target="_blank"&gt;http://172.26.74.244:6080/service/public/v2/api/servicedef/1&lt;/A&gt;  -v
* About to connect() to 172.26.74.244 port 6080 (#0)
*   Trying 172.26.74.244... connected
* Connected to 172.26.74.244 (172.26.74.244) port 6080 (#0)
* Server auth using Basic with user 'admin'
&amp;gt; GET /service/public/v2/api/servicedef/1  HTTP/1.1
&amp;gt; Authorization: Basic YWRtaW46YWRtaW4=
&amp;gt; User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.21 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
&amp;gt; Host: 172.26.74.244:6080
&amp;gt; Accept: */*
&amp;gt;
&amp;lt; HTTP/1.1 404 Not Found
&amp;lt; Server: Apache-Coyote/1.1
&amp;lt; Set-Cookie: RANGERADMINSESSIONID=208A7798C5A8B7D23D1C030D2C42E35C; Path=/; HttpOnly
&amp;lt; X-Frame-Options: DENY
&amp;lt; Content-Length: 0
&amp;lt; Date: Tue, 15 Aug 2017 07:19:59 GMT
&amp;lt;
* Connection #0 to host 172.26.74.244 left intact
* Closing connection #0
&lt;/PRE&gt;&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://cwiki.apache.org/confluence/display/RANGER/Apache+Ranger+0.6+-+REST+APIs+for+Service+Definition%2C+Service+and+Policy+Management#ApacheRanger0.6-RESTAPIsforServiceDefinition,ServiceandPolicyManagement-GetPolicybyid"&gt;Get Policy by id&lt;BR /&gt;&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt; :high_voltage:&lt;/img&gt; root@pravin1  /tmp  curl -u admin:admin -X GET &lt;A href="http://172.26.74.244:6080/service/public/v2/api/policy/1" target="_blank"&gt;http://172.26.74.244:6080/service/public/v2/api/policy/1&lt;/A&gt; -v
* About to connect() to 172.26.74.244 port 6080 (#0)
*   Trying 172.26.74.244... connected
* Connected to 172.26.74.244 (172.26.74.244) port 6080 (#0)
* Server auth using Basic with user 'admin'
&amp;gt; GET /service/public/v2/api/policy/1 HTTP/1.1
&amp;gt; Authorization: Basic YWRtaW46YWRtaW4=
&amp;gt; User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.21 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
&amp;gt; Host: 172.26.74.244:6080
&amp;gt; Accept: */*
&amp;gt;
&amp;lt; HTTP/1.1 200 OK
&amp;lt; Server: Apache-Coyote/1.1
&amp;lt; Set-Cookie: RANGERADMINSESSIONID=6AE0364F2B3BF923582E7601060D3A32; Path=/; HttpOnly
&amp;lt; X-Frame-Options: DENY
&amp;lt; Content-Type: application/json
&amp;lt; Transfer-Encoding: chunked
&amp;lt; Date: Tue, 15 Aug 2017 07:22:14 GMT
&amp;lt;
* Connection #0 to host 172.26.74.244 left intact
* Closing connection #0
{"id":1,"guid":"7dac9130-27f5-4fd2-a220-035f9f24bb82","isEnabled":true,"createdBy":"amb_ranger_admin","updatedBy":"Admin","createTime":1473764145000,"updateTime":1496908302000,"version":2,"service":"Sandbox_hadoop","name":"c1_bne_hadoop-1-20170427003530","policyType":0,"description":"Default Policy for Service: c1_bne_hadoop","resourceSignature":"6f956063401eda656f1eae8870c1afac","isAuditEnabled":true,"resources":{"path":{"values":["/*"],"isExcludes":false,"isRecursive":true}},"policyItems":[{"accesses":[{"type":"read","isAllowed":true},{"type":"write","isAllowed":true},{"type":"execute","isAllowed":true}],"users":["ambari-qa","testuser"],"groups":["testgroup"],"conditions":[],"delegateAdmin":true}],"denyPolicyItems":[],"allowExceptions":[],"denyExceptions":[],"dataMaskPolicyItems":[],"rowFilterPolicyItems":[]}#
&lt;/PRE&gt;</description>
    <pubDate>Tue, 15 Aug 2017 14:23:22 GMT</pubDate>
    <dc:creator>pbhagade</dc:creator>
    <dc:date>2017-08-15T14:23:22Z</dc:date>
    <item>
      <title>How to GET Get Service Definition APIs in HDP 2.5.0</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-GET-Get-Service-Definition-APIs-in-HDP-2-5-0/m-p/218528#M180429</link>
      <description>&lt;P&gt;In HDP 2.5.0 we can get policy and repository through REST API, But we can't get "servicedef"&lt;/P&gt;&lt;P&gt;In HDP doc only Repository API and Policy API is mentioned. So we can't Get Service Definition in HDP 2.5.0 ?&lt;/P&gt;&lt;H3&gt;&lt;A href="https://cwiki.apache.org/confluence/display/RANGER/Apache+Ranger+0.6+-+REST+APIs+for+Service+Definition%2C+Service+and+Policy+Management#ApacheRanger0.6-RESTAPIsforServiceDefinition,ServiceandPolicyManagement-GetServiceDefinitionbyid"&gt;Apache Ranger Public REST API&lt;BR /&gt;&lt;BR /&gt;&lt;/A&gt;&lt;/H3&gt;&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://cwiki.apache.org/confluence/display/RANGER/Apache+Ranger+0.6+-+REST+APIs+for+Service+Definition%2C+Service+and+Policy+Management#ApacheRanger0.6-RESTAPIsforServiceDefinition,ServiceandPolicyManagement-GetServiceDefinitionbyid"&gt;Get Service Definition by id&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt; :high_voltage:&lt;/img&gt; root@pravin1  /tmp  curl -u admin:admin -X GET &lt;A href="http://172.26.74.244:6080/service/public/v2/api/servicedef/1" target="_blank"&gt;http://172.26.74.244:6080/service/public/v2/api/servicedef/1&lt;/A&gt;  -v
* About to connect() to 172.26.74.244 port 6080 (#0)
*   Trying 172.26.74.244... connected
* Connected to 172.26.74.244 (172.26.74.244) port 6080 (#0)
* Server auth using Basic with user 'admin'
&amp;gt; GET /service/public/v2/api/servicedef/1  HTTP/1.1
&amp;gt; Authorization: Basic YWRtaW46YWRtaW4=
&amp;gt; User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.21 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
&amp;gt; Host: 172.26.74.244:6080
&amp;gt; Accept: */*
&amp;gt;
&amp;lt; HTTP/1.1 404 Not Found
&amp;lt; Server: Apache-Coyote/1.1
&amp;lt; Set-Cookie: RANGERADMINSESSIONID=208A7798C5A8B7D23D1C030D2C42E35C; Path=/; HttpOnly
&amp;lt; X-Frame-Options: DENY
&amp;lt; Content-Length: 0
&amp;lt; Date: Tue, 15 Aug 2017 07:19:59 GMT
&amp;lt;
* Connection #0 to host 172.26.74.244 left intact
* Closing connection #0
&lt;/PRE&gt;&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://cwiki.apache.org/confluence/display/RANGER/Apache+Ranger+0.6+-+REST+APIs+for+Service+Definition%2C+Service+and+Policy+Management#ApacheRanger0.6-RESTAPIsforServiceDefinition,ServiceandPolicyManagement-GetPolicybyid"&gt;Get Policy by id&lt;BR /&gt;&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt; :high_voltage:&lt;/img&gt; root@pravin1  /tmp  curl -u admin:admin -X GET &lt;A href="http://172.26.74.244:6080/service/public/v2/api/policy/1" target="_blank"&gt;http://172.26.74.244:6080/service/public/v2/api/policy/1&lt;/A&gt; -v
* About to connect() to 172.26.74.244 port 6080 (#0)
*   Trying 172.26.74.244... connected
* Connected to 172.26.74.244 (172.26.74.244) port 6080 (#0)
* Server auth using Basic with user 'admin'
&amp;gt; GET /service/public/v2/api/policy/1 HTTP/1.1
&amp;gt; Authorization: Basic YWRtaW46YWRtaW4=
&amp;gt; User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.21 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
&amp;gt; Host: 172.26.74.244:6080
&amp;gt; Accept: */*
&amp;gt;
&amp;lt; HTTP/1.1 200 OK
&amp;lt; Server: Apache-Coyote/1.1
&amp;lt; Set-Cookie: RANGERADMINSESSIONID=6AE0364F2B3BF923582E7601060D3A32; Path=/; HttpOnly
&amp;lt; X-Frame-Options: DENY
&amp;lt; Content-Type: application/json
&amp;lt; Transfer-Encoding: chunked
&amp;lt; Date: Tue, 15 Aug 2017 07:22:14 GMT
&amp;lt;
* Connection #0 to host 172.26.74.244 left intact
* Closing connection #0
{"id":1,"guid":"7dac9130-27f5-4fd2-a220-035f9f24bb82","isEnabled":true,"createdBy":"amb_ranger_admin","updatedBy":"Admin","createTime":1473764145000,"updateTime":1496908302000,"version":2,"service":"Sandbox_hadoop","name":"c1_bne_hadoop-1-20170427003530","policyType":0,"description":"Default Policy for Service: c1_bne_hadoop","resourceSignature":"6f956063401eda656f1eae8870c1afac","isAuditEnabled":true,"resources":{"path":{"values":["/*"],"isExcludes":false,"isRecursive":true}},"policyItems":[{"accesses":[{"type":"read","isAllowed":true},{"type":"write","isAllowed":true},{"type":"execute","isAllowed":true}],"users":["ambari-qa","testuser"],"groups":["testgroup"],"conditions":[],"delegateAdmin":true}],"denyPolicyItems":[],"allowExceptions":[],"denyExceptions":[],"dataMaskPolicyItems":[],"rowFilterPolicyItems":[]}#
&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Aug 2017 14:23:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-GET-Get-Service-Definition-APIs-in-HDP-2-5-0/m-p/218528#M180429</guid>
      <dc:creator>pbhagade</dc:creator>
      <dc:date>2017-08-15T14:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to GET Get Service Definition APIs in HDP 2.5.0</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-GET-Get-Service-Definition-APIs-in-HDP-2-5-0/m-p/218529#M180430</link>
      <description>&lt;P&gt;It seems to work from my Mac...&lt;/P&gt;&lt;PRE&gt;hw11970:~ hosako$ curl -u admin:admin -X GET &lt;A href="http://sandbox.hortonworks.com:6080/service/public/v2/api/servicedef/1" target="_blank"&gt;http://sandbox.hortonworks.com:6080/service/public/v2/api/servicedef/1&lt;/A&gt;
{"id":1,"guid":"0d047247-bafe-4cf8-8e9b-d5d377284b2d","isEnabled":true,"createTime":1473763848000,"updateTime":1473763848000,"version":1,"name":"hdfs","implClass":"org.apache.ranger.services.hdfs.RangerServiceHdfs","label":"HDFS...
&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Aug 2017 15:15:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-GET-Get-Service-Definition-APIs-in-HDP-2-5-0/m-p/218529#M180430</guid>
      <dc:creator>hosako</dc:creator>
      <dc:date>2017-08-15T15:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to GET Get Service Definition APIs in HDP 2.5.0</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-GET-Get-Service-Definition-APIs-in-HDP-2-5-0/m-p/218530#M180431</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/206/hosako.html" nodeid="206"&gt;@Hajime&lt;/A&gt; Thanks , It worked for me. Some kind typo in copy paste.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Aug 2017 15:30:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-GET-Get-Service-Definition-APIs-in-HDP-2-5-0/m-p/218530#M180431</guid>
      <dc:creator>pbhagade</dc:creator>
      <dc:date>2017-08-15T15:30:15Z</dc:date>
    </item>
  </channel>
</rss>

