The web-api tag has no usage guidance.
-3
votes
0answers
60 views
Best way to create a Restful API using PHP [closed]
I am working on a fairly complex project which is an photo sharing app, currently functioning on Android and there is a broken iOS version. The project utilizes SQL/PHP to interact with the ...
4
votes
2answers
238 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
41 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 ...
0
votes
0answers
22 views
Multiple web apis under one domain
I am using ASP.NET MVC and I have a project where I need to build different integration rest APIs for different partners
http://domain.com/api/integration/partner1
...
1
vote
0answers
18 views
From PreAuthentication to JWTAuthorization
I would like to ask about a problem I have designing a security flow.
The context
I have a webapp designed in two modules web and server
Web: it's a single page client, built with Angular 1.5.5 ...
1
vote
0answers
21 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
26 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
211 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
155 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 ...
3
votes
1answer
74 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
181 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 ...
0
votes
1answer
63 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
94 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
164 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 ...
2
votes
1answer
114 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
184 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
95 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 ...
2
votes
2answers
357 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
93 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
94 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 ...
6
votes
1answer
233 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
262 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 ...
0
votes
0answers
169 views
ASP.NET WebAPI 2 Attribute routing and sub folders
I m using Attribute Routing in WebAPI. My question is more on creating subfolders under controllers in WebAPI(Not in MVC, I'm using Areas for that)
I searched what kind of impact, it would cause to ...
0
votes
1answer
52 views
Can I use data from the Amazon API in my App?
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
78 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
143 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
68 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
282 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),
...
0
votes
1answer
166 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 ...
3
votes
2answers
185 views
Making a security on webapi for browser usage [closed]
I have a webapi project working in production for few months now.
The entire webapi is server to server.
There is a need now to have the same functionality in a browser, meaning the customers ...
0
votes
1answer
200 views
AngularJS and ASP MVC
We have started to implement AngularJS in our web-applications using ASP MVC.
I am wondering what approach to use for building application in the future.
Keep using our current stategy: Build the ...
5
votes
3answers
211 views
Designing CRUD part of an HTTP API
This question is in the context of web based applications. A web server
exposing an HTTP api for clients (e.g. running in a browser but not
necessarily). Usually the web server would be connected to ...
2
votes
1answer
176 views
Is it safe to include connection data in token?
When generating a ClaimIdentity for use by oAuth in generating a token, is it safe to include database information as a claim?
My application uses a different database depending on the specific ...
1
vote
1answer
128 views
What is better to return from the controller - a JsonResult or a string?
I have a WebAPI application and I have a controller method which is used to return a json result to the UI.
Now, I can either return a string (because the json is basically a string - and it works ...
0
votes
1answer
342 views
Asp.net MVC web application and iOS mobile app
I am currently writing a web application in ASP.NET MVC, so far it is mostly a simple CRUD web app. The database is hosted on the cloud and I am using Entity Framework to interact with it.
I know ...
1
vote
2answers
108 views
API with limits vs site crawling
I started working on a website,for tracking and rating watched anime/manga/etc. and recommendations, and it should also have an API, for providing the info about series and other things.
On similar ...
0
votes
1answer
583 views
Is Open Data Protocol (odata) Being Widely Embraced by the Development Community? [closed]
EDIT: In case you aren't familiar with odata, here you go.
I am trying to determine whether it is worth learning this technology or if it is something that is not going to catch on.
The premise is ...
0
votes
1answer
321 views
When to implement WCF Rest Service and WebApi
I have gone through many articles to understand why we need WebApi's when we can create restful architecture using WCF rest services but could not find some solid reason. Can we use these ...
0
votes
0answers
121 views
Using REST to get/post/etc polymorphic types stored in Table-per-Type database
I've got a Table-per-Type database something similar to this:
public abstract class WorkItem
{
public int WorkItemId {get;set;}
}
public sealed class CancelingWorkItem : WorkItem
{
public ...
5
votes
3answers
298 views
REST API: Resource Ownership
Let's say there are Users and Pets. Each Pet has a single User as its owner, and a globally unique id. Endpoints could be
/users/1/pets/2
/pets/2
I feel like the first option could be unintuitive ...
6
votes
1answer
2k views
Token or ASP.NET Identity based security in ASP.NET Web API 2
Background
I have a Web API 2 project, without any extension of ASP.NET MVC or ASP.NET projects. The API will only be used to communicate between the server and Windows 8, Windows Phone 8.1 and iOS ...
4
votes
1answer
246 views
Risks of AJAX calls to ASMX
Currently working on an ajax call to an ASP web service (.asmx).
In a situation where I POST to the url/.asmx/WebMethod, am I exposing information of any kind?
In the 'WebMethod' I am running a ...
0
votes
1answer
69 views
REST API - Updating a Variable
If you are updating a variable in a RESTful API, for example person's weight, how should this be laid out?
What I have thought of:
PUT /person/1/weight?weight=150
PUT /person/1/weight
{"weight": ...
4
votes
2answers
774 views
Best practice to handle POST with array of objects if at least one object raise an Exception
I want to POST an array of objects and make an insertion in database concerning each of them.
What is the best practice if one object does not conform and raise an Exception? (cancel all transactions ...
1
vote
1answer
50 views
API authentication with a single ID
A typical API authentication usually rely on a pair of API ID + SECRET, my question is: if the API ID is unique and randomly generated and is considered strong enough (e.g. SHA512), why a SECRET is ...
1
vote
1answer
107 views
Knowing when a SQL table is done updating before Querying
I am using a self hosted windows service WEB API as the layer between my Windows 8 App and a SQL Server Database because Windows 8 apps can't directly connect to SQL server like win forms or pretty ...
0
votes
0answers
682 views
Sharing authorization logic between ASP.NET MVC 4 and WebAPI 2 projects
Pretty similar to this question here the current application that we are working on has a separate MVC 4 and WebApi 2 projects, where the MVC project is processing the user request to the WebApi which ...
15
votes
2answers
2k views
Role-based REST API?
I'm building a REST API for which several users with different roles will have access to the resources it contains.
To keep the scope simple let's take the "student/teacher/class" domain:
GET ...
1
vote
1answer
126 views
Securing a Web Api for individual Users
We currently have a web app (.net MVC 5), user's login using their username and password and then we store an encrypted value in a cookie to authenticate them on future requests.
We are now in the ...
5
votes
2answers
413 views
Should I validate API output?
I'm working on a Web API to provide data to a third party per the specification they provided.
The process for each API call is essentially:
1. Extract data as XML
2. Deserialize data to DTO (POCO)
...