Skip to main content
1-Visitor
June 4, 2014
Solved

Search All Items in MKS from CLI

  • June 4, 2014
  • 2 replies
  • 6748 views

I want to search all the items in MKS for a particular condition from command line interface. But, I'm not getting any such option. MKS CLI offers a command to view multiple items ("im issues") but it is asking for item id. I'm not sure how this command would return multiple items details as one item id can return only one item details.

I can search all the items without knowing the item id or run a query based on a condition using explorer GUI. So, just wondering why similar staff is not there in CLI. Please suggest if this can be achieved using CLI.

--------------------------------------

Best Regards

Sourav Das

    Best answer by KaelLizak

    Hello Sourav,

    You may want to take a look at the Integrity CLI Reference for Workflows and Documents (10.5 version). im issues has two options that would likely be helpful to you: --query and --queryDefinition.

    --query lets you specify the name of a pre-existing query: either an admin provided one, or, if you have access to it, one that belongs to a user.

    --queryDefinition is a little more powerful, but more arcane, in that it lets you actually construct a query on the command line. This is powerful, but takes some practice to get the hang of. This one should provide you the functionality you are looking for regarding string searches.

    Regards,
    Kael

    2 replies

    KaelLizak16-PearlAnswer
    16-Pearl
    June 6, 2014

    Hello Sourav,

    You may want to take a look at the Integrity CLI Reference for Workflows and Documents (10.5 version). im issues has two options that would likely be helpful to you: --query and --queryDefinition.

    --query lets you specify the name of a pre-existing query: either an admin provided one, or, if you have access to it, one that belongs to a user.

    --queryDefinition is a little more powerful, but more arcane, in that it lets you actually construct a query on the command line. This is powerful, but takes some practice to get the hang of. This one should provide you the functionality you are looking for regarding string searches.

    Regards,
    Kael

    1-Visitor
    June 6, 2014

    The sample commands are:

    im issues --queryDefinition=(((field[Summary]contains"Hello")or(field[Assigned Group]="everyone"))and(attachment.exists))

    im issues --query=APIUser:GetQMGR

    1-Visitor
    July 30, 2018

    Hello,

     

    Can you please help me, how to get a query name from all the queries list, if i know only a part of query.