What is API in controller like ESP8266?

Hello,

I have a doubt regarding API in esp8288.
I have visited many website but not get clear solution.
My doubt is , manufacture is provide a API doc, what its use?
Can i modify it?
Arduino use API functions?
Any relation with REST API?

thanks.

your questions are unclear.

the ESP8266 is available with various firmware. You can find the Latest ESP8266 SDK based on FreeRTOS, esp-idf style on gitHub.

This firmware exposes base level functions (API is documented here) that are being used by additional libraries in the Arduino World or that you can use yourself

The non-OS SDK provides a set of application programming interfaces (APIs) for core ESP8266 functionalities such as data reception/transmission over Wi-Fi, TCP/IP stack functions, hardware interface functions and basic system management functions.

A REST API would probably be more related to a specific program you write, which would expose to the internet simple URL with parameters that you could use to control your app through http requests.

woundr:
My doubt is , manufacture is provide a API doc, what its use?
Can i modify it?

API is short for Application Programming Interface and it is the set of functions that are used to control something. Normally the user will not modify the API.

The concept of API can exist at different levels. For example there is a list of commands that an Atmega 328 microprocessor understands. These are built into the silicon of the microchip and nobody can change them.

Using those basic commands other people will create a higher level (i.e. easier-to-use) set of commands (API). The Arduino commands such as digitalWrite() and pinMode() are examples of these. This level of commands exists as programs and anyone who has access to the source code can change them. The source code for the Arduino commands is included with the Arduino IDE.

Another level is the various libraries that are available to use with an Arduino - for example the AccelStepper library for controlling stepper motors. That library gives you a set of high-level commands (an API) such as runToPosition() that make it easy to control a stepper motor. The source code for most Arduino libraries is available and can be modified.

However, unless you are an experienced programmer it is both simpler and wiser to use the various APIs as already created.

...R

the much more important question is what is your END-goal?
I guess your question is completely irrelevant to what you want to do IN THE END.
What is the FINAL purpose of your using an ESP8266?

So please give a detailed description of what you want to do IN THE END
best regards Stefan

The API for ESP8266 is the AT command set it uses.

hzrnbgy:
The API for ESP8266 is the AT command set it uses.

You can also completely re-program them and not use the AT command set.

...R

You can write programs with the arduino-ide the exact same way as programming an Arduino. This means the ESP8266 can REPLACE the whole Arduino and do ALL the stuff an Arduino can do

You can also completely re-program them and not use the AT command set

Then it's no longer called an API at that point. API is normally provided by manufacturers if they don't want you (the user) messing around with the inner workings of their devices. They expose an interface that allows you to control/talk to their devices, but not "re-program" it.

« Arduino » did not reinvent the firmware. It’s still there as per my link above.

hzrnbgy:
Then it's no longer called an API at that point. API is normally provided by manufacturers if they don't want you (the user) messing around with the inner workings of their devices. They expose an interface that allows you to control/talk to their devices, but not "re-program" it.

Nonsense! There are multiple APIs for the 8266. The AT API is just one of them.

And it is the worst, most limited, one...

So what are the other APIs for the ESP8266? No don't get to say the word "Nonsense" without backing it up

hzrnbgy:
So what are the other APIs for the ESP8266? No don't get to say the word "Nonsense" without backing it up

Go read #1

"Nonsense" is here.

Then it's no longer called an API at that point.

API are at all level - that's what's exposed by any Application to allow an external process to get some actions done. It's described by the acronym "Application Programing Interface". It does not real "Low level hardware abstraction layer" or "ASCII command line interface"... So you can call An "API" whatever is a way to share information, specifying what information can be requested, how requests are made, and what is returned (data or an error message). The API lets you send an inquiry or 'Call(s)' and receives a response or 'Return(s)' with data.

here is the wikipedia entry

An application programming interface (API) is a computing interface which defines interactions between multiple software intermediaries. It defines the kinds of calls or requests that can be made, how to make them, the data formats that should be used, the conventions to follow, etc. It can also provide extension mechanisms so that users can extend existing functionality in various ways and to varying degrees.[1] An API can be entirely custom, specific to a component, or it can be designed based on an industry-standard to ensure interoperability. Through information hiding, APIs enable modular programming, which allows users to use the interface independently of the implementation.

The AT command language is one, but the OS used on ESPs exposes a much richer API set, and there are low level APIs and then drivers at higher level, with hardware abstraction layers etc... so every layer has its own API all the way down to the physical hardware

exposed by any Application to allow an external process to get some actions done

The API lets you send an inquiry or 'Call(s)' and receives a response or 'Return(s)' with data

API all the way down to the physical hardware

The closest thing to an API on the physical layer is a hardware button. But that is exposed by an already running application, hence the "A" in API. Source codes and libraries are not APIs, they are source codes and libraries.

Source codes and libraries are not APIs, they are source codes and libraries

agreed. but that's irrelevant.

In the definition (whatever it's worth) you have "defines interactions between multiple software intermediaries"

So what a library exposes as a "computing interface" meet the definition. For a class, the public methods "define(s) the kinds of calls or requests that can be made, how to make them, the data formats that should be used,..."

So you can say that's the API offered by a Class for example.

The Serial class for example drives the low level hardware which operates (through interruption) somewhat independently from your code. I'm not shocked to say that Serial offers an API for the UART.

if you disagree with the definition, then offer yours in wikipedia and see if the rest of the world agrees.

Turtles all the way down.