Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

service check VIA REST API

Solved Go to solution
Highlighted

service check VIA REST API

we create the follwing payload file and run the API in order to run the service check on HDFS

but we got < HTTP/1.1 404 Not Found

what is wrong with my syntax ?

 more payload
{
   "RequestInfo":{
      "context":"HDFS Service Check",
      "command":"HDFS_SERVICE_CHECK"
   },
   "Requests/resource_filters":[
      {
         "service_name":"HDFS"
      }
   ]
}
[root@master02 ]# curl -ivk -H "X-Requested-By: ambari" -u admin:admin -X POST -d @payload http://master02.sys56.com:8080/api/v1/clusters/hdp/request
* About to connect() to master02.sys56.com port 8080 (#0)
*   Trying 92.12.3.62...
* Connected to master02.sys56.com (92.12.3.62) port 8080 (#0)
* Server auth using Basic with user 'admin'
> POST /api/v1/clusters/hdp/request HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.29.0
> Host: master02.sys56.com:8080
> Accept: */*
> X-Requested-By: ambari
> Content-Length: 178
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 178 out of 178 bytes
< HTTP/1.1 404 Not Found
HTTP/1.1 404 Not Found
< X-Frame-Options: DENY
X-Frame-Options: DENY
< X-XSS-Protection: 1; mode=block
X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
X-Content-Type-Options: nosniff
< Cache-Control: no-store
Cache-Control: no-store
< Pragma: no-cache
Pragma: no-cache
< Set-Cookie: AMBARISESSIONID=1w7c5v5ol3u4j1hgmxubwxu19r;Path=/;HttpOnly
Set-Cookie: AMBARISESSIONID=1w7c5v5ol3u4j1hgmxubwxu19r;Path=/;HttpOnly
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
< User: admin
User: admin
< Content-Length: 0
Content-Length: 0
<
* Connection #0 to host master02.sys56.com left intact
Michael-Bronson
1 ACCEPTED SOLUTION

Accepted Solutions

Re: service check VIA REST API

@Michael Bronson,

url should be "http://master02.sys56.com:8080/api/v1/clusters/hdp/requests" not "http://master02.sys56.com:8080/api/v1/clusters/hdp/request".

's' is missing in requests.

Thanks,

Aditya

1 REPLY 1

Re: service check VIA REST API

@Michael Bronson,

url should be "http://master02.sys56.com:8080/api/v1/clusters/hdp/requests" not "http://master02.sys56.com:8080/api/v1/clusters/hdp/request".

's' is missing in requests.

Thanks,

Aditya

Don't have an account?
Coming from Hortonworks? Activate your account here