Ask Your Question

Grab Token Via Curl

asked 2019-06-14 06:08:23 -0600

anonymous user


I'm trying to the following in StreamSets via API via curl:

  1. Submit an API request to log in as a specific user
  2. Take the token from the results and store it as a cookie

What is the specific url that I should use in step 1 to authenticate as a user?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-06-14 17:25:02 -0600

iamontheinet gravatar image


To login and generate auth token for a specific StreamSets Control Hub (SCH) user, send POST request to /security/public-rest/v1/authentication/login endpoint.

For example, curl -s -X POST -d '{"userName":"admin@username", "password": "password"}' https://SCH_DOMAIN_GOES_HERE/security/public-rest/v1/authentication/login -H "Content-Type:application/json" -H "X-Requested-By:SDC" -c cookie.txt will authenticate and store the returned response cookie (which includes the auth token) in cookie.txt file.

Hope this helps.

Cheers, Dash

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-06-14 06:08:23 -0600

Seen: 381 times

Last updated: Jun 14 '19