REST service: optional search parameters

REST service: optional search parameters

  
I'm implementing a connector to the Microsoft Graph REST API, and one of the methods I'm implementing is the GET users. The service doesn't return all users at once, but specifies a "skip token" to use in subsequent calls, which is to be specified as a search parameter.

t's not possible to use an empty skip token, or an error message comes your way ("Specified $skiptoken is invalid."). What I ideally need is a way for the Platform to specify a parameter optionally, based on whether or not is supplied. I currently have solved this by duplicating the method call, one time with, and one time without the parameter, but this is rather clunky.

So the question is: is there a way to optionally specify a search parameter?



Solution

Hi Killian,


You you are describing feels like the normal behavior for non-mandatory parameters.

When you have an input with "Is Mandatory" = No  and "Send Default Value" = No,   the input will not even be added to the url of the request.


Regards,
João Rosado

Solution
Hi João,

You are right, thanks. I must've somehow set the parameter to mandatory when testing. It works now.

Kilian Hekhuis wrote:

Hi João,

You are right, thanks. I must've somehow set the parameter to mandatory when testing. It works now.

Kilian, I am attempting my first MS Graph integration and having a hard time getting it connected. Is there a sample MS Graph integration with OutSystems out there? Any advice to offer? 


Thanks!


Hi Bruce,

I think I can help you, but I don't think this thread is the right place (as it's only incidently about MS Graph). I'll PM you for details.