Query Parameters for get method request on API

Certified Associate Developer

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

or if we add as relative path  ??

  Discussion posts and replies are publicly visible

Top Replies

Parents
  • 0
    Certified Lead Developer

    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

Reply
  • 0
    Certified Lead Developer

    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

Children