Questions tagged [path-parameter]

105 questions
0
votes
1 answer

Why my PathSegment is null while @PathParam is not null?

With following code, serviceIdSegment is null while serviceId is not null. class MySubResource { @GET @Path("{serviceId: .+}") public Response readById(@PathParam String serviceId) { // serviceId is not null // why…
Jin Kwon
  • 20,295
  • 14
  • 115
  • 184
0
votes
0 answers

Pass and retrieve path parameters in servlet

I know how to pass parameters as a mydomain.com?id=2 request, however instead of the ?id=2 approach I'd like to implement a forward slash based approach to passing parameters in JSP Servlets? Similar to…
Jay
  • 4,873
  • 7
  • 72
  • 137
0
votes
1 answer

JAX-RS: Double @PathParam passing

I would like to pass Double path params like 5, 5.0, 0.5, 3.5, 3.65 etc. So I make such method on JAX-RS resource: @GET @Path("/rated-above/{minAvgRating : \\d+(\\.\\d+)? }") @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) …
Michał Ziobro
  • 10,759
  • 11
  • 88
  • 143
0
votes
1 answer

Jersey howto iterate over parameters?

I have this put request that needs lot of parameters. So is there a way to iterate over the parameters instead of manually accesing them. @PUT @Path("/{foobar}") public Response createFoobar( @PathParam("foo1") String foo1, …
Gobliins
  • 3,848
  • 16
  • 67
  • 122
0
votes
1 answer

wso2am 1.9.0 path parameters issue

Actually i'm working with WSO2 Api Manager 1.9.0. I've published an API with a ressource with the following url template: /web/v1.2/test/{id}?user=12345 now when i try to request this resources it issue a not found matching resource exception. any…
imed
  • 3
  • 1
0
votes
1 answer

jax-rs: jersey @pathparam to get previous param in one method

How would i get the last path parameter in on method. @Path("{profile}/articles") public getAllArticles(@PathParam("profile") String profile ){ } @Path("{articleId}") public getArticle(@PathParam("articleid") long id ){ } I know how to get the…
Irshad
  • 1,016
  • 11
  • 30
0
votes
1 answer

WSO2 API Manager v1.8.0

I have a simple use case of mapping path param from the API consumer to the backend API endpoint. I have done a lot of research but have not found out the specific answer on how to do that. As per my understanding, thr mapping of the path parameter…
0
votes
1 answer

How to validate path variables in REST

My Question is How can I validate request parameters if I use @PathParam. For instance I have two request parameters, name and id path is localhost:/.../search/namevalue/idvalue if a user submits blanks for name or id I should send a response…
user3808439
  • 3
  • 1
  • 4
0
votes
2 answers

Jersey Path Param : Multiple backslash separated param

@Path("/assetViewCount/{path}") above annotation can be used to retrive myValue into path for url like /assetViewCount/myValue. How can I get myValue/nextValue from /assetViewCount/myValue/nextValue in path
swapy
  • 290
  • 2
  • 9
0
votes
1 answer

PathParam in RESTFul ws

I need to use as PathParam the path of a file, how can I do? Should I use URLEncode e URLDecode? Can someone give me an example? The structure of my ws is: @Path("/{filePath}") public Response convert(@PathParam("filePath") String filePath) throws…
user3423568
  • 741
  • 1
  • 6
  • 4
0
votes
1 answer

Jersey REST And PathParam Regular Expressions

I'm trying to use Jersey to develop a REST web service. My requirement is for me to be able to access the web service and return data, based on the passed PatParam parameters. My web service so far is as…
Mouhammed Soueidane
  • 1,056
  • 2
  • 24
  • 42
-1
votes
0 answers

Prevent reloading the whole page in React

I changed the parameter in a link (Eg. localhost:3000/home/id, id is the parameter here), but now I want the whole page not to reload, only the parameter where the change has happened should reload, and the rest of the things should stay intact. Is…
-1
votes
1 answer

How to approach REST API path parameter versioning?

Question I'm trying to figure out what would be the best approach on path parameter versioning, but haven't been able to find a good/trustful source. Say you have two entities category and product and the following REST endpoint to obtain the…
Hans
  • 224
  • 2
  • 13
-2
votes
1 answer

How to pass multiple parameters after the URL with /

I want to pass the parameters after the URL with using 'forward slash(/). For example:{myURL.com}/{123}/{"test"}. Here 'Name' and 'Id' are the parameters. I know how to pass the parameters like {myURL.com}?{Id=123}?{Name="test"}.
RKCY
  • 4,095
  • 14
  • 61
  • 97
-3
votes
1 answer

In Robot Framework how do I pass PATH parameter for a REST API having its path parameter in following format {path}/getinfo

Please provide the code format or syntax , by which I can pass the path parameter for API in Robot Framework.
1 2 3 4 5 6
7