Questions tagged [web-api]

Specific APIs that communicate over web protocols, such as ASP.net Web API, as well as APIs that are exposed to web pages for network communication or apps for device communication

Filter by
Sorted by
Tagged with
0
votes
1answer
151 views

Should a Java wrapper around a 3rd party product's API be packaged as a Bean?

For the sake of personal use and for the educational reasons I wanna make a Java wrapper around a certain service's web API. That is, no additional software is required to use it on a client machine - ...
1
vote
0answers
401 views

How to side-load data using web api and entity framework?

I am working on a web api c# project using onion architecture and repository pattern and entity framework among other things. Doing some research I discovered a technique called side-loading https://...
19
votes
1answer
11k views

Why do Microsoft's libraries depend on Newtonsoft.Json?

This had probably started way back when Microsoft created ASP.NET Web API library, at least that's when I remember it if I am not mistaken. Anyway, since then, its HTTP packages started depending on ...
0
votes
2answers
976 views

Web API vs Entity Framework with Repository Pattern using Xamarin

My team currently has a WPF application that runs on PC just fine. It utilizes Entity Framework 6 with the Repository/Unit of Work pattern that talks to Azure for the database store. We service a ...
0
votes
1answer
2k views

How can I safely expose web API endpoints for user-private data?

I'm building a web application wherein users CRUD their own private data. Can I safely expose API endpoints? Despite years in-industry and endless web-research, I'm not clear on the best ...
3
votes
1answer
212 views

API versioning, where to point unversioned API

I always see the discussion when there's an API version in the URL where to point the versionless one. I mean look at these three URLs. http://host/api/customers/1 http://host/v1/api/customers/1 ...
18
votes
2answers
8k views

Isn't CQRS overengineering?

I still remember good old days of repositories. But repositories used to grow ugly with time. Then CQRS got mainstream. They were nice, they were a breath of fresh air. But recently I've been asking ...
3
votes
2answers
115 views

How to test a web app (inc write paths) for acceptance or integration tests, without db access?

We are having problems in testing routes that modify the data in our API. For example the test that deletes a resource will fail if run the second time. Also due to business logic you can't create ...
0
votes
1answer
1k views

Should client-side model contain foreign keys to extract data already on client

I'm currently building the front-end of an application using AngularJS. I don't have a whole lot of knowledge about the back-end, but some of the data I'm being served by the back-end developer is ...
2
votes
2answers
3k views

Logging Implementation in a project using a class library or a web service

I'm currently working on a requirement to implement logging in multiple projects and require to develop a enterprise level logging application that can be using in n number of projects. Present ...
3
votes
1answer
1k views

How to name method specific DTOs representing the same entity?

I'm building a Web API. To give meaning to my controller methods I want classes that specify what properties are used for each particular operation. This would make the code easier to understand, and ...
7
votes
1answer
2k views

Handling events and incoming Web API calls simultaneously

I'm working on a project where I got an architecture with multiple "Microservices" communicating with each other by using an event bus (RabbitMQ). I got an Web API-project set up for each service so ...
2
votes
1answer
1k views

Is there anything wrong with my project structure and naming convention in ASP.NET MVC and Web API?

I wonder if project structure and naming convention which I use in ASP.NET MVC and Web API projects are ok. These technologies are quite new to me, so I don't have my own standards yet. I don't ...
10
votes
2answers
8k views

Can a REST API return multiple resources as one single compound resource?

I'm in the progress of creating a REST API and currently, I'm encountering the following problem: Foo is the first resource. CRUD operations can be applied via the /foo/ URI. Bar is the second ...
1
vote
2answers
206 views

Data integration from heterogeneous sources

A client has requested that we build a platform for integrating data from partner to their central data store. This will not be "Big Data" scale. The data from each partner will be accessible through ...
3
votes
2answers
4k views

validation error responses in REST API

I'm designing a RESTful API and wondering what's the best format for validation error messages. For example, my account creation endpoint accepts a JSON object: user: { first_name: string, ...
3
votes
1answer
2k views

Large controllers in ASP.NET WebAPI, How to organize

I have a large WebApi project with a few dozen controllers. Each controller represents an endpoint prefix, just as a normal MVC project would. For example: CarsController.cs represents http://api....
1
vote
1answer
72 views

In which order should page- and pageSize-parameters be used?

I'm building an api and a bit into the development I realized that I constantly change the order of the page and pageSize parameters. Currently I use C# and javascript, so the method declaration ...
6
votes
2answers
6k views

Good practice for status code returned by restful API when validating a token

I am working on client JavaScript SPA and a restful API on HTTPS. Client application needs to call a public endpoint (no token required) in order to valid (GET) a specific TOKEN previously remember ...
1
vote
2answers
940 views

Complex query for resource

Say I'm offering a REST'ish API that offers you Meals Now If you want to get ALL meals naturally you get it through something like: GET /meals if you want to filter those meals you can do something ...
1
vote
0answers
357 views

Are there any performance considerations when reading web.config AppSettings?

I'm writing a REST service with Web Api. One of the actions reads an AppSetting value from the web.config during execution. I would assume the web.config is loaded into memory, but during high load, ...
5
votes
4answers
14k views

How to handle large array operations in Javascript?

I have two Float32Arrays each one of which is 1.6*10^7 in length(floating point array). Using JS I retrieve them from server and add them element by element. My webpage stops responding and I get the ...
0
votes
1answer
156 views

RESTful way to define an API that requires two keys to return a resource

In my application, I have resource A that is super class and A1, A2 that inherits A and other properties that are specific to them. A cannot exist by itself, it must be either A1 or A2. This is a ...
14
votes
3answers
14k views

How to design a REST API to handle non-CRUD operations?

I'm trying to convert a set of SOAP-based services to a RESTful API. I started by identifying resources by analyzing operation names and I got the resource Subscription. When I need to update the ...
1
vote
0answers
48 views

Does Facebook Mobile Application call Graph API directly?

Does anyone know that Facebook mobile application is using their Graph API directly? or they create another layer specifically for handle their mobile application? Thanks.
12
votes
3answers
16k views

Is it bad practice to use hyphens in JSON keys?

I see a lot of questions revolving around accessing JSON keys that use hyphens (kebab-case), but now I find myself wondering should I just stick to camelCase or snake_case in my keys. I know hyphens ...
1
vote
1answer
75 views

List of Domains offering Web-mail services [closed]

I want to maintain a list of domain names that provide web-mail services. I searched and received a list of 1634 domains(Free Public web-mail services) However, is it possible to get updates, if any ...
1
vote
0answers
71 views

Implementing real world Consumer-Driven Contracts in a single web application

I've been leaning towards the idea of Consumer-Driven Contracts in order to allow separate API consumers evolve on their own. To approach this concept initially I'm tempted to dip my toes in slightly ...
0
votes
0answers
59 views

Syncing file data and form data uploaded at separate times

I have a web application where users can upload office documents. In addition to uploading files users also specify extra information about them that's not contained in the files themselves but is ...
2
votes
2answers
247 views

The best way of handing a form post as an API type of submission

I have recently been tasked with a project to create an API that handles a form post using PHP. I have never done something like this before and this will be handling payments so I would like to do ...
3
votes
1answer
797 views

What is the most sensible design for making files available for download from a URL?

This is what I need to do, in a nutshell: Generate Excel spreadsheet files (programmatically). Store these .xlsx files in a location where they can be accessed by users later. These files need to be ...
6
votes
2answers
3k views

Whether to embed linked resources in REST API

I am building a REST API where clients can query user-sent messages, like this: GET http://example.com/api/v1/messages?from=0&to=100 Response: [ { "id": 12345, "text": "...
3
votes
2answers
2k views

Best Practice for masking Credit Card informations in Web Api 2

In an Asp.Net Web API 2 project, We're logging every http request and response with log4Net. Some controllers have critical parameters such as "CreditCard, CVV, Month, Year" etc. This data should not ...
1
vote
1answer
1k views

Project structure for Web, Api, DAL and ViewModels

I have a ASP .NET WebApi and a Web Project. I'm about to create a DAL class library... Which will be my codefirst/POCO's or possibly edmx files. I'm wondering do I need to have another class library ...
0
votes
1answer
995 views

multiple api calls vs more complex apis

I have been providing a Web API (.NET MVC 5) of an Oracle Database to people who are making a mobile app. I have to admit that I am not very good at it. I have found that I can easily produce Data ...
-1
votes
3answers
1k views

What is a correct way to exchange information between “frontend” and “backend”? [closed]

I am not so experienced in client-server applications and I could not find exactly answer to my question anywhere in google. I am developing part of application on server side and my collegue who ...
1
vote
1answer
232 views

Is there a way to download Google's voice recognition API so it can be used offline? [closed]

I'm playing with Google's voice recognition for a personal project and I have a fun little Q&A program written in Python using it. The problem, as it were, is that it means I have to be connected ...
5
votes
1answer
701 views

Architecture for Web application to monitor remote servers

So I'm a relatively new programmer, attempting to create a web application (ASP.net) to display the system information (E.G. Status of windows services, disk & resource usage and errors in event ...
1
vote
1answer
640 views

How to handle file uploads express (UUID / location)

I am building a community website with a NodeJS express backend and a mysql database. Now I am up to the point where I want to store profile pictures of users and pictures related to specfic questions....
6
votes
2answers
12k views

How to correctly implement key=value storage REST API

I'm new to REST API, so I decided to get familiar with it by designing a small web service API. I have its design written down and would like you to review it. I feel like I have made some mistakes in ...
2
votes
2answers
112 views

Implementing a method that never returns the same data twice

I have a mobile application which retrieves x number of ContentItems from a Web API, however I need a way to only display content that the user hasn't seen before on screen. (Just to be clear, the ...
3
votes
2answers
144 views

Change database based on request origin

I am developing a web application which will be run by multiple companies. Each company will have its own instance of that web application and its own database. The web applications and databases ...
7
votes
2answers
1k views

How do you organize API endpoint contracts

Where trying to improve the "confidence" we have in our inter-service communication. Background: "Contracts" has been a matter of sharing a piece of code that defines an interface to implement, but ...
1
vote
3answers
741 views

Soap vs. rest - a hybrid approach? [closed]

I have a proper SOA architecture, with web services defined with WSDL and responding to SOAP requests. But this application has also an endpoint that responds to json request and replies in json ...
-1
votes
1answer
164 views

Can I use data from the Amazon API in my App? [closed]

I'm having a hard time finding information on this, but using the Amazon API (such as the ItemSearch api) provides you with data on Amazon products. In my case I am interested in books. The Amazon ...
0
votes
1answer
715 views

Should API DTOs be shaped to client(s) or be universal?

I have a project with an internal desktop client app and a server-side client API service talking to a relational database. I seem to have two choices: 1) shape DTOs to client views, e.g. ...
2
votes
1answer
640 views

C++ HTTP API Design

I have a massive library written in C++ that handles a lot of mathematical operations, using C++ makes it fast and in all honesty, I don't want to re-write the whole functionality. I am thinking ...
1
vote
0answers
78 views

Alternatives to setting up an API system

I want to launch a service that could support integration by third-parties. Unfortunately it’s way out of hand to build an entire API by now. Here’s my question: Would there be any possible solution ...
5
votes
2answers
1k views

In Web API is it a good practice to wrap the results with my model? [closed]

I have a Web API, and I'm thinking if it's a good idea to always wrap the result with a my own result model which will always contain specific structure like: { Data:(of type T generic), Messages:...
1
vote
1answer
962 views

API Breaking Changes

I have a public REST API for creating new business profile records in my system. The request itself looks similar to this: { "BusinessName" : "AName", "CurrencyCode" : "USD" } You can see ...

1
3 4
5
6 7