Questions tagged [api]

DO NOT USE. Use specific tags like [google-cloud-platform], [facebook], [amazon-web-services] instead or [api-design] where applicable. Questions asking to recommend or find an API are off-topic.

Application Programming Interface (API) is a source code based specification intended to be used as an interface by software components to communicate with each other. A good API makes it easier to develop a program by providing all the building blocks. A programmer then puts the blocks together. An API may include specifications for routines, data structures, object classes and variables.

An API specification can take many forms, including:

  • an International Standard such as POSIX,
  • vendor documentation such as the Microsoft Windows API,
  • the libraries of a programming language - e.g. Standard Template Library in C++ or Java API.

An API differs from an ABI (Application Binary Interface) in that the former is source code based while the latter is a binary interface. For instance POSIX is an API, while the Linux Standard Base is an ABI.

Source: Wikipedia (Application Programming Interface)


Questions asking us to recommend or find an API, documentation or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam.

Link to the API Burninate Request

107148 questions
12
votes
3 answers

How can I disable some APIs of my ASP.NET application

Let's say that I have a ASP.NET application that have some APIs. For example, {HostName}/api/a/* {HostName}/api/b/* Now I want to disable all {HostName}/api/a/* APIs(But remain /api/b/*). When client call /api/a/* APIs, they get a 404 error.…
Mabraygas
  • 199
  • 1
  • 2
  • 13
12
votes
6 answers

Fix bugs in library code, or abandom them?

Assume i have a function in a code library with a bug in it i've found a bug in a code library: class Physics { public static Float CalculateDistance(float initialDistance, float initialSpeed, float acceleration, float time) { //d =…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
12
votes
7 answers

Android Volley Request Identity onErrorResponse Section

public void getTestDats(String unique_id) { final String tag = "testList"; String url = Constants.BASE_URL + "test_module.php"; Map params = new HashMap(); params.put("user_id",…
comeback4you
  • 716
  • 1
  • 8
  • 24
12
votes
4 answers

The 'Access-Control-Allow-Origin' header has a value that is not equal to the supplied origin

I am trying to login with ajax to an API and I get this error: XMLHttpRequest cannot load. The 'Access-Control-Allow-Origin' header has a value that is not equal to the supplied origin. Origin 'http://localhost' is therefore not allowed…
Daniel R.
  • 629
  • 1
  • 10
  • 28
12
votes
5 answers

good practice: REST API as the interface between the interface layer and business layer?

I was thinking about the architecture of a web application that I am planning on building and I found myself thinking a lot about a core part of the application. Since I will want to create, for example, an android application to access it, I was…
Mario Duarte
  • 3,145
  • 7
  • 27
  • 37
12
votes
2 answers

Laravel CSRF protection with REST API

I have this code at the top of my routes file Route::when('*', 'csrf', array('post', 'put', 'delete')); When I testing my RESTful API layer I get token mismatch error. How to solve this? I use CSRF protection for regular form submissions a user…
Vijayanand Premnath
  • 3,415
  • 4
  • 25
  • 42
12
votes
3 answers

How to select an item in a TreeView using Win32 API

I am trying to automate a sequence of user inputs to a compiled application in C# using Win32 API. I do not have any source code for the application I am trying to control and it is running while I am trying to control it. In my code, I have a…
user441603
  • 487
  • 3
  • 6
  • 16
12
votes
1 answer

Facebook graph SINCE and UNTIL not working

When I get data from Facebook graph explore with query string act_109418612584009/campaigns?fields=id,name,adsets{id,name,insights}&since=2016-03-07&until=2016-03-08 Result I get is full data (not range in since and until). 2016-03-17: Update Wrong…
killua zoldyck
  • 121
  • 1
  • 1
  • 8
12
votes
2 answers

Robot Framework test scripts fail with SSLError

I have written Robot Framework test scripts in .tsv format to test web-services/APIs. Everything was working fine until today (probably because of the new updates of Robot Framework) when I started to get the following error: SSLError: ("bad…
giri-sh
  • 6,934
  • 2
  • 25
  • 50
12
votes
5 answers

Authorise Pinterest App

I have added a collaborator for my Pinterest app, however, when accessing the colaberators account and clicking on the application there is no 'authorise' button or anything similar. The "You still need at least 1 collaborator to authorize your app…
user3069397
  • 165
  • 2
  • 8
12
votes
1 answer

Android Okhttp asynchronous calls

I am attempting to use the Okhttp library to connect my android app to my server via API. My API call is happening on a button click and I am receiving the following android.os.NetworkOnMainThreadException. I understand that this is due the fact I…
jjharrison
  • 841
  • 4
  • 19
  • 33
12
votes
5 answers

Convert C# Object to Json Object

I am trying to serialize a C# object into a Json object. That will then be submitted to the Salesforce API, and create an application. Right now I have the C# object serialized into a Json string, but I need it to be an object. Here is my C# object…
Mowrite
  • 183
  • 1
  • 2
  • 10
12
votes
3 answers

RESTful URL for "Activate"

I have a resource (project) which can be activated and deactivated. What's the most RESTful URL endpoint for this purpose? Right now I'm thinking about /projects/:id/activate and /projects/:id/deactivate, but I don't think that's very RESTful. In…
Neta
  • 871
  • 5
  • 14
  • 30
12
votes
3 answers

Is there raw linux system call API/ABI documentation

There are man(2) pages for the system calls, but these describe the behavior of the C library (glibc) that sits on top of the system calls. Is the raw system call API/ABI documented somewhere (other than UseTheSourceLuke)? I saw some mention of…
ctrl-d
  • 392
  • 1
  • 8
12
votes
1 answer

javax.ws.rs.core.Cookie vs javax.ws.rs.core.NewCookie , What is the difference?

I found two classes in JAX-RS API javax.ws.rs.core.Cookie and javax.ws.rs.core.NewCookie. What are the advantages of one over another? I would like to know Which one is recommended to use and when? Thanks in advance :)
Sagar Pudi
  • 4,634
  • 3
  • 32
  • 51