Tagged Questions
The web-api tag has no usage guidance.
0
votes
0answers
13 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 ...
-4
votes
0answers
38 views
Where can I get a perfect, quick and easy guide/tutorial of JavaScript for free. Basically for Facebook App development using JS SDK [on hold]
I just want to create an app using Facebook API. It will be hosted on my server. It will only have access to data from the Facebook Server. From the www, I have found multiple documents (PDF, video ...
0
votes
0answers
22 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 ...
1
vote
1answer
86 views
+50
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
140 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
37 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
144 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
39 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
52 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
132 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
106 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
156 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
54 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
158 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 ...
1
vote
1answer
82 views
Separating Web API and the client application in .NET [closed]
Up until now I have created my .NET Web API projects with both the API and client code in the same project. In this next project it is important that I separate the two into their own projects.
The ...
2
votes
2answers
87 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
90 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
209 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
227 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
122 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
45 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
64 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
133 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
232 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
127 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
146 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
199 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
188 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
173 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
113 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
285 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
93 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
389 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
299 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
102 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
256 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
222 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
68 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
642 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
49 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
100 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
639 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
1k 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
123 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
364 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)
...
5
votes
5answers
3k views
why do people do REST API's instead of DBAL's?
At the past two companies I've been at REST API's exist for querying data via a web app. ie. instead of having the web app do SQL directly it calls a REST API and that does the SQL and returns the ...
2
votes
1answer
206 views
What is the idiomatic way in REST to handle field level permissions?
REST APIs conventionally expose resources addressed at the object level. While it's easy to do object level permissions using the appropriate HTTP responses, handling field level permissions is a bit ...
2
votes
0answers
111 views
Can an http service queue up work via a timer?
I'll preface this by saying that I'm not particularly familiar with writing http services.
To keep things simple, I'll use the metaphor of creating a collages from images selected by the user. The ...