Get Jobs By ProcessName/PackageName Returning BAD Request Error

I keep getting a ‘Bad Request’ Error when trying to use GetJobs Activity and using filter with either ‘ProcessName’ or ‘PackageName’.

Using no filter returns results and using “State eq ‘Successful’” also works.

Query example I’m trying to use “PackageName eq ‘ExampleProcess’” or “ProcessName eq ‘ExampleProcess’”

See Screenshot for error.

I have checked case and spelling and everything is correct. I’ve even returned the processes with no filter and can see the ones I need in the data.

@scottn

  1. If I make the call from the Get Jobs activity it fails with the same error that yours did.

  2. If I use an HTTP Request activity I get an Error 1101 which I solved using the fix here which says to add an organization unit header. Once the header is added the call is made just fine.
    image

  3. If I make the call from Postman it works fine without the Organization Unit header.

I’d recommend going route 2 for now, authenticate and make the API call through HTTP Request activities and I think it will work for you.

1 Like

Hi.
@scottn and @DanielMitchell

I think you are using the wrong words for ProcessName. Try something like this, which is from some of my code I used to find all jobs that are already running:

Release/Name is actually the process name that was provisioned (ie with the environment with it).

I hope this helps.

Regards.

2 Likes

Thanks - Yes this is the bit that was going wrong. Finding documentation on this subject is few and far between.

I ended up going with something like this passing variables in “contains(Release/Name,%27”+pProcessName+“%27) and State eq '”+pState+“'”

1 Like

@ClaytonM
I’m aware of that. This call doesn’t work unless I add the organization unit header to my call.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.