Questions tagged [restful-url]

Representational state transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web.

https://en.wikipedia.org/wiki/Representational_state_transfer

1351 questions
7
votes
1 answer

How do I implement dry run option to a REST api so I have a way of knowing it is implemented?

In my system, I have multiple services exposing REST apis for their resources. A specific service on the system needs to make rest calls to other services in dry-run mode in specific circumstances just to do validation. Even though the body of the…
Kilavuz
  • 71
  • 4
7
votes
3 answers

REST design for update/add/delete item from a list of subresources

I would like to know which is the best practice when you are having a resource which contains a list of subresources. For example, you have the resource Author which has info like name, id, birthday and a List books. This list of books exists only…
green
  • 153
  • 3
  • 13
7
votes
10 answers

Alternative to when the anchor tag only triggers a jQuery action without redirecting the user?

I have numerous anchor tags on my page that only trigger jQuery actions on the same page. The don't redirect the user to another location, which is the normal expected behavior of an anchor tag. I don't want to have restful urls in my app for every…
xylitol
  • 73
  • 1
  • 1
  • 3
7
votes
5 answers

Test version of web API url

For our Web api project we use the following url versioning system: https://{fqdn}/{apiVersion}/{apiResourceName}/{resourcePath}?{parameters} for instance we can have something like the following: https://myapi.mysite.com/v1/customer/2 Now…
MHOOS
  • 5,146
  • 11
  • 39
  • 74
7
votes
2 answers

Correct way of defining REST endpoints for user management

I have a typical user management module for which I want create REST APIs. User should be able to access his/her details but shouldn't be allowed to access other user details. Being an administrator user should be able to fetch any user or remove…
Royal Pinto
  • 2,869
  • 8
  • 27
  • 39
7
votes
1 answer

AngularJS Controller Error - : $http.get is not a function in controller section

var hsbc = angular.module('hsbc',['ngResource','ngRoute']); hsbc.config(['$routeProvider','$locationProvider', function ($routeProvider, $locationProvider){ //console.log('config part working'); $routeProvider .when('/login', { …
Rajesh Kumar
  • 153
  • 2
  • 4
  • 13
7
votes
1 answer

Best practices on using URIs as parameter value in REST calls

I am designing a REST API where some resources can be filtered through query parameters. In some cases, these filter values would be resources from the same REST API. This makes for longish and pretty unreadable URIs. While this is not too much of a…
dafmetal
  • 795
  • 1
  • 6
  • 18
7
votes
2 answers

RESTful API behavior for entitys with two independent primary keys

I have the following entity: 7 <...>... 23890212 The problem is now that carID and externalCarID are both independent primary keys that are used by/for different systems…
Robert
  • 1,286
  • 1
  • 17
  • 37
6
votes
1 answer

How to send multiple parameters to route using flask?

I started learning Flask framework recently and made a short program to understand request/response cycle in flask. My problem is that last method called calc doesn't work. I send request as: http://127.0.0.1/math/calculate/7/6 and I get…
Penguen
  • 16,836
  • 42
  • 130
  • 205
6
votes
5 answers

Springboot with Sybase server - Cannot load driver class: com.sybase.jdbc4.jdbc.SybDriver

Facing difficulty in configuring Sybase server with a fresh Spring boot application. Not sure how to configure Sybase server with spring boot successfully. Getting error "Cannot load driver class: com.sybase.jdbc4.jdbc.SybDriver". Basically, I am…
Rob
  • 431
  • 2
  • 7
  • 18
6
votes
0 answers

SSRS Report Consuming RESTful Web Service

I am trying to consume an XML via a REST web service using SSRS. I am intending to create the XML using LINQ and then dump it at the web service location. The web service is held in Azure under https:// ...…
Michael
  • 67
  • 1
  • 5
6
votes
1 answer

A "long" GET request with many parameters

I'm implementing a restful API interface, and was wondering about some limitations and best practices. I have a GET request which retrieves a series of entries from a database table. However my problem is, I allow my callers to pass in quite a…
Thomas Cheng
  • 695
  • 12
  • 26
6
votes
2 answers

Does it make sense to use both query and body parameters in a POST request for a REST API?

I have a resource that essentially requires another resource as input data for creation. For example: POST /v1/NewResource body: {InputResource} The interesting thing, however, is that creation of the NewResource is expensive, and the resource…
6
votes
2 answers

RESTful API best practices for admin and normal user access

Having to create a RESTful web service with admin and normal user access to resources (lets say cars), I would like to structure the Uri for the users as: http://myhost/users/5/cars/2 But as admin user, I would like to access all cars…
Patrizio Rullo
  • 491
  • 1
  • 4
  • 13
6
votes
1 answer

How to handle relationships in a REST api

I am trying to get my head around how to handle relationships in REST. I have read this question. If I have Drivers and Cars in my api and a Driver can only exist if connected to a Car I would make Drivers a subresource in Cars. The relationship…
David Berg
  • 1,958
  • 1
  • 21
  • 37