Questions tagged [restful-url]

1

votes
2

answer
57

Views

Making PUT and GET Responses in Katalon Studio

I’m new in working with RESTful APIs. For my case I want to make an PUT Request and then GET it. I made an PUT Request and it worked. [1]: https://imgur.com/a/zlUTzYB But now I want to make an GET Request. Can I somehow make so that GET Request will automatically take PUT Requests statementId and...
brithwulf
1

votes
1

answer
40

Views

Should Rest API return only structured data? What if I have to get html?

I'm trying to develop a super simple web page with REST API. In most examples, they suggest to get a resource like below. request GET /dogs/1 response HTTP/1.1 200 OK Content-Type: application/json { 'id' : 1, 'name' : bity } The path /dogs/1 represents structured data of dog 1. Then which path shou...
dain.lee
1

votes
1

answer
118

Views

should backend handle email verification request?

I am creating a web app and need to send an email verification to users after they registered in the system. When the user receives a verification email, they need to click on the link in that email to verify their email address. My question is whether the link points to my backend server or to my f...
Zhao Yi
1

votes
3

answer
60

Views

Http call to springboot application is not hitting from angular application

I have created a service class like this, import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/do'; import 'rxjs/add/operator/catch'; import { Observable } from 'rxjs/Rx'; @Injectable() export class PacsService {...
Chandra Mouli
1

votes
0

answer
56

Views

How to create activities based on role of user with restful API?

I am creating an online based Android app which shows notifications from different types of users like 'admin', 'user'. When I login a admin class and layout, or a 'user' its shows another layout and it should open the activity screen based on their role. I'll use intents to open different activitie...
Dr.TZ
1

votes
0

answer
46

Views

Why is convention-based routing less efficient in RESTful API URI patterns?

My question is about why convention-based routing is less efficient in RESTful API URI patterns
Rock Shan
1

votes
0

answer
28

Views

Why is my [Op.or] only partially working?

I am trying to write an endpoint for searching for a user with a username or id that matches the passed string. Below is the current code I have set up for an endpoint on localhost at .../api/users/:search. //GET user by id or password router.get('/:search', (req, res, next) => { User.findOne({ wher...
Andres Rosales
1

votes
1

answer
41

Views

REST Resource Naming & @PathVariable annotation

I am reading a tutotral regarding the REST Resource Naming... http://api.example.com/device-management/managed-devices/{id}/scripts/{id}:clone This is an example of a best practice in the naming, but I don't know how to declare it using the @PathVariable annotation and distinguish one {id} from {id}...
en Peris
1

votes
1

answer
98

Views

How to specify what operations (Http Methods) is available with HATEOAS

The HATEOAS definition say that each response must contains the associated links, but following the REST pattern an URI must be the same for all operations, what changes is the HTTP method. Per example: Request: GET http://example.com/book Response: [ { 'id': 1, 'title:' 'foo', 'links': { 'self': ht...
1

votes
0

answer
160

Views

RESTful API access sub-resource by type or id

I have some resources with 2 types of sub-resources. Each resource has its unique id. And I'd like to support accessing by id. What I am doing currently is: List sub-resources by type GET /resources/type_1_subs GET /resources/type_2_subs List all sub-resources GET /resources Create sub-resource POST...
SongHerz
1

votes
0

answer
13

Views

Send post data from HTML form to RESTful service using codeigniter

i've just learn about Restful service using codeigniter and created a form, when i submit, i want to send the data to restful service. This is the part of code :
Bandit28
1

votes
1

answer
242

Views

kubectl apply doesn't update service selector label

right now I have a service kubectl get svc ray-test-svc apiVersion: v1 items: - apiVersion: v1 kind: Service metadata: annotations: .... labels: app: ray-test-app service: ray-test-svc name: ray-test-svc namespace: ray-test-ns spec: ports: - nodePort: 30198 port: 80 protocol: TCP targetPort: 8000 se...
ComplexRay
1

votes
0

answer
39

Views

How to build list of entity in RESTful response

@GET @Path('/books') @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response allBooks() { // Given a list of books List books = new ArrayList(); books.add(new Book('1190','Mind Your Steps')); books.add(new Book('2287','Look Up')); GenericEntity entity = new GenericEntity...
user743148
1

votes
0

answer
75

Views

RestRequest add paramters not working Delphi Rad Studio

When put value of parameters 'New York' my restful not return result, but when put 'Paris' working fine. with RestRequest.Params.AddItem do begin name := 'city'; Value := 'New York'; Kind := TRestRequestParameterKind.pkGETorPOST; end; I think that problem is space! How fix that? After call restf...
user_odoo
1

votes
1

answer
70

Views

Unable to run REST APIs from Oracle RDS instance using APEX_WEB_SERVICE

We have Oracle 12c RDS instance and REST SERVICES APEX installed on it. We were trying to make an API request from DB procedure using APEX_WEB_SERVICE.make_rest_request but we are not able to make it. **APEX_WEB_SERVICE.make_rest_request ( p_url => API Url, p_http_method => 'POST', p_body => input_...
1

votes
1

answer
31

Views

Setting up url with parameter that can be consumed by web service

I am setting up a custom endpoint in the WordPress REST API that will call a SQL statement. I can not figure out how the url should be set up with the param that will need to be passed in and then how to get it out of the url so that it can be used in the SQL query. I have tried to my url as the fol...
jdubicki
1

votes
0

answer
69

Views

Problems accessing restful web service

To make some context, i asked this question last week with some problems configuring tomcat on my computer. Question. Well, now, i have it set up. I run it from intellij and the local page for tomcat at localhost:8080/ shows up. But, in whatever other URL i try to navigate, it shows me the same mess...
Nameless Coder
1

votes
0

answer
22

Views

Firemonkey open or download blob over apex RESTful service

I use oracle apex restful to load data from oracle 11g to firemonkey app. Is it possible open or download document BLOB (.jpg, .pdf, .xls) in firemonkey app with restful?
user_odoo
0

votes
0

answer
7

Views

What is the best practice for introducing v2 of a RESTful API with unchanged endpoints?

In case I have a breaking change with one endpoint only and I need to introduce /v2/... of this endpoint. Should I keep the prefix /v1/ for all other unchanged endpoints ? Let's say that the current endpoints are: /v1/endpoint1 /v1/endpoint2 /v1/endpoint3 /v1/endpoint3 I need to make a breaking chan...
faressoft
1

votes
1

answer
1.3k

Views

spring rest post?

@ModelAttribute('user') @RequestMapping(value = '/', method = RequestMethod.POST) public User saveUser( @RequestBody User user ) throws IOException { logger.debug(user); return user; } requestbody will convert the json into bean(pojo), is there required to use annotation @ModelAttribute('user')...
cometta
1

votes
2

answer
324

Views

RESTful service and user maintenance - url structure and commands question

I'm designing restful service and one of the entities to maintain - user accounts. I'm doing it in .NET and using membership provider. Here is what I have: /users/ GET - returns list of users /users/ POST - can create or update multiple users (post array of User objects) This POST won't matter if y...
katit
1

votes
1

answer
1.4k

Views

how to access RESTful parameters from ZK GenericForwardComposer when using Spring MVC

i'm working on a project using zk and spring.Basically Spring manages object life-cycle of the objects.i've planned to use cute url.for that i used ZK MVC pattern and added Spring 3 MVC front controller by mapping the requests to the views using mvc:view-controller There has been a situation where...
black sensei
1

votes
1

answer
581

Views

What is the preferred Restful URI design to distinguish between a collection and singleton resource?

I have a URI structure which is hierarchical for a particular data set: /Blackboard/Requirement/{reqID}/Risk/{riskId}/MitigationPlan/{planId} If the url is split at various IDs you can get that particular resource e.g.: GET: /Blackboard/Requirement/2/Risk/2 This gets Risk #2 associated with Require...
PhD
1

votes
1

answer
1.1k

Views

spring mvc RESTfull url

I´m new in spring-mvc. So, i´m trying to use RESTFull urls ( i think that's the correct name) For example, i want use a url like this: http://localhost:8080/sommer/Users/edit/1 it means i want to edit the user with id 1 But with my configuration it´s not getting to the any controller. I'm just ab...
Müsli
1

votes
1

answer
412

Views

How to properly expose boolean search functions when designing a RESTful API?

I'm designing a RESTful API for a search function that looks something like this: http://example.com/books/?author=John+Smith&title=Brain+Surgery+For+Dummies Looking at this URI, I don't immediately know which these two queries the client is performing: a) all books by John Smith, plus all books ent...
jamieb
1

votes
2

answer
3k

Views

RESTful API url calling from a different domain

I have the following restful api ajax call: $.ajax({ type: 'POST', url: 'https://website.com/a/login', data: data, dataType: 'json' }).... where data is: data['login']='username'; data['pass']='1234'; the problem is that this code only works when run from my domain. But when I put this code to run e...
mugetsu
1

votes
1

answer
477

Views

How can I have the default resourceful route include attributes of my model?

(Note that the examples are a simplification of my use case.) I have a Model Event and the default route for showing one event: /events/:id(.:format) ----> activities#show Now, the event has an attribute named year and I am also already accepting the following route: /events/:year/:id(.:format) ----...
user569825
1

votes
2

answer
1.6k

Views

Spring Restful services GET and POST methods

Probably a simple question on REST... How do I pass the GET variables to the function in the below code @GET @Produces('application/json') @Path('/loginresult.json/{userid}/{pwd}') { public List getAuthenticationResult(){ return authenticationAPI.getAuthenticationResult(); } I wan't to pass the user...
antnewbee
1

votes
2

answer
1.9k

Views

Error while calling RESTful Web-Service using Jersey Client POST method

Getting an error while trying to consume a Restful web service using POST method(with form param). I want to consume a REST application using POST method. Please find below the resource class I want to access. @Path('/user') public class User { @POST @Consumes(MediaType.APPLICATION_FORM_URLENCODED)...
Manu
1

votes
2

answer
124

Views

Should a PUT identifier come from the URL or from the HTTP request data?

This question is probably a dupe, but I couldn't find a similar one (not sure exactly what to search for). Say I have a restful resource URL like this: /my/items/6/edit There is a form at this page which allows me to edit my #6 item. When I submit the form, it POSTS to /my/items/6, with a PUT X-HTTP...
danludwig
1

votes
2

answer
2.4k

Views

No response was received. Either the request could not be opened or the request timed out ( for POST request )

I have a request which works fine when i hit the service using POSTMAN and POSTER plugins but when i try to hit load-balancing url i received ERROR. ERROR in POSTER ( plugin ): ERROR in POSTMAN ( plugin ): Part of code: @Path( '/' ) public class Check { public ResultSet rs; @POST @Produces( MediaTyp...
Mad-D
1

votes
1

answer
916

Views

redirect from JSP is in type pending and status canceled

I'm having a JSP file that is calling a REST post call which doing a get to a remote server. the request is being processed but get pending in the remote machine in status canceled. can you please assist? here is part of the JSP:` Register Log in function registerClick() { /* var params = '{realm: a...
soninob
1

votes
1

answer
1.6k

Views

RESTful post in Oracle Service Bus

Does anyone know how to create a proxy service that will handle this sort of thing? What I'm looking for is a path parameter and a post body being formatted similar to this: POST www.myurl.com/{123} Post body: myId=1&myOtherId=2 I am currently passing in an XML document and I'm doing an insert on th...
user1707342
1

votes
1

answer
840

Views

Using PUT verb in edit form using ASP.NET MVC 4 and Restful Routing .NET

I'm using the Restful Routing .NET NuGet package (https://github.com/stevehodgkiss/restful-routing) in my ASP.NET MVC 4 project. According to the documentation, I should be able to submit a form using the PUT verb to the Update action in a controller by placing the @HTML.PutOverrideTag() in the for...
Matthew Glace
1

votes
1

answer
484

Views

Restful WebService Deployment Strategy - Best practices

We are developing Restful webservices (JAX-RS). We have resource organization like the following: Base URI: api.example.com ->Accounts     [AccountId] ->contacts ->orders ->cart To illustrate, if I wanted to access the contacts resource, my URI would be like this: http://api.example.com/Accounts...
Vijay Ram
1

votes
1

answer
831

Views

How to add parameters to restful request?

I am using the following code to send a REST request, the request is failed (401 error) because it needs username and password. how to add them to the url ? even when I copy the url in browser and add the username and password to the end of it the browser pop out the login page, so I suppose in the...
Daniel Morgan
1

votes
3

answer
811

Views

Secure AJAX request to URI

I know there have been lots of question about AJAX security. I've searched and read but am still unclear as to what the best approach is. I have a very specific senario: I have an application that is build on top a PHP MVC framework. I've turned presentation elements such as a 'navigation menu' modu...
MageNewbie
1

votes
1

answer
99

Views

RESTful URI's, Creating a new noun/uri or add a queryparameter

I have a Person class with a one to many relationship to Employment. A Person in the CRM can have multiple Employments (historic data). My current REST URI for this class looks like this: http://domain/persons GET [collection] http://domain/persons/{id} GET [resource] http://domain/persons/{id}/empl...
Simon
1

votes
3

answer
450

Views

Designing a RESTful website [closed]

I am trying to learn to create RESTful web applications. I have a few doubts. Say, I have a requirement to display the name of user on the website header. I used to do it by storing the user object in session and then fetching the name in the JSP. But now, isn't that storing a conversational data an...
shazinltc
1

votes
2

answer
2k

Views

REST equivalent for a isVerb kind of method (boolean response)

I am new to REST and have some trouble finding the proper RESTful url for an API. I have an API that, given a word, returns a JSON with a boolean that indicates if the word is a verb or not. So in a not restful universe, this API would be a isVerb method. I am having trouble with finding a proper RE...
Zeravla

View additional questions