0

I want to reset the origin of a StreamSets pipeline, using another pipeline. I made a pipeline that sends 1 useless record to HTTP client component. The HTTP client contains the RESTFUL URL to reset the origin of a pipeline. It's something like that:

Resource URL: http://<hostname>:<port>/rest/v1/pipeline/StreamSetsPipelinec78f8739-8adb-47ad-beaa-77b3de60038d/resetOffset

HTTP method is POST

I tested it and it doesn't reset the origin.

Can anyone help me?

Matrix
  • 1,810
  • 1
  • 19
  • 20

3 Answers3

1
  • Have you tried using curl to test it first? For example, assuming you're targeting SDC (not SCH), something like this should work: curl -u admin:admin -X POST http://10.0.0.199:18630/rest/v1/pipeline/SDCHTTPClientd8bc16bc-4b4a-49cd-ba4c-41d7831ff5bd/resetOffset -H "X-Requested-By: SDC"
  • From HTTP Client, what do you have set for auth type and are you passing the right credentials?
  • Are you passing header attribute X-Requested-By?
  • In any case, are you getting any errors?
  • Note that this REST API endpoint does not return response body... just response code 200
Dash
  • 130
  • 3
0

Did you test the API URL standalone to see if it work?

Khanh Tran
  • 37
  • 5
0

Using a curl request in the terminal, I used to do the following (It's exactly same as Dash Desai mentioned)

curl -u ${SSUser}:${SSPW} -X POST http://${SSHost}:${SSPort}/rest/v1/pipeline/${SSPipeID}/resetOffset -H "X-Requested-By:sdc"

But now, I want to make a pipeline that does the same job.

I managed to create it now. The issue I had was that I didn't set the auth type or give credentials. I also didn't pass the X-Requested-By header attribute. I wasn't getting any errors though. (Exactly same as Dash Desai suggested)

Below are the configurations that I have now:

enter image description here

Thanks to everyone who tried to help ^^

Matrix
  • 1,810
  • 1
  • 19
  • 20