parameter required with getMObjects | Community
Skip to main content
July 14, 2013
Solved

parameter required with getMObjects

  • July 14, 2013
  • 4 replies
  • 1126 views
We are noticing that we are getting an internal error response when calling getMObjects on the API.  When we only specify the type attribute (e.g. to Opportunity) on ParamsGetMObjects, we receive a response that says "Parameter required" - but according to the schema and the docs it's optional. When we set the ID field, it works, but we don't want to retrieve a specific object - we want a list of objects.

Any ideas?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by
Try using a name/value comparison that would result in all opportunities (i.e. Name does not equal 'XXXX')

4 replies

July 15, 2013
GetMObjects is used to return specific MObject records.  You can retrieve specific records by specifying the MObject Type and the following optional params (MObject ID, ExternalKey, Criterial List).
July 15, 2013
Right, so I'm trying to essentially query all the objects (e.g. all opportunities). 

Documentation says this:

Retrieves one or more MObjects using a combination of criteria consisting of:
Zero or one unique ID, either the Marketo ID or external ID
Zero or more attribute filters as name/value/comparison trios
Zero or more associated object filters as object name/ID pairs
 
Which I take to mean that all the parmaeters EXCEPT for Type are optional. Is this not the case? I've also tried specifying a single attribute filter, but I still get parameter required message.

Accepted solution
July 15, 2013
Try using a name/value comparison that would result in all opportunities (i.e. Name does not equal 'XXXX')
July 15, 2013
Thank you, that worked. Can you please fix your documentation or API?