I am trying to make a call from my CMS React project to a serverless endpoint. The same code is a relative URL which fails during testing.
Here’s my serverless.json
{
"appFunctions": {
"loadItem": {
"file": "out/loadItem.js",
"endpoint": {
"path": "loadItem",
"method": ["GET"]
}
}
}
}
I see two different url schemas in docs:
`//{domainName}/_hcms/api/loadItem`
and
`/hs/serverless/loadItem`
I am not sure what “domainName” is - this is a demo account. If I do ‘hubspot.com’ then the respone says “The endpoint GET loadItem has not been configured for portal”
If I try the second one with “hubspot.com” it yields
context: { PATH: [ ‘loadItem’ ], METHOD: [ ‘GET’ ] },
category: ‘OBJECT_NOT_FOUND’,
subCategory: ‘ServerlessGatewayErrorType.GATEWAY_NOT_FOUND’
Any idea what correct absolute endpoint is?