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
4 answers

Java API Design: NumberFormatException for Method that Parses a Semi-Numeric String?

I'm making a library that contains a few methods for parsing string dates and times. I am having difficulty deciding what exception those methods should throw when the string argument isn't parseable. I'm considering several options: 1. …
MB.
  • 7,365
  • 6
  • 42
  • 42
12
votes
3 answers

The REST-way to check/uncheck like/unlike favorite/unfavorite a resource

Currently I am developing an API and within that API I want the signed in users to be able to like/unlike or favorite/unfavorite two resources. My "Like" model (it's a Ruby on Rails 3 application) is polymorphic and belongs to two different…
Ivan
  • 874
  • 10
  • 32
12
votes
1 answer

Flutter: InternalLinkedHashMap' has no instance method 'cast' with matching arguments

I'm unable to find solutions from the previously available question, I have cast json string to map Below is my API calling method. Future fetchEvent( ) async { // here i change Future type String…
Farhana Naaz Ansari
  • 7,524
  • 26
  • 65
  • 105
12
votes
2 answers

Mock Postman request into Axios?

I'm trying to construct my axios to be able to mimic the postman request but failed. Please help to have a look const ax = axios.create({ timeout: 30000, headers: { 'content-type': 'application/x-www-form-urlencoded' } }); // Attempt…
Isaac
  • 12,042
  • 16
  • 52
  • 116
12
votes
2 answers

Problem enabling Uvicorn auto-restart when launching programmatically with uvicorn.run

I'm attempting to get Uvicorn to automatically restart on detected file changes when launching programmatically, as it would when started from the command line with the --debug switch. The following statement is at the bottom of my api source code…
jpjenk
  • 459
  • 2
  • 8
  • 14
12
votes
3 answers

Req.body is not iterable in node.js

I am building mock restful API to learn better. I am using MongoDB and node.js, and for testing I use postman. I have a router that sends update request router.patch. In my DB, I have name (string), price (number) and imageProduct (string - I hold…
Kaan Taha Köken
  • 933
  • 3
  • 17
  • 37
12
votes
7 answers

Pros and cons of commenting systems and APIs (Disqus vs Facebook Comments vs Intense Debate vs Echo)?

With the release of the new Facebook commenting module, could people please share their experiences with the various commenting systems -- specifically, Disqus, Echo, Intense Debate, and Facebook Comments? What are the pros and cons of each…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
12
votes
1 answer

Binance "Event Time" vs "Trade time"

I am looking at the Binance Websocket Stream and have a question about Event time and Trade time. If this is raw trade information, how can there be 2 different times for a "Trade"? What is the "Event Time"? From the github API docs: Trade…
RandyMy
  • 1,013
  • 1
  • 8
  • 9
12
votes
4 answers

Java API for SRT subtitles

Is there any Java API for SRT subtitles ?
firas
  • 1,463
  • 4
  • 19
  • 42
12
votes
1 answer

Oauth with Plumber API in R

I have created a sample function using plumber package. #* @get /tags printmyname <- function(x) print(x) When I run the following procedure. library(plumber) r <- plumb("plumber_Usman2.R") r$run(host="0.0.0.0",port=8000) An API is exposed on…
Rana Usman
  • 1,031
  • 7
  • 21
12
votes
5 answers

Serializer validate function is not called DRF

class ChildSerializer(serializers.ModelSerializer): class Meta: model = Child fields = '__all__' class ParentSerializer(serializers.ModelSerializer): """ Serializer for task """ def validate_title(self,…
sourabhah
  • 424
  • 4
  • 16
12
votes
4 answers

How to send form-data in api using Rest-assured

I want to send below as a form-data in API Body for a PUT request: Upload a file(KEY) with "Error.png"(VALUE) Send text, "MyName"(KEY) with false(VALUE) How to do this using REST-Assured Attached is the screenshot
D Bhatnagar
  • 133
  • 1
  • 1
  • 9
12
votes
1 answer

Laravel Passport: Create access token manually

I'm trying to find a way to create an access token manually in Laravel 5.5 using Passport and can't seem to figure it out. I have 2 applications, one that holds the frontend and one api. The user receives an invitation via mail, and when he accesses…
Catalin I.
  • 331
  • 1
  • 2
  • 6
12
votes
2 answers

REST API PATCH without request body

I'm developing an API for events management. I have the basic GET and POST methods but now I have to deal with the event resource edition. A user can edit all the event information using: PUT /event/:eventId But also it can cancel the event (not…
Elias Garcia
  • 6,772
  • 11
  • 34
  • 62
12
votes
3 answers

Laravel validate array of object JSON

I have a POST endpoint on my Laravel 5.5 API, I used postman to test my route and here is the problem. I want to send an array of the same kind of object, like this: [ { "name":"test", "tag":"TEST" }, { "name":"test2", …
Irindul
  • 398
  • 1
  • 6
  • 21