Options

Subscribe on a custom API?

northyennorthyen Member Posts: 14
Hello!

I'm trying to subsribe on a custom API that was created for the customer, but I can't get it to work for some reason.

For subscribing on a resource I post to this URL

https://{{baseurl}}/v2.0/{{tenant}}/{{environment}}/api/v2.0/subscriptions

with the body

{
"notificationUrl": "https://prod-25.northeurope.logic.azure.com:443/workflows/c90aae834eaa497d980f437b4a26ba7b/triggers/manual/paths/invoke?api-version=2016-10-01&sp=/triggers/manual/run&sv=1.0&sig=NP2AmcoZ0n2UBuMSvHxPCU_VsVBA29gRj_RlXd3nTP0",
"resource": "https://api.businesscentral.dynamics.com/v2.0/CustomerTenantHere/sandbox/api/nbzapi/nbzapi/v1.0/companies(671454cd-be0b-ec11-86bc-000d3ab9e5be)/valuemappings",
"clientState": "SuperSecretValue123!"
}

when I try to subscribe it returns:

{
"error": {
"code": "BadRequest_NotFound",
"message": "Resource not found for the segment 'CustomerTenantHere'. CorrelationId: dcf17806-f11b-41d7-8890-42881b0f8c45."
}
}

But the resource URL does work. I can easily do a GET on the custom API URL.

The problem is probably because I'm missing some steps here, but I can't seem to figure out what, as the examples I've found on the internet, are all related to standard API. And I can easily get that to work as well. But this is a custom API page.

Any ideas? Thanks!
Sign In or Register to comment.