Subscribe on a custom API?

northyen
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!
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!
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions