API Issues: /api/v1/script/{id}/job

Hey all,

I’m still doing a little bit of learning here, so sorry if this is a low level question, but i was hoping for some help figuring out the best way to pull a list of jobs run for a particular script

In this case I most definitely have a bunch of jobs run from this script

I’m still working my way around the API’s that are included, and I’ve been working with ‘/api/v1/script/{id}/job’ on swagger. I know i’m leaving a lot of options empty, but i cant seem to come up with any restults for this script ID. Can anyone help me out?

In this example i only specified my job ID (as it’s the only required field) and didn’t get a list of my jobs

I can use the /scripts/{ID} call to verify the script ID is right, but i just cant get the jobs to return via the script ID

Any ideas?

Product: PowerShell Universal
Version: 2.10.2
``

Going down the rabbit hole a little further on this, i was looking at the Get-PSUJob commandlet and figured I could pull job runs by Identity, but i’m getting JSON deserialization errors when trying to look up the identity. However, I DO get a successful results in swagger

(I also tried including my app token on the calls and still got the same error)

Adding on some extra details here as well in case it might be related.

When I run the Invoke-PSUScript, it tries returning the job associated with that script invocation. However i’m receiving a 404. But if I throw that URL in my browser, it shows me my expected results just fine. Just cant get it to run from the CLI


Ideally if i could get that job correctly returned to me right after I do my Invoke-PSUSCript , that would fix everything.