Newest rest Questions

Q&A for professional and enthusiast programmers

Is it better to separate rest API routes according to permissions?

I am working on a ressource that can be updated using put request to update any fields depending on the request content. I am facing an issue to manage permissions for this route. Some fields can be ...

http POST vs GET request for getting a document sending a XML file

I know for getting a data we have to use a GET request. But this time I have to send a XML document (who will not be stored) for getting the data. What are the best practice in this case ?

How to consume a Spring boot Rest Web Service?

Hello I am new with creating a spring boot rest web service. My goal is to have a UI to pass parameters and retrieve some values. In soap UI I can enter WSDL url. Then manually type the required ...

POST Request in Objective-C with Lyft API Access Token

I'm encountering an issue in retrieving my access token for the Lyft API via an Objective-C POST request (I'm pretty new to POST requests). The Lyft API documentation details this as an example ...

jersey: possible to inherit path from parent class

In the spirit of DRY I'm trying to bundle annotations and shared code that apply to all my REST resources in a central class. Sharing parts of the path does not seem to work. Let's say I have two ...

CURL request for token on R OAuth 1 on Rest API service

I have been trying to hit a paid for API for a while now. I first need to authorize my token/session and then hit the API. I have had no help as R is not supported by the service provider. This CURL ...

Show image in jersey ExceptionMapper

I trying to write custom exception mapper for CompletionException and to show image in case of this excption. This is my mapper: @Provider public class CustomCompleteExceptionManager implements ...

Web services = best way for web and mobile app?

I want to create a web app (full AJAX), iOS and Android NATIVE applications with a MySQL database. I only know web services (RESTfull) but is it the best solution ?

AWS Lambdas and API Gateways on a large scale REST API project?

I am about to start a new project on AWS and would like to use serverless architecture with AWS Lambdas and API Gateways. Does anyone has experience developing large scale web REST API project with ...

Issues with REST-API in parse after migrating to Parse-Server

I am trying to migrate the Parse-server to a Debian Server and I am running into some trouble with the REST-API. When I try to call my application's login-function I receive the following error: ...

Linker Errors with casablanca in VS2015 while trying to build a simple HTTP listener

As part of the learning process about Rest services, i am trying to build a simple HTTP listener using the Microsoft c++ REST sdk "casablanca". My aim initially is to test if it can receive a simple ...

REST API URL with Directory and File name as Path Variables

I have a requirement to send the folder details in the URL for POST method, some thing like this http:///{directory}/{filename} I am using Spring API to create the service. Using @PathVariables to ...

Is there any REST API in Elasticsearch for deleting indices on the basis of index creation date?

I am using time based indices to store log data in elasticsearch on daily index basis. I am looking for the best approach to delete indices which are greater than 30 days old. Is there any API in ...

REST API on files

I'm trying to get an understanding of REST You have a web server which allows operations on files, you can copy, print, merge, translate, delete, etc files (so, basically a whole bunch of verbs on ...

What is the difference between soap and rest? [on hold]

The following statements, which are correct? A. In soap, we can manipulate many resources B. In rest, we can manipulate many resources C. In soap, we can only manipulate one resource D. In rest, we ...

Multiple resources under one request: RESTful API design pattern

I'm trying to create a GET request, where I have two different requests. Since both resources are related with each other, I'm trying to put them under one 'sub-resource'. The first one is: @...

How to encode URL in angularJS

I'm trying to get the data from my Rest API controller using anuglarjs http GET request. However, the params that I need to send include "." symbol which caused the URL failed. I tried to encode it ...

Swagger Controller Mappings

Working with Swagger-API I am trying to set all of my services that start with /crud.* in the same swagger container, but the methods are defined in 2 separate controllers. I know swagger is ...

How to extend the Expiry of a Document DB REST API Resource Token

I am monitoring the entries in a document database collection by means of REST API from a front end application. The RESP API queries for a list of documents in the collection based on certain filter ...

REST PATCH command sent by HTTPWebRequest to Oracle CRM server is throwing an Error “Unexpected Charecter (P(code 80)”

While using REST's PATCH command in C# HTTPWebRequest to update the data of an account on Oracle Cloud CRM, I am getting the following error: StatusCode: InternalServerError StatusDescription: ...

rest api interface for sub types

I am having some trouble coming up with a restful url structure for my admin. In the admin I have "users" but users have subtypes as well - for example: internal staff, client managers, client staff - ...

how to integrate paypal Single Payment in a mobile app using rest api

I am integrating paypal sandbox single payment in IOS app.I am following the below solution. https://github.com/paypal/PayPal-iOS-SDK/blob/master/docs/single_payment.md My First IOS call give me the ...

Django DRF - How to do CSRF validation with token authentication

I am working on REST API using Django and Django Rest Framework. In the front-end I have AngularJs app. I have used Token authentication for APIs. This disables the CSRF checks. I want keep CSRF ...

How to get Response code/Message using Spring AOP (AfterReturningAdvice)

Is there a way to get a response code/message back from a payload using `spring aop. I want to implement AfterReturningAdvice interface and log the response code/message from the rest and soap service....

Method Post Return Null Parameter

I'm creating a Web API with VB.NET MVC. The GET method works perfectly. But the POST method returns "null" even without any treatment in it, does anyone know what it can be? I have a controller ...

Rest-Assured Java Post Request

Is there a way to make the test post request and after that the change to be reverted because it actually makes a real post to the server.

REST put request to update geojson document in MongoDB using Node.js and Mongoose

I've been following a Youtube tutorial on creating a RESTful API (I'm just getting to grips with this field). The tutorial is about books, but I wanted to extend it to support geoJSON as that's my end ...

Android Studio - PHPSESSID decryption

So, I'm using android studio to make an webview application. I have saved the user's email address in cookiemanager. The Issue: So I have this cookie, retreived from my android app, but it's in the ...

DELETE and GET have faulty behavior in a Jax-RS Restful App

I am learning how to implement Rest API through a tutorial project. I am facing a rather strange behavior from a routine I perform in order to test the standard CRUD methods... Here's a general ...

how to POST x-www-form-urlencoded to REST api from swift 3

I have written the following in order to POST to a REST API I've written in nodejs. However I'm getting no response on the server side. func login() { let u = UserDefaults.standard.value(forKey:...

How to print the exact JSON that is received on the server side in a REST call?

I am using fasterxml to convert JSON to java. <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> ...

Implementing Put Block of Azure rest api?

I am following this MSDN Reference (https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/put-block) to implement a rest call for Put Block. I am coding in Java and I formed below ...

Issue with Firebase database REST API URL having character “.” i.e. period

Firebase is not able to store data if any of the node in the json tree path contain character "." i.e period Example https://.firebaseio.com/path/to/node/.json Will store the data in above specified ...

Katharsis 2.8.2 upgrade issue

I upgrade Katharsis from 2.7.0 to 2.8.2 And I found below issue. Katharsis cannot discovery repositories which there is no empty-argument constructor. Temp solution: Add empty-argument constructor ...

WebRequest losing connection

UPDATE So I noticed with Fiddler that my request was redirected. My original request was http and redirected to https. So I fixed my request to be https. Now I get a different error. The remote ...

Output Caching in WebAPI

I'm looking to leverage output caching in a WebAPI HTTP service. The service sets the appropriate Cache-Control headers with MaxAge etc. in the HttpResponseMessage and all of this works fine. There ...

Github scraping for all javascript files

I need to extract all available javascript files over all the projects available on github using python.I looked for an API in github and I found this : https://developer.github.com/v3/ I don't ...

Connecting my rest API with Android Studio using Retrofit by emulator

I have two questions: Why am I getting null for the URL? Am I connecting my localhost to my Android Studio emulator correctly? If not then how can I connect my Android Studio to my local host? ...

Implement Yii2 models to consume API REST as a client

I am developing a Yii2 application that consumes api rest as a service. I want to implement models such as Customer:: represents www.camb.com.ve/api/v1/customer and all the AR actions as verbs so I ...

When do we multithread an android app? How DB connection should be? [on hold]

I have some background in coding, but never coded an android app. So please help me answer some questions I have. When users install the app on their phones, can they access the source code? When do ...

Does anyone know any IQ test questions with answers API ? [on hold]

I'm trying to build an application to test the IQ level an I need questions with answers.

Passing Json to the Web Service

I'm trying to push json data to the webservice; Here is my sample data; { "data" : { "username" : "demo", "password" : "demo1082*098/*42a", "LoginToken" : "...

Gitlab API for return changes in project by user

I looking REST API, which will return the changes made in the project by a given user at a given time. For example: /{repository}/changes/{user}/?dateFrom='2017-01-01T00:00'&dateTo="2017-01-30T23:...

what is the best way of securing Rest Api using spring boot java applicqation?

I want to secure my Rest API , Which is the best way of securing the Rest Api ? I want to use username and password to authenticate in the request header. I am confused with OAuth2 and JWT token. If ...

Posting Json data to AWS cloud service using REST webservices

I want to post data to a platform on AWS. It accepts data only in Json format. I am not using a rest client(Like Advance Rest Client or Postman) because I can only send a single document at a time. I ...

Sabre Create Passenger Record : Authorization failed due to no access privileges

I am trying to use the sabre api for creating a booking (CreatePassengerNameRecordRQ) using the testing credentials, but I am always getting the following error message: { "status": "NotProcessed", ...

Import API not working in sisense

I was trying to use the dashboard import API from v1.0 which can be found in the REST API reference. I logged in to http://localhost:8083/dev/api/docs/#/ , gave the correct authorization token, and a ...

Authenticate a user via Wordpress or Woocommerce REST API

I there a way to authenticate a user (with username / password) through wordpress's or woocommerce's restful api ? I know we can create/update/delete users but haven't found a way to authenticate them ...

Azure API Manager expose all to public, get rid of Ocp-Apim-Subscription-Key

I have some REST API that is proxied over Azure API Management. For some reason I'd like make it available public for all requests. From developer point of view I would like to get rid of setting key ...

HTTP OPTIONS method handling for ACL authorization in Spring Data Rest

This question from 2 years ago - Using Spring Security ACL with Spring Data REST - talks about spring-data-rest and record-based authorization with Spring Security. I'm asking again to see if there ...
Translating... 0%