Skip to main content
bleronak0001
Known Participant
Jul 5, 2024 12:00 PM UTC
Solved

Query Parameters for get method request on API

Which is difference if we add query parameters in Query Parameters side 

or if we add as relative path ??

    mathieud0001
    Genius
    Jul 5, 2024 12:43 PM UTC

    query parameters.

    4 replies

    mathieud0001
    Genius
    Jul 5, 2024 12:19 PM UTC

    The difference is that the query parameters will be available via http!request.queryParameters whereas the the path is available via http!request.pathSegments which is more cumbersome IMO. Path segments are usually meant to be used if doing pure REST APIs but Appian isn't really optimized to do pure REST APIs as it doesn't support multiple methods for 1 single API.

    i.e.

    GET /projects

    GET /projects/:id

    POST /projects/new

    PUT/PATCH /projects/:id

    DELETE /projects/:id

    bleronak0001
    Known Participant
    Jul 5, 2024 12:42 PM UTC

    in my case https://test/api/v1/marketevents?instrumentCode=IC_wash_201&eventSourceTypeCode=BUY&entitySourceUniqueId=ESUD_wash_201&tsStart=2024-01-01T00:00:00&tsEnd=2024-10-30T23:59:59&page=1&size=30 

    This is example how I need to send request. Which one is better to use? 

    mathieud0001
    Genius
    Jul 5, 2024 12:43 PM UTC

    query parameters.