Questions tagged [path-parameter]

105 questions
1
vote
1 answer

Creating a GET method with request body in kotlin using ARest Framework

I am setting up a new service consisting of GET, DELETE and POST method APIs using ARest framework in kotlin. I am wrapping up the inputs in a data class and passing it out to the methods. In this case DELETE and POST method works fine but I face…
Sathya
  • 58
  • 6
1
vote
1 answer

How to manage string with blanks, comma etc. as PathParam?

I created a web services that needs to get a string with blanks, commas, parenthesis and other special characters. I would like pass it as PathParam but I wasn't able to manage this string. The string that I want to manage is similar to the…
N3tMaster
  • 398
  • 3
  • 13
1
vote
1 answer

Map JAX-RS @PathParam to POJO Constructor With Annotations

I want to create an endpoint which has a PathParam that automatically calls the constructor of an object to be injected, which has a constructor of a String argument. To spell it out in code: Here is the resource @GET @Path("/{apiVersion}" +…
David Williams
  • 8,388
  • 23
  • 83
  • 171
1
vote
2 answers

Params from @ManagedService path are null

actually I would to retrieve two params from the @ManagedService path, but i get only null value. The code is something like: ... import org.atmosphere.config.service.PathParam; import org.atmosphere.config.service.ManagedService; import…
Chiuccolo
  • 53
  • 1
  • 10
1
vote
0 answers

Date parameter for a @QueryParam + @PathParam

regarding java jersey how can i state a @DefaultValue for a Date parameter? ex. @DefaultValue("?????") @QueryParam("dateCreated") Date dateCreated Also, continuing the question, how can i leave empty a Date parameter at a URL that is constructed…
ODstuck
  • 189
  • 1
  • 7
1
vote
1 answer

Jersey client proxy not resolving calls to URI with multiple path params

I have the following javax rs annotated interface: @Path("/") public interface MyRestEndpoint { @GET @Produces(MediaType.APPLICATION_JSON) @Path("myapp/resources/resourceId/{resourceId}/memberId/{memberId}") MyResource…
James
  • 1,237
  • 4
  • 22
  • 43
1
vote
2 answers

how can I pass parameter with slash as the PathParam in rest API

I build a rest API like www.example.com/checking/{id} and it works well. But when I passed in a id with slash, like abc/123, then the API path becomes the www.example.com/checking/abc/123 which actually breaks the path. I can use the encoded URL id,…
Terry
  • 855
  • 4
  • 12
  • 16
1
vote
1 answer

URI path parameter parsing in Java

One of REST apis I am consuming returning urls in this format: /api/variables{/id} /api/projects{/id}{?skip} The same url pattern seems to be used in JAX-WS implementations in @Path annotation so hopefully there is already some library which can…
JJ Roman
  • 4,225
  • 1
  • 27
  • 21
1
vote
1 answer

Optional @PathParam in Jax-RS for format .json .xml

I have a service in Java using Jersey, now I want to map following three URLs to a single method, so that if any function have .json or .xml convert the output accordingly if no extension (format) is provided then default return is json Following…
PHP Avenger
  • 1,744
  • 6
  • 37
  • 66
0
votes
1 answer

How to add examples for path parameters in OpenAPI 3.0

For one of the API Proxy in Azure APIM, we would like to add samples, so that Developers can login to Developer Portal and quickly test it with the samples presented to them, this is possible for Query Parameters and Body, but so for I didn't a way…
0
votes
0 answers

ESP WebServer Handle Path Parameters

I'm having a problem handling requests on an ESP that acts as WebServer. Basically this code: #include //using this library ... webServer.on("/api/:userId/lights", HTTP_GET, [this]() { handle_GetState(); }); …
0
votes
1 answer

Handling optional path parameters in Postman

I am working on a REST API which I am testing with both Postman and Swagger. I have an endpoint with path parameters, the request url is defined like this: {{host}}/path/:firstId/:secondId FirstId is required, so that one will always be filled out,…
Thomas Due
  • 43
  • 1
  • 2
0
votes
1 answer

How to match nested path parameter in rest url (spring boot)

I'd like to match a nested path of rest url, e.g. I'd like use one parameter to capture /folder_1/folder_2/a.sh for the following rest url. Is there any way to do that in spring boot. And BTW, I also want to match the empty path if it is /files.…
zjffdu
  • 25,496
  • 45
  • 109
  • 159
0
votes
2 answers

When I change the url-pattern of servlet from / to /client doesn't take the path on consedration

This is web.xml ClientServlet ma.fstt.web.ClientServlet ClientServlet
0
votes
0 answers

How to make a path parameter optional in Go Echo Routes?

Is it possible to have optional "path" parameters in Echo routes? For example, I have GET /user/:userId end point. But I need to call this endpoint without userId also and fall back to the default behavior using the same handler. Currently, if I…
Minudika
  • 851
  • 6
  • 23