Questions tagged [rest]

Representational state transfer, or REST, is an architectural style for networking software to transfer information through the web.

Filter by
Sorted by
Tagged with
0
votes
0answers
26 views

How do I assign methods if I have 100 endpoints in a RAML spec?

I'm trying to build a RAML API specification for the first time. The API will need to give users access to 100 resources (endpoints), so I'm not sure how to assign methods to them. I assume there has ...
1
vote
0answers
7 views

Should custom Django Admin be separate from client endpoints?

I am currently in the process of creating a Django REST framework project for a client server web app. I would like to ask the following: Should I write a custom admin if I want my app to be ...
1
vote
1answer
28 views

Authentication setup advice for web app and its backend API

I am fairly new to web development, and I am learning to build web applications. I am facing a problem figuring out how to set up authentication mechanisms for a multi-user application. Let me provide ...
-2
votes
2answers
122 views

Confused about how APIs are called

I'm new to APIs. Conceptually, I understand what an API is, but I get confused when it comes to the some of the technical details. All of the tutorials I've read talk about URLs and endpoints, and ...
1
vote
2answers
68 views

Cache maintained by caller app or by provider app in microservices inter-app communication?

Suppose there are app1 and app2 in a microservices. app2 needs to call app1's RESTful APIs. Cache is needed since the call will be frequent. So after a successful RESTful call, there will be cache ...
-1
votes
1answer
62 views

How to handle major changes (cross-cutting concerns) in REST API?

Let's say we have a REST API application A consumed by other 30 applications. Application "A" uses a cross-cutting security implementation using a Security NuGet package 1.0. All minor/major changes ...
0
votes
0answers
35 views

In a DDD CQRS API, is it preferable to have a separate DTO per query or per representation of a resource?

I am in the middle of starting up a new project and just wanted some reassurance as to which approach to DTO's returned by the read-side was easier to maintain in a real world application with ...
1
vote
1answer
45 views

How do I create an HTTP PUT request that modifies the resource in many ways

I have a NodeJs backend that interacts with MySQL database. Let us assume that I have a schema similar to this: Book id name Author id book_id name So, I have two tables named Book and ...
0
votes
0answers
23 views

SQLAlchemy with Plain Old Python Objects (POPO)

In SQLAlchemy class models are of data type Column which contain metadata about the table in the database. Such as: id = Column(Integer, primary_key=True, autoincrement=True, nullable=False) When I ...
0
votes
3answers
77 views

DDD and Infrastructure micro-Services - how should the interface be designed?

We've extracted our email sending into an EmailService - this is a microservice that provides resiliency and abstracts the email logic into an Infrastructure service. The question is how the ...
1
vote
1answer
36 views

Ideal architecture for ML training -> API service workflow, with multiple models/services? [closed]

I'm planning to construct a workflow/environment for training and serving NLP classifiers, that follows something like: The model training system takes in annotated documents from a subset of a ...
0
votes
2answers
152 views

Rest API POST with illegal data in parameters: Bad Request or 404?

Take a hypothetical camera company providing an API to manage its users and cameras. Each user owns cameras, and every user of a camera has a role assigned (one of admin, operator, viewer - these are ...
6
votes
2answers
316 views

“REST Vs GraphQL” is it a correct comparison?

I saw in many sites that compare REST with GraphQL. after investigating this concern (actually my concern) that, "is it a correct comparison?", I being more confused. Since the REST has a different ...
-1
votes
1answer
73 views

Is there a reason to have multiple projects for a single API? [closed]

I entered yesterday to my new job and while browsing their repositories, I noticed they have a project for every resource of a REST API. For example, if they need to add a REST resource called "people"...
1
vote
1answer
67 views

How to handle API token(s) that expires after time

I'm currently building a facade that's supposed to be in front of a system we are currently using. This system has its own API, but we have decided to simplfy things, and therefore the facade. ...
-1
votes
1answer
16 views

Adding resources to subresource REST API

I'm trying to build an web API that closely represents a library of books. I currently have the following routes. GET /api/books GET /api/books/:bookID GET /api/libraries POST /api/libraries This ...
1
vote
2answers
111 views

Status code for middleware? 200 or 4XX , 5XX?

I have a design dilemma in deciding the response status code and architecture for a middleware we are designing. So the Client Calls MiddleWare, And middleware calls the 3rd party service to get car-...
-1
votes
1answer
57 views

Resful name API for multiple key objects

We are implementing an API and we want to follow best practices for naming the endpoints. However, during the design, we have found a challenge. We have some objects where the key to the objects is a ...
0
votes
1answer
44 views

rest service with digitally signed parameters

I'd like to build a rest service that will accept objects that has digital signature. This service has to support both xml and json data serialization formats. I'd like to use .Net core framework to ...
1
vote
2answers
62 views

Acceptable to use synchronous call to another microservice for time-sensitve state change?

Say there are two microservices (example is simplified) PickupRequestService: lists pick-up requests of passengers DriverService: drivers use to accept pickup requests On a completely decoupled ...
0
votes
0answers
19 views

How to setup REST API in Codeigniter 3.0

I am creating the REST API using codeigniter. I downloaded this library and installed in my application. It works great! https://github.com/chriskacerguis/codeigniter-restserver But I have an doubt. ...
0
votes
2answers
79 views

Are REST Methods Which Return Dynamically Generated Random Data Safe

Is a REST method which returns dynamically generated random data each time that it is accessed considered safe? According to RFC 2616 (emphasis mine): ... In particular, the convention has ...
0
votes
2answers
75 views

Incorporate a background job enqueue endpoint in a REST API

To exchange data between our standalone frontend application and the backend API, we currently have a REST API, with standard endpoint to list/create/update/destroy ressources with a consistent naming ...
1
vote
2answers
76 views

Building a rest api layer on top of a soap webservice

We want to build a rest api layer on top of a soap webservice. Our current situation is that we have a coldfusion application that talks with the webservice, both running on different servers. The ...
1
vote
2answers
76 views

RESTful API - Adding nested resources as a query parameter?

I recently had thoughts on handling the flat vs nested architecture when designing a RESTful API. Would there be anything wrong with having a system where your nested resources can be specified ...
0
votes
3answers
88 views

API with different kind of response for error

Let's focus on a single endpoint, which always returns an encoded JSON object with a well defined and documented structure. But when an exception is thrown, the exception itself is formatted to a ...
0
votes
3answers
106 views

Url pattern for making a 'like' with a REST API

I have an API route as so: GET /api/item/like Which makes a like object between the logged in user and item object, and it works fine. Is this the correct way to have a user 'like' an object? Or ...
0
votes
1answer
110 views

Command Waiting On Event Sourcing Micro-services

I'm very new to micro-services but am trying to learn, so apologies for any ignorance or incorrect information. I have been looking at event-sourcing architecture for microservices and I have a ...
-2
votes
2answers
129 views

Typescript, CRUD Applications, and the generation of resource identifiers

I am currently trying a create a fairly simple, declarative RESTful CRUD framework, whereby I can define a resource type, and have both the API endpoint created, as well as the the functions to Create/...
0
votes
2answers
62 views

How to handle a request to delete and post?

I am making an application in which there are 3 tables. A user can click a button to request to move an item from table 1 to table 2. Essentially, this means that an item is deleted from table 1 and ...
0
votes
1answer
39 views

How to handle many-to-many relationships with multiple incompatible relationship types in RESTful API?

Note this question is about when there are multiple relationship types. This is not the same as this question, where there is only a single member relationship. Say we have persons and organizations. ...
0
votes
1answer
113 views

RESTful API Endpoints - Concrete vs OO versioning

I am looking at Versioning Micro Services solutions and got a little carried away with OO design. Using WebAPI, I got to the point where I can use OO design to choose the correct version to run with ...
1
vote
3answers
123 views

REST API - Standard for also creating required parent entities?

We're creating a new API to add new Jobs into a legacy system. The question deals with how to handle creating a Job's required parent entities when you don't know the IDs of those parent entities to ...
0
votes
1answer
118 views

REST Many To Many Design

Consider a web api exposing two kind of resources: Users and Teams with many-to-many relationship, typically a REST api will expose the following trivial endpoints to read data: GET /users GET /users/...
0
votes
1answer
45 views

Storing session state in browser's local storage

Stack Exchange has some bits of what seems to be session state -- for example, whether you want to see 15, 30, or 50 questions per page when you view a list of questions. You can click on the button ...
-1
votes
1answer
67 views

Pattern for for REST API who's response depends on behavior of requests to other services

Some one help me with my design paralysis! Assume a microservice (probably going to be implemented in Spring Boot) that has implemented an run of the mill REST API, and after receiving an initial ...
1
vote
1answer
35 views

Client-side XHR request, which IP does the endpoint read?

Assume a Javascript plugin, for a developer, that's included on their website. <script src="https://external.com/plugin.js"></script> The plugin makes a XHR request to a 3rd party ...
-3
votes
1answer
43 views

Design Restful API Get manipulated data from resource [closed]

I am new to rest, I have an entity called availableJobPositions. I want to get most Interesting job by sending a person skills. which url is good in restful: api/positions/skill/most-intersting?...
0
votes
2answers
96 views

Should I put the messages for business logic validations in API?

I have a REST API written using ASP.NET Core Web API. There are a few business logic based messages I want to send to the clients from the API. I am in a dilemma on which of the following ways I can ...
1
vote
2answers
75 views

Are different endpoints to display the same resource in different ways RESTful?

Say I have a Student who has a ID number, a name, a profile picture, some contact details, and is enrolled in several courses. From the perspective of a Single Page Application there are different ...
3
votes
1answer
218 views

REST API Authentication: Cookie vs Web Storage

Note: This question might sound like a duplicate, but all other similar questions did not take into account (mobile apps, iot's, web, 3rd party usage). Specifically, in dealing with the clients ...
0
votes
1answer
160 views

What is the best practice for sending a large array of strings to an API

I'm building a simple app that is a client web application and an API behind it. I'm combining two third-party APIs, one needs to be called from my client application (for ease of authentication) and ...
-1
votes
2answers
52 views

How to handle list arguments with invalid and valid elements

When you have an endpoint that can take a set of valid parameters, how do you do validation on a non-empty set of elements? Say you have a request /api/endpoint?my_list=1,2,3 where 1, 2, 3 are the ...
0
votes
0answers
253 views

dealing with too many DTO / Java

We are building an pseudo-rest API (because no body cares/funds for a full blown rest API for internal use - which is OK). So we have elements of Rest API (links for resources, API naming conventions ...
1
vote
3answers
243 views

Determining response codes from void functions OOP

I am trying to create a Put endpoint using rest. Let's say that under the link /addresses/12345 I am trying to add a new address (if that id doesn't exist) or I'm trying to update it if it does ...
0
votes
1answer
76 views

REST-like HTTP POST request with JSON

I am coding a poof-of-concept throw-away GCC plugin (see this for more context) which would use the HTTP 1.1 protocol to interact with my Bismon (GPLv3+ code on github, but unreleased; draft technical ...
-1
votes
2answers
47 views

Implementing http patch using less number of possible cases

Maybe this is stupid question but if I implement http patch, is there no good way to reduce the number of possible cases without exploding into a large number (2^n) of different cases depending on ...
2
votes
2answers
137 views

How to create useful error messages in a JSON REST API without leaking implementation details across layers?

We're implementing a REST service with three main layers: Controller, Domain, Repository. The REST API is supposed to respond to error conditions with meaningful error messages. Suppose the general ...
1
vote
1answer
36 views

track user actions on UI and store them in the database

I have the web application that provides user with the interface to edit its character. When user makes some changes and saves them, I store it as delta in MongoDB. UI and backend communicate via REST....
1
vote
0answers
28 views

OAuth2 - client_credentials

I am in the process of building out a private REST API. This API is intended for machine to machine communication. In short someone else's server will kick off a job via CRON that pulls information ...