Questions tagged [rest]
REST (Representational State Transfer) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. It has increased in popularity relative to RPC architectures such as SOAP due to the intrinsic de-coupling of client from server that comes from having a uniform interface between heterogeneous systems.
92,955
questions
0
votes
0
answers
8
views
Showing nothing in api-docs while creating Swagger API documentation
The problem is that api-docs is being generated when I don't add .type() and .outType() but the format of the post request is not there. After adding them just like in the below statement api-docs is ...
-2
votes
0
answers
25
views
REST services: why should I bother with supporting multiple resource representations?
I'm trying to wrap my head around REST principles, and the multiple representations principle confuses me. It'd appear to me that server side could be greatly simplified by having a single canonical ...
0
votes
0
answers
11
views
Fetching products from external api supplier
I have a partner who owns a warehouse with thousands of products. We want to connect our Magento 2.4.5 store to this partner so that we can sell their products using our Magento 2 store. The partner ...
0
votes
1
answer
27
views
Get LocalDate from the @RequestBody, convert it to dd/mm/yyyy format, convert it back to LocalDate and store it in the database
I am creating a Rest API applicaton which tracks users` expenses. I have date variable of type LocalDate and the default format is yyyy-mm-dd but I want to store dd/mm/yyyy in the database
what I ...
-2
votes
0
answers
16
views
WhatsApp ChatBot Integeration with Wix [closed]
We manage eCommerce orders via a Wix-hosted website where order details appear on our Wix dashboard, allowing admin to assign deliveries. Now, we've added a WhatsApp chatbot for orders, and we need ...
0
votes
0
answers
26
views
ADF copy activity for REST API POST requiring string value in request body field
I have a ADF copy activity where my source is a REST API POST statement to a report process in one of our data sources. I have the parameters for the report stored in a SQL server table and I am ...
0
votes
1
answer
23
views
can not access rest API running in docker container
I have a REST API built in .net 8. When it runs on my machine, I can test it using Postman (http://localhost:8009/api/...) without issue. But when I running it from inside a docker container, the ...
1
vote
2
answers
34
views
can't iterate over array created in service - async issue?
I create an array of Items like this in my service:
items: IItem[] = [];
...
LoadItems() {
this.GetItems().subscribe((res) => {
// console.log(res);
if (res.status ==...
0
votes
1
answer
33
views
How to make .NET framework 4.8 versioning work with Web API
I am working on a .NET framework 4.8 Web API project and I'm trying to enable versioning on the REST API endpoints. All the endpoints are broken and I am unable to figure out what is wrong. Can anyone ...
0
votes
1
answer
21
views
How to call https.patch in Netsuite to update Salesforce record?
I am trying to update custom 'city' field in salesforce customer record using user event script. Patch is supported in salesforce to update records but does not support in Netsuite.
I have created ...
1
vote
1
answer
30
views
Reduce Flask-API downtime in IIS
I'm using waitress to serve a Flask Python API in IIS 10.0, with the purpose of serving endpoints for reverse image searching.
The initial part the script deals with importing a number of large files, ...
-2
votes
1
answer
30
views
How do I remove the "d" node from the GET Response
My team provided me a GET called. However, the response contains a "strange" d node. I tried to ask them for help and they asked me to use XML instead (I know). I am here to see if ...
0
votes
0
answers
5
views
Send IformData as a field within Postman
This is my postman setup;
for the request object;
public class UploadRequest
{
public List<IFormFile> File { get; set; }
public int EntityType { get; set; }
public ...
0
votes
0
answers
10
views
How to insert a DEFAULT custom header value to all Mock SoapUI REST projects?
I have SoapUI (Open Source Edition) installed on a windows. To test my REST project my frontend send the data to Mock SoapUI and to avoid the CORS issue I need put in the actions 3 headers manualy to ...
0
votes
0
answers
14
views
NextJs router to match Forms
I have a basic app that posts an object to the back end.
Frontend is nextjs and backend is django, thus backend does not matter for this question
I am sticking to crud/rest as much as I can.
My ...
-2
votes
0
answers
25
views
How to test the JWT validation in spring security
Hello I wanted to create a sample spring boot service with spring security and test it where a JWT Token is passed to a rest api and I need to validate it using filter chain but seems I am missing ...
0
votes
0
answers
15
views
How do I react to errors thrown in the backend in the frontend in nuxt?
I wrote a server REST-endpoint in Nuxt3. Now I want to show a toast message in the frontend, depending on the response I get from it. I want to be able to catch errors thrown in it in the vuejs page I ...
0
votes
1
answer
25
views
How to fix Form Data via XHR returns 400 Bad Request
This is my code, quite simple. just a POST request to my api endpoint with FormData.
but for some unknown reason the api says the data is a bad request. i tested my api via curl and it works fine.
...
1
vote
2
answers
21
views
De-serialize array from RestClient response
I'm able to de-serialize response for "get one" endpoint to desired object type:
import org.springframework.web.client.RestClient;
...
RestClient restClient = ...
-1
votes
1
answer
29
views
"Invalid Login Attempt" error while passing customer id from suitelet to RESTlet
I am trying to pass customer id from suitelet to restlet. but its giving error as Invalid Login Attempt Code 401
Below is my suitelet script. Please Help!
/**
@NApiVersion 2.x
@NScriptType Suitelet
*...
0
votes
0
answers
15
views
Is Async Call Applicable when there is a single rest call?
I am implementing a simple project in Python where I make one Rest call to fetch some JSON response, manipulate that response, and display the result.
Step 1: Make a Rest call, get a response
Step 2: ...
-1
votes
0
answers
20
views
How do I create a REST API for a project for a hackathon using django which I have no experience of?
I have to create a REST API for a project in django for a hackathon, I have never created one. I have worked on basic django projects but have not built an api.
I tried following along a tutorial but ...
0
votes
0
answers
11
views
Python Flask Reqparse failing to return help message on bad request
I am building a simple API and using reqparse to parse the args on a post request as follows:
reservation_post_args = reqparse.RequestParser()
reservation_post_args.add_argument('property_id', type=...
0
votes
0
answers
29
views
Coinbase Advance Trading API returns "Error: account not available" when placing orders
For the past while I have been trying to get this crypto trading bot to work. The problem is that while I can get/list accounts when I place an order I get a 400 error.
The code:
def place_order(...
0
votes
0
answers
37
views
Why do i get random characters as a response to my curl get call in php?
I am trying to get a list of deliveries using this GET call:
https://datalink.hconnect.digital/api-products/basic#get-https-//api.hconnect.digital/ecs/v2/deliveries
Here is a picture if the link is ...
0
votes
0
answers
20
views
How to easily expose endpoints in a format like Spring Data REST?
I use SDR in our project and it generates hundreds of endpoints, but whenever I create a endpoint manually i struggle to make all those links to all the entities, is there an easy way to do this ?
My ...
-2
votes
0
answers
32
views
Why my rest api call is slow while reading and writing to a file [closed]
I am trying to upload an inputstream using below code
@PutMapping(value="/fileupload", consumes={MediaType.APPLICATION_OCTET_STREAM_VALUE}
pubic ResponseEntity<String> uploadFIle(...
0
votes
1
answer
22
views
restful sub-object best practices for GET method
I'm facing with a frequent restful api design issue, and i'm not sure about what to do. Actually i can't find any best practice/clue to know how to proceed...
for GET routes, for example, I have :
api/...
0
votes
1
answer
19
views
Unable to Fetch Firestore Data Using Nested Collections in Flutter
I'm having trouble fetching data from Firestore using nested collections in a Flutter application. The data is structured as follows:
users/{userId}/tests/{testType}/test_set/{testSetId}
Image of data ...
0
votes
2
answers
24
views
How setup Date field with validation
I use adobe rest API v6. I want to send an agreement to an user with Date field and the date field should have validation. I send the following json. User can see a text field but without formatting. ...
-1
votes
0
answers
23
views
REST API But Have Category
Im working on TMDB Api with .NET Core MVC. I want to list all movies on my Home page and I did , its okay. Than I need to list categories( action,horror,comedy etc) on another page like category page ...
0
votes
1
answer
20
views
Spliting the input csv based on number of users in jmeter
I have an API which implements a Hit and Miss Cache approach. It is fetching data from DB to store in the cache.
I want to perform a performance test on the API where I send a unique record in every ...
0
votes
1
answer
34
views
Unable to create view from models, created from complex JSON classes
This is my string in index method. I am trying to convert my JSON string to object of MultipleClasses and want to display in my view. But unable to do that.
if (response.IsSuccessStatusCode)
{
...
-3
votes
0
answers
46
views
Cant Access Variable through Promise when using async function to fetch from an api [closed]
async function LoadPortfolios() {
const result = await fetch("http://localhost:8080/Investor/" + globalInvestorId + "/Portfolio",
{
method: '...
0
votes
1
answer
49
views
Pagination error for rest api in azure data factory
Data preview pagination
Copy Data SQL
I am trying to copy some data from the rest api into the sql database but i'm only able to copy 20 items (first page) when i debug the pipeline. But there are ...
-1
votes
0
answers
35
views
How do I resolve client-side problem with JWT unauthorized 401
I am learning Expressjs, so today i was looking at bcrypt, jsonwebtoken. so i created this after all the readings but after login the server console has this
> [email protected] ...
1
vote
1
answer
35
views
Go REST API HTML Template File: Undefined API POST Route
When I search for quotes in my database in an admin page through my Go REST API, quotes show up fine with editing fields for their text, author, and category populating. However, the issue is that ...
0
votes
0
answers
71
views
Delphi REST POST with multipart/form-data
I need to implement in Delphi a requested REST POST satisfying the following conditions:
Must include a custom header
Payload must be sent as multipart/form-data
The URL must contain the parameters
...
-1
votes
1
answer
24
views
Difference between a collection and a store in the context of REST API [closed]
What is the exact difference between a collection resource archetype and a store resource archetype in the context of REST API, I have been reading this book called REST API Design Rulebook and not ...
-1
votes
1
answer
18
views
Redis client initialization Issue in Node Js application
I have a simple backend application built with Node.js.
The directory structure as below
and this is GitHub Repository Link
here below is the code of server.js file
// server.js
const express = ...
-2
votes
0
answers
24
views
Sync discount codes in two Shopify stores
I currently manage two separate Shopify stores and I'm looking for a way to sync the discount codes between them. My goal is to ensure that whenever a discount code is created or updated in one store, ...
0
votes
0
answers
50
views
I set a cookie on the server in the login handler, but the cookie is not set
It's my cors headers:
r := chi.New Router()
r.Use(cors.Handler(cors.Options{
AllowedOrigins: []string{"https://SECRET.COM", "http://SECRET.COM"},
AllowedMethods: []...
-2
votes
0
answers
37
views
Where to write queries in rest api, and how to secure it [closed]
I will make an application with Flutter. With Django, I will make a rest api to send data from mysql. I have never made an api before.
In the tutorials I found, when I go to the api url, the whole ...
0
votes
0
answers
24
views
User ID not found in UserDefaults or invalid UUID string
I am trying to display previously created events on my calendar page using a fetch events function. I have made an api that has a route to fetch events from my database. In my database, when an event ...
0
votes
0
answers
13
views
How PUT state idempotency works after DELETE
is the following a correct way to see how Idempotent works for a REST PUT
Given X is a request
Context_N indicates information about the context in which the operation is execute, but do not influence ...
0
votes
0
answers
25
views
How to implement a conditional one-to-one relationship with Identity/Entity Framework/ASP.NET Core
I am having trouble determining how to implement the following scenario in an ASP.NET Core Web API using Identity and Entity Framework:
If an AppUser is given the Performer role when it is created, ...
0
votes
0
answers
14
views
Test Fails after Establishing Connection to Database
I have a repo for a node app that uses an object to store the data temporarily. I updated the code to connect to MongoDB and some of the tests start failing.
The test is one with supertest.
The code ...
-2
votes
0
answers
26
views
Using Spring beans inside a Rest @Controller [closed]
after migrating from spring 3 to 5 i can't do this anymore in a rest controller:
@Lazy
@Controller
@RequestMapping("/Portability4CtRestService")
public class Portability4CtRestService ...
1
vote
1
answer
33
views
Access HTTP Trailer in Quarkus
I'm implementing a REST-API in Quarkus and want to stream the content.
I want the know when the tranpsort of the stream is finished. As the http-standard describes, http-trailer fields will be sent, ...
0
votes
0
answers
19
views
how to add authorizer for a aws serverless NodeJS application
I have created the nodejs rest api using serverless framework. The application is very similar to the below template. I have created a custom authentication as a separate service i want include that ...