How to get last two days baseline information from SDL using baseline2.5?

Hi,

 

I am trying to get all baseline information from SDL. Below is the portion my API call

 

string authContext = this.authContext;

string requestedMeta = "", filterMeta = "", receivedMeta = "";

 

requestedMeta =

"<ishfields>" +

"<ishfield name=\"FISHBASELINEACTIVE\" level=\"none\"/>" +

"<ishfield name=\"FISHLABELRELEASED\" level=\"none\"/>" +

"<ishfield name=\"FISHDOCUMENTRELEASE\" level=\"none\"/>" +

"</ishfields>";

InfoShareBaseline25.BaseLine25 baseObj = new InfoShareBaseline25.BaseLine25();

baseObj.Url = endpoint + "/Baseline25.asmx";

baseObj.GetList(ref authContext, filterMeta, requestedMeta, ref receivedMeta);

 

I am getting response with all the baseline information details in SDL. My question is how to get the response with last 2 days baseline IDs? Is there any way add date filter in the API call?

 

Thanks

Roopesh

Parents
  • May I first of all remark that you are using the ASMX endpoints which are marked deprecated, so will be removed in a future release. You should use the WCF endpoints (like ISHRemote does).
     
    If I interpret your description "to get the response with last 2 days baseline IDs" as which baseline objects where changed in the last 2 days then I would suggest to use a metadata filter (filterMeta in your example).
     
    You can look up the exact API syntax in the doc, but regarding the logic, you get the idea from the following ISHRemote sample
    $metadataFilter = Set-IshMetadataFilterField -IshSession $ishSession12 -Name MODIFIED-ON -Level None -FilterOperator GreaterThan -Value "17/10/2017" |
    Set-IshMetadataFilterField -IshSession $ishSession12 -Name MODIFIED-ON -Level None -FilterOperator LessThanOrEqual -Value "19/10/2017"
Reply
  • May I first of all remark that you are using the ASMX endpoints which are marked deprecated, so will be removed in a future release. You should use the WCF endpoints (like ISHRemote does).
     
    If I interpret your description "to get the response with last 2 days baseline IDs" as which baseline objects where changed in the last 2 days then I would suggest to use a metadata filter (filterMeta in your example).
     
    You can look up the exact API syntax in the doc, but regarding the logic, you get the idea from the following ISHRemote sample
    $metadataFilter = Set-IshMetadataFilterField -IshSession $ishSession12 -Name MODIFIED-ON -Level None -FilterOperator GreaterThan -Value "17/10/2017" |
    Set-IshMetadataFilterField -IshSession $ishSession12 -Name MODIFIED-ON -Level None -FilterOperator LessThanOrEqual -Value "19/10/2017"
Children