Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Add queryParams to MediaServices\MediaServicesRestProxy::getJobList #990

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smileexx
Copy link

queryParams gives you a possibility to make search request of Jobs with filters like $skip/$top/$filter.
It's useful when you have more then 1000 jobs.

Short example:

function viewJobs( int $offset = 0, int $limit = 1000, string $filter = '' ) {
        $params = [];
        if( $offset ) {
            $params[ '$skip' ] = $offset;
        }
        if( $limit ) {
            $params[ '$top' ] = $limit;
        } else {
            $params[ '$top' ] = 1000;
        }
        if( $filter ) {
            $params[ '$filter' ] = $filter;
        }
        $listIterator = $this->restProxy->getJobList( $params );
}

viewJobs( 1000, 0, "(false or (cast(State,'Edm.Int32') eq 0) or (cast(State,'Edm.Int32') eq 2) )" );

More about Jobs in official Docs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant