Questions tagged [rest]

REST (REpresentational State Transfer) is a simple stateless architecture that generally runs over HTTP. It is an "architectural style" that basically exploits the existing technology and protocols of the Web, including HTTP (Hypertext Transfer Protocol) and XML. REST is easy to use than the well-known SOAP (Simple Object Access Protocol) approach.

Filter by
Sorted by
Tagged with
2
votes
1answer
60 views

Stock data REST API extractor with GCP storage options

I'm currently working on an AI-driven trading system, the code below aims to extract ticker data from polygon REST API, this is a paid service so, in order to test the code you will need to subscribe /...
-2
votes
0answers
27 views

PHP API REST with Value Objects - How to log ALL exceptions to a Error array and render it to user? [closed]

I am developing an PHP API REST using Value Objects. I have some value objects as like: ID, Date, Name, etc. When they fail in their construction due to a invalid format or something it throws a ...
2
votes
2answers
82 views

Loan application service based on user credit score

The following microservice is just handling loan application and response the result of the application is accepted or rejected. It is part of my assignment for an interview. The project description ...
2
votes
1answer
71 views

Is this nodejs web-application spaghetti code?

I recently interviewed for a backend developer role at a startup involved in financial products, as a 2020 grad. The take-home assignment they had me submit had a few basic goals and they recommended ...
2
votes
1answer
56 views

Using Node.js, Express, and Express Router to implement a very simple REST API

To learn the ropes of Node.js and Express, I'm trying to implement a very simple REST API. The API says what it should do instead of doing it, so I can focus on the framework's structure. The ...
1
vote
0answers
22 views

User Friendly Comment and Answer System for SharePoint Site

I am seeking help in improving my question and answer system I developed for my office SharePoint site. The question and answer system features two-columns and in the each columns is a table. I have a ...
1
vote
1answer
92 views

What is the common API endpoint architecture using DTO?

Hey I always used to create some pretty messy endpoints and I decided that it's about time to start writing cleaner code, I'll provide an example of how would I design an endpoint and I'll be ...
2
votes
1answer
44 views

Reviewing the file download controller in spring rest

In my project, so this controller is working perfectly, my objective is to read the log file from the server which is created on daily basis, so I have to read the log file which is heavier in size ...
1
vote
2answers
59 views

Return a 404 when a resource is not found in Spring Boot

I wrote this code in order to return a http status of not found to my users in case the resource is not present in the DB. ...
2
votes
1answer
216 views

Spring, Kafka and Mongo how to create a RestController

I'm learning how to use Kafka, I've never used something similar in the past. In my job I was required to create a POC using it and integrate it to Spring Boot and save information on MongoDB (because ...
2
votes
1answer
210 views

Simple REST web service

I am a young computer science student programming mainly in Java. I wrote a simple RESTful web service using Spring Boot Framework and the DDD architecture pattern. The project is a library ...
1
vote
1answer
61 views

Invoicing - calling multiple pages of Api and concatinating the results

I have the following code: It works completely as expected, but I feel there is a better way to refactor it out. The flow is as follows: Call the end point with 1 page Get the total number of ...
4
votes
1answer
57 views

Script to push data from one database via api to another

I'm still a beginner so any pointers to make this code more professional/production ready are appreciated. The tokens and database connections have been anonymized. The script is working, its goal is ...
1
vote
3answers
141 views

Spring boot application web service

It's a web application. It should provide a service for entering data. Data is then evaluated and uses itself another service. It was part of an interview process where I was given that task to solve....
2
votes
0answers
73 views

ANDROID - Receive and manage markers in Google Maps

Recently, I've received negative feedback of interview's test. They say that they need somebody with higher technical level, the quality of the task was not good enough. I upload it here, to request ...
1
vote
1answer
32 views

Symfony rest endpoint for get a number products of one user

I want to improve quality of this symfony rest endpoint (solid principle, Kiss, best practice...) Can you review my code please? Symfony controllController function that return json list of product <...
2
votes
1answer
41 views

Backend for chore management app

This is my first go at Django, so I'm looking first to learn how to make this more idiomatic. Also, is there a better way to set up my tests? To my HTTP status codes make sense? chores/tests.py <...
3
votes
0answers
377 views

C# Rest Client Benchmarking

I build a C# Rest Client library / framework. I noticed that it seemed to be significantly faster than RestSharp for GET at least. So, I decided to put together some benchmarks comparing it to other ...
2
votes
1answer
98 views

Golang REST API that CRUDS in-memory object

Hey everyone I have a very simple go REST API that is running CRUD operations on an in-memory object. I would love some feedback on how I can refactor this code, and how/if I should break this up into ...
1
vote
0answers
446 views

Anything Wrong with This Method of API Versioning Using Flask?

I'm trying to find a sensible way to structure a REST API written in Flask. I'm new to writing such things and I've not seen this structure used anywhere else, so before I continue I wanted to ask ...
2
votes
1answer
108 views

C# REST / Http Client Abstraction

I have a REST library. These are the abstractions. Have I missed anything that a developer would need to use this in a dependency injection / IoC Container scenario? Anything that bothers you about ...
3
votes
1answer
70 views

Centralized REST API request dispatcher

Recently I had to implement a Windows Service that connects to the Shopify REST API and pulls essentially everything new into some SQL Server database, on a hourly basis; I've also implemented a small ...
1
vote
3answers
215 views

Code to pass json data with WCF REST POST

I have a WCF REST POST that has JSON data as input, IService.cs: ...
5
votes
0answers
299 views

what is the correct way to write an endpoint?

Here is a rather large endpoint that I have written in Python using Flask and SQLAlchemy, I was wondering if there are any tips I could get. The endpoint takes a post request which contains specific ...
-1
votes
1answer
51 views

Accessing function of class A from RESTful API that runs in class B [closed]

I have the following code ...
2
votes
0answers
58 views

Ecommerce site shipping data

I have REST API written on laravel and front end on vue.js. It is a dashboard for an ecommerce store where you can connect to post shipment service API to upload order shipment data and get tracking ...
2
votes
0answers
70 views

Web API get data with many optional parameter in .NET Core

I would like to do a refactoring of web API implemented in .NET Core. The Goal is to simplify ...
5
votes
1answer
149 views

Testable REST API Client

GitHub and NuGet Allows to invoke public/private REST API just by defining an interface. 200 lines of C# in total. Demo Sample API is publicly available at http://jsonplaceholder.typicode.com: <...
7
votes
3answers
263 views

Unit testing a REST API in Go

I am learning Go by writing a simple CRUD REST API using gotilla/mux and Gorm. I would like to get some feedback on the application code and on unit tests in particular. Please suggest me what to ...
5
votes
0answers
109 views

Using ClientFactory-pattern with Dependency Injection

I initially posted this on Stackoverflow but was recommended to try here instead. I'm looking for feedback on why the implementation of my ClientFactory is probably bad, from a Dependency Injection-...
2
votes
1answer
54 views

REST call helper function returns empty response on timeout errors [closed]

Please review my code where I want to handle the timeout errors and send parsed JSON response if any. There are times when a POST request does not ALWAYS return JSON code. ...
3
votes
1answer
3k views

Simple Banking application in Spring boot, JPA, REST where balance can be transferred among predefined accounts and transaction history retrievable

I want to create a very simple banking application where (i) predefined accounts with a positive balance can send money (ii) requesting balance and a list of transactions can be found. I have ...
3
votes
1answer
308 views

Rest Api with generic crud operations

I am learning how to create a rest api in which I've decided to use generic for crud operation. I am attaching the code which I have written so far. Please have a look. Thanks for the review in ...
6
votes
3answers
169 views

Generic method to call API functions with simple retrial on errors

I have to develop a small security management application that relies on a Web API. Based on that API, I have generated the REST client classes (Open API generator), but I still have to code on top to ...
1
vote
1answer
85 views

Simple CRUD back-end for an inventory-tracking web API

This is the simple back-end, albeit crude, that I made for a React Native mobile app project as a proof of concept. It's a basic CRUD for tracking supply inventory. The "shopping list" is items with a ...
3
votes
0answers
55 views

HTTP Delete,Put,Get,Post REQUEST java-ee RESTful services JPA CDI EJB

I am creating introduction app to java ee and APIs of java ee and i want know if my code is ok (like its working but if it could be done better) and what should i avoid in future ...
2
votes
1answer
51 views

Simple Go REST API that returns dummy messages

I am a learner in Go and wrote example below in a day so I would like to get some suggestions to improve it. It is a simple rest api that currently just accepts request and returns a dummy message. My ...
2
votes
1answer
73 views

Spring RESTful API handling errors

I made a Spring RESTful api as backend for a website. I would like to get feedback on coverage of errors and the response I return accordingly, am I using the status codes correctly? Basically ...
2
votes
1answer
60 views

418 I'm a TeapotServer for RESTful integration-tests

I created a test-server for RESTful integration-tests that I call TeapotServer because I like the status-code 418 that the ...
3
votes
0answers
60 views

Rest API in a trimmed model

I practiced my Java knowledge in the last couple of days. For that, I want to create a Rest API in a trimmed scale, because there a lot of aspects which must be considered in such an API (Login, ...
1
vote
1answer
47 views

Optimizing calls for reauthentication by caching tokens and cookies

I am currently developing a REST service in ASP.NET Core 2.2 that acts as a wrapper upon a REST API provided by a reporting solution. The reporting systems REST API authenticates the user based on a ...
2
votes
1answer
40 views

REST API stored in a MongoDB Atlas Database

I am building my first REST API using data stored in my MongoDB Atlas Database. I tried to read the REST API conventions with the versioning, using plural nouns for resources and sending the right ...
1
vote
0answers
22 views

Trigger sirens on cameras in remote locations

Web-app summary: I'm a complete beginner in web development and I made a sample web application that can trigger sirens on security cameras located in remote locations. Here's the functionality seen ...
1
vote
1answer
67 views

Sign-up serialization in Python [closed]

I built a small project using Django-Rest-Framework. Please comment on the best practice style for the code below, which will make it simpler. ...
3
votes
1answer
84 views

Most efficient way to check if user is allowed to update an object

So I have an user which can create his own Locations. I implemented a webservice in order to add and update locations. If the user is not the owner of the location i want to throw an appropriate ...
7
votes
1answer
175 views

Build a set of REST interfaces using Symfony framework

I have got a technical challenge from a company but they reject my code and I'm not sure how to do this challenge in a more efficient way so I'm here to get some guidance. The Technical challenge was:...
5
votes
2answers
361 views

HttpClient reusable instance for simple calls on another methods

I wrote a HttpClient instantiable class that will be used as reference to simplify API calls in other methods inside other classes, so the user could call it in a ...
1
vote
0answers
18 views

Response structure with populated fields

I am working on a backend for an application using a microservice framework with Sequelize and it is populating in the following way (it does based on the table field): ...
3
votes
0answers
105 views

Node.js tool to update Cisco UCCX with CSV data

What this tool does update skills for agents on a Contact Center Cluster (Cisco UCCX). The tool reads a csv file called agents.csv from the current working directory. This file has a list of agents ...
6
votes
2answers
2k views

Speeding up Excel distance calculation using Bing API calls

I am writing VBA in Excel to calculate the distance between an employee's home address and work address using Bing Maps API calls. The process follows this general flow: 1) Convert the employee's ...

1
2 3 4 5