Ask Your Question

Syntax for REST API to reset origin

asked 2019-03-31 12:06:13 -0600

brawal gravatar image

updated 2019-04-01 10:40:32 -0600

metadaddy gravatar image

i am able to reset origin for pipeline using streamsets CLI but i want to achieve the same using rest api.

Could you please help with the syntax for rest api to reset origin ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-04-01 10:40:07 -0600

metadaddy gravatar image
curl -i -u username:password -X POST http://localhost:18630/rest/v1/pipeline/<pipelineId>/resetOffset -H "X-Requested-By:sdc"

The -i option gives you the status code etc rather than just an empty response:

HTTP/1.1 200 OK
Date: Mon, 01 Apr 2019 15:37:48 GMT
Set-Cookie: JSESSIONID_18630=node01p0zooisdbb1696kmvinvrant13.node0;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: JSESSIONID_18630=node0dmpzsr6s6aehx2qn68zs6mcs14.node0;Path=/
X-Frame-Options: DENY
Content-Length: 0
Server: Jetty(9.4.12.v20180830)

You can find all the REST APIs by going to Help/RESTful API in the Data Collector UI.

edit flag offensive delete link more



Thanks for help worked

brawal gravatar imagebrawal ( 2019-04-02 07:27:04 -0600 )edit

@metadaddy, per comment that "The -i option gives you the status code"... I am calling the resetOffset API from a HTTP Client processor (not CURL). How do I get the status code using this method? As it is, I am getting error back "HTTP_34 - Received no entity in the HTTP message body"

TxRyan gravatar imageTxRyan ( 2019-05-15 10:37:56 -0600 )edit

As discussed on Slack... Unfortunately, the API returns 200 with no content, but the HTTP Client throws an error, because it expects response content for anything except 204. I'll create Jiras to fix both of these.

metadaddy gravatar imagemetadaddy ( 2019-05-15 22:26:10 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-03-31 12:06:13 -0600

Seen: 402 times

Last updated: Apr 01 '19