1.17. Ingestion API flow changes
Closed this issue · 0 comments
For every create ingestion API call, we need to update the user permissions.
STEP:1 Get the list of permissions of the user
Example
curl --location --request GET 'http://localhost:15672/api/users/2563e6d4-5884-40e8-9d9f-e84ee956298b/permissions'
--header 'Authorization: Basic Z3Vlc3Q6Z3Vlc3Q='
--data-raw ''
Response
[
{
"user": "2563e6d4-5884-40e8-9d9f-e84ee956298b",
"vhost": "IUDX",
"configure": "",
"write": "iisc.ac.in/89a36273d77dac4cf38114fca1bbe64392547f86/rs.iudx.io/surat-itms-realtime-information",
"read": ""
}
]
Take the “write” attribute value. Add a “|” followed by the entities obtained in the request and proceed to the next step. Make sure to keep the read and configure permissions as is.
STEP:2 Update the permissions
Example
curl --location --request PUT 'http://localhost:15672/api/permissions/IUDX/2563e6d4-5884-40e8-9d9f-e84ee956298b'
--header 'Authorization: Basic Z3Vlc3Q6Z3Vlc3Q='
--header 'Content-Type: application/json'
--data-raw '{
"configure":"",
"write": "iisc.ac.in/89a36273d77dac4cf38114fca1bbe64392547f86/rs.iudx.io/surat-itms-realtime-information|iisc.ac.in/89a36273d77dac4cf38114fca1bbe64392547f86/rs.iudx.io/pune-env-flood",
"read": ""
}'