Forum

Expand all | Collapse all

Help in REST API

  • 1.  Help in REST API

    Posted 07-02-2019 10:07
    Hi everybody,

    I'm trying to use the ISM REST API to check the service requests active in a specific group.

    Is there anyone who can help me? What I need is get all service requests from:

    https://csm3.serviceaide.com/csmconnector/ServiceRequest

    Filtering the one with:

    AssignedGroupID = 196

    I'm already able to get all service requests from https://csm3.serviceaide.com/csmconnector/ServiceRequest using Postman. Now I need to filter them.

    Regards.

    ------------------------------
    Leonardo Blay
    Senior Analyst
    Infoglobo
    Rio de Janeiro
    +55 21 25349747
    ------------------------------


  • 2.  RE: Help in REST API

    Posted 07-02-2019 15:47
    Hi Leonardo,

    You should be able to do something like:

    https://csm3.serviceaide.com/csmconnector/ServiceRequest?filter=(AssignedGroupID eq 196)

    (in POSTman, add 'filter' as a parameter, and the filter values in the value section)

    depending on the size of the return, can also make use of the 'fields' parameter to limit the attributes returned for each ticket

    ------------------------------
    Peter Hinchey
    Solution Architect
    ServiceAide

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



  • 3.  RE: Help in REST API

    Posted 07-02-2019 16:08
    Hi Peter. Worked just fine. Thank you so much. Regards.

    ------------------------------
    Leonardo Blay
    Senior Analyst
    Infoglobo
    Rio de Janeiro
    +55 21 25349747
    ------------------------------



  • 4.  RE: Help in REST API

    Posted 10-17-2019 14:32
    Hi,

    Two additional questions:

    1 - How can I filter multiple fields? I want to filter AssignedGroupID = 196 and NonTranslatedTicketStatus = Active. I've tried multiple filter parameters, same filter parameter with multiple optin separetad by , or ;

    https://csm3.serviceaide.com/csmconnector/ServiceRequest?filter=(AssignedGroupID eq 196 NonTranslatedTicketStatus eq Active)
    https://csm3.serviceaide.com/csmconnector/ServiceRequest?filter=(AssignedGroupID eq 196, NonTranslatedTicketStatus eq Active)
    https://csm3.serviceaide.com/csmconnector/ServiceRequest?filter=(AssignedGroupID eq 196; NonTranslatedTicketStatus eq Active)
    https://csm3.serviceaide.com/csmconnector/ServiceRequest?filter=(AssignedGroupID eq 196)?(NonTranslatedTicketStatus eq Active)

    None of this worked.

    2 - Can I retrieve custom fields in REST API? If so, how can I do it?

    Regards.

    ------------------------------
    Leonardo Blay
    Senior Analyst
    Infoglobo
    Rio de Janeiro
    +55 21 25349747
    ------------------------------



  • 5.  RE: Help in REST API

    Posted 10-28-2019 13:46
    I would try AND

    ------------------------------
    Richard Graves
    Serviceaide
    ------------------------------



  • 6.  RE: Help in REST API

    Posted 10-28-2019 16:19
    @Leonardo Blay
    Actually take a look at the recently updated wiki article. I'm guessing based on a comment you posted...
    https://serviceaide.atlassian.net/wiki/spaces/CloudSMGoldfish/pages/1049755826/Filter+Data+in+a+REST+API+Call

    Seems that "and" will work​

    ------------------------------
    Richard Graves
    Serviceaide
    ------------------------------



  • 7.  RE: Help in REST API

    Posted 10-29-2019 09:59
    I worked. Thank you, Richard.

    Any thoughts on question #2?

    Regards,​

    ------------------------------
    Leonardo Blay
    Senior Analyst
    Infoglobo
    Rio de Janeiro
    +55 21 25349747
    ------------------------------



  • 8.  RE: Help in REST API

    Posted 10-29-2019 10:05
    I was able to find the CustomFields attribute on POST method. But it's not there on GET.

    Regards,

    ------------------------------
    Leonardo Blay
    Senior Analyst
    Infoglobo
    Rio de Janeiro
    +55 21 25349747
    ------------------------------



  • 9.  RE: Help in REST API

    Posted 10-29-2019 10:56
    @Leonardo Blay Reaching out to some smarter people than me on this​​

    ------------------------------
    Richard Graves
    Serviceaide
    ------------------------------



  • 10.  RE: Help in REST API

    Posted 10-29-2019 11:38
    Thank you so much!

    ------------------------------
    Leonardo Blay
    Senior Analyst
    Infoglobo
    Rio de Janeiro
    +55 21 25349747
    ------------------------------



  • 11.  RE: Help in REST API

    Posted 10-29-2019 12:06
      |   view attached
    Enclosed the document which has the steps to get all the custom attributes from a ticket using REST API call.

    Thanks
    Prasanna

    ------------------------------
    Prasanna Nagaraj
    ServiceAide
    ------------------------------



  • 12.  RE: Help in REST API

    Posted 10-29-2019 13:20
    Thank you so much, Prasanna. It worked just fine.

    Regards,

    ------------------------------
    Leonardo Blay
    Senior Analyst
    Infoglobo
    Rio de Janeiro
    +55 21 25349747
    ------------------------------