1

I'm trying to query vidispine for jobs for a set of items. The problem is that the itemId is held in job's metadata. Filtering over job's metadata is possible, but I cannot find a documentation regarding some more advanced filters criteria, their syntax.

But first things first:

I can request jobs for a single itemId

http://<vidispinehost>/API/job?jobmetadata=itemId%3dVX-XXXX

The problem lies in lack of documentation of what jobmetadata parameter accepts. It needs to be a encoded URL, that's why we have %3d instead of =.

The problem is - how to request jobs for multiple items at once?

What I tried so far:

  • itemId=[VX-XXXX,VX-YYYY]

(http://<vidispinehost>/API/job?jobmetadata=itemId%3D%5BVX-XXXX%2CVX-XXXX%5D)

  • itemId=[VX-XXXX;VX-YYYY]

(http://<vidispinehost>/API/job?jobmetadata=itemId%3D%5BVX-XXXX%3BVX-YYYY%5D)

  • itemId=VX-XXXX,VX-YYYY
  • itemId=VX-XXXX;VX-YYYY
  • itemId=VX-XXXX|VX-YYYY
  • itemId={VX-XXXX,VX-YYYY}
  • itemId={VX-XXXX;VX-YYYY}

But it seems vidispine treats it as an exact string.

My question is: Is it possible to query vidispine for jobs for multiple itemIds at once? If yes - how can I do it? A link to some documentation regarding jobmetadata filters criteria would be great.

1
  • 1
    I cannot create new tag vidispine. If there is some user with more then 1500 reputation who would be so kind to create it - I would be very grateful. So I can add it to my question.
    – tiriana
    Apr 1, 2016 at 8:52

1 Answer 1

1

Vidispine's approach to this is poorly documented but the correct way of querying multiple values for the same key is to provide the key several times with different values.

As per your example, searching jobs for multiple different jobmetadatum would be done as such:

http://<vidispinehost>/API/job?jobmetadata=itemId%3D%5BVX-XXX1&jobmetadata=itemId%3D%5BVX-XXX2

This idiom is used many places in Vidispine's API. The WADL is the best place to see all the places where style="query" type="xs:string" repeating="true" is present, representing a query parameter that can be repeated (262 at the time of this writing).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.