RI M22 - Core Services - Register and Notification
Hello,
I'm trying to do the task Register and Notification for pre-shipping and I did not found any collection to use at RI folder. So I used the collection provided by GC and I have a question if I'm using the right pushEndpoint and where I can get this pushEndpoint to create a subscription. About the Notification, there is any documentation showing how to do it? Here is What I did:
- Collection: Denis-EPAM-Registration_API_CI-CD_v1.0_subscription.postman_collection.json
- Environment: OSDU_R3_RI_Pre-ship.postman_environment.json
1. Create Test Subscription
POST https://{{HOSTNAME}}/api/register/v1/subscription
BODY CURL VERSION
curl --location 'https://osdu.bm22.gcp.gnrg-osdu.projects.epam.com/api/register/v1/subscription' \
--header 'data-partition-id: osdu' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <Token>' \
--data '{
"name": "test-subscription",
"description": "test description",
"topic": "records-changed",
"pushEndpoint": "https://preship.gcp.gnrg-osdu.projects.epam.com/api/register/v1/test-gc/challenge/test_subscription_2",
"secret": {
"secretType": "HMAC",
"value": "7a786376626e"
}
}'
BODY
{
"name": "test-subscription",
"description": "test description",
"topic": "records-changed",
"pushEndpoint": "https://preship.gcp.gnrg-osdu.projects.epam.com/api/register/v1/test-gc/challenge/test_subscription_2",
"secret": {
"secretType": "HMAC",
"value": "7a786376626e"
}
}
RESPONSE
{
"id": "cmVjb3Jkcy1jaGFuZ2VkaHR0cHM6Ly9wcmVzaGlwLmdjcC5nbnJnLW9zZHUucHJvamVjdHMuZXBhbS5jb20vYXBpL3JlZ2lzdGVyL3YxL3Rlc3QtZ2MvY2hhbGxlbmdlL3Rlc3Rfc3Vic2NyaXB0aW9uXzI=",
"name": "test-subscription",
"description": "test description",
"topic": "records-changed",
"pushEndpoint": "https://preship.gcp.gnrg-osdu.projects.epam.com/api/register/v1/test-gc/challenge/test_subscription_2",
"createdBy": "osdu-tester@service.local",
"notificationId": "de-b1f08167-5bb3-47f8-a6ed-0b6edab61d23",
"secret": {
"secretType": "HMAC",
"value": "7a786376626e"
}
}
Regards,
Juliana