Cloud REST API _ApplicationId is optional?

According to the docs ( https://docs.moralis.io/moralis-server/cloud-code/cloud-functions#calling-via-rest-api ), the Param _ApplicationId shouldn’t be optional, but when I omit this from my GET request, the API still calls perfectly fine.

Is the App ID only required if there’s more than one app?

I would like to know exactly what to expect if I continue to omit the App ID, as well as the reason for its inclusion. Thank you :slight_smile:

can you show how you call it and any result in the console? could be something we can check out

https://{serverId}.moralis.io:2053/server/functions/{CloudEndpoint}?_ApplicationId={appId}&MyParam={integerValue}

vs

https://{serverId}.moralis.io:2053/server/functions/{CloudEndpoint}?MyParam={integerValue}

Entered directly into the browser address bar. I get the exact same data both ways, and the console has the exact same 3 lines (besides the difference in URL):

GET {url} - HTTP/2 200 OK 111ms
GET https://{serverId}.moralis.io:2053/favicon.ico - CSP
Content Security Policy: The pages settings blocked the loading of a resource at https://{serverId}.moralis.io:2053/favicon.ico ("default-src"). - resource:191:19

I take it from your response that this is unexpected behaviour?

Thank you

It works even if is not provided.

Thank you, @cryptokid, that is my observation as well. The documentation implies it should not work if it is not provided (it is not marked optional).

I would like to know:

  1. What is the purpose of providing the App ID?
  • Is it only needed for POST requests, despite the docs saying this is for GET?
  1. Could multiple apps exist on the server causing the need for identifying a specific App?

  2. Could the addition of such an app in the future cause my endpoint to become invalid without the App ID?

I think that it comes from parse server implementation. I would say that you can use it without appId if you want.

@cryptokid, thank you for your input. Can you please describe what you mean by “parse server implementation” and how that relates to using the Cloud REST API for GETs?

I am preparing documentation for my employer, so I must understand why omitting the AppId works and what the possible consequences are, otherwise I will have to just include the App ID per the official documentation, which is less appealing.

Parse server is what Moralis server uses for some of its functionality.

Do you mean like when you’re using the JavaScript API Console and you use a line like:
const query = new Parse.Query('MyClass'); ?

If Parse on the Moralis server uses the App ID “for some of its functionality”, then what functionality am I losing by not including it?

Thank you

Hi like crypto kid says you don’t have to provide it Cloud REST API _ApplicationId is optional?

It works the same without it

Moralis only deploys only 1 app per server while the parse software supports many apps per server

Thank you; you all have my sincere gratitude. I will omit the ApplicationId with confidence.

If the ApplicationId is completely optional and offers no benefit, I would like to suggest that it be marked as optional or omitted from Moralis documentation for the Cloud REST API. Without the App ID, the URLs are easier to visually understand and share within teams.

Just in case this comes up again in the future, I will refer to this forum thread in my team’s documentation.

Thank you for the fast and friendly responses.