How to find an API

I’m looking at TTN V3 API (API | The Things Stack for LoRaWAN) but I have some troubles to find my way in the different categories:

  • Authentication
  • Fields and Field Masks
  • Application APIs
  • Application Package APIs
  • Application Pub/Sub APIs
  • Application Server APIs
  • Application Webhook APIs
  • End Device APIs
  • Events API
  • Gateway APIs
  • Gateway Server APIs
  • Gateway Server MQTT
  • Network Server APIs
  • Organization APIs
  • Storage Integration API
  • Tenant APIs
  • User APIs

Can you please explain me how the things are sorted? How do you proceed to find the description of the API that you are looking for?

For example, I’m looking for the APIs to do the following actions:

  • API to get the application list for an account (using a personal API key).
  • For a given application:
    • API to get the end devices list
    • API to add an end device

Thank you!

  • API to add an end device

For this one, I have found the answer in End Device API:

When registering end devices, we recommend registering them in the following order:

** EndDeviceRegistry.Create (Identity Server)*
** JsEndDeviceRegistry.Set (Join Server, only for OTAA devices)*
** NsEndDeviceRegistry.Set (Network Server)*
** AsEndDeviceRegistry.Set (Application Server)*

For the 2 others, I’m still searching.

When registering end devices, I recommend registering them via the CLI unless you are totally sure you have JavaScript under control.

And even if you do, don’t use live data until you are sure it is working.

And do not attempt to delete via Javascript unless you are 110% sure of what you are doing and have tested it on non-live data.

PS, most of us don’t have the API calls memorised, so we too just look at the most likely areas as well or use the search tool at the top of the docs page.

Hey Nick , while I think on it may also be worth reposting the link to your cli overview webpage/tool (for ttn-lw-cli) as useful to many I’m sure - is it updated for latest TTS(CE) builds or still reflecting one of the earlier builds? (3.11 IIRC)

Useful tool IMHO :slight_smile:

Good idea, with only two flaws:

  • It’s for the CLI, not the API
  • Ben took my idea and implemented it on the docs site

But one day, I may do that for the API and then Ben will be prompted to do it for their docs.

No, three flaws:

  • Mine is out of date

No, four flaws:

I know I know, was just saying as I found it useful in similar context (trying to figure out capabilities and what is available - cli vs Api as you say) and figured that as with many such useful links on the forum over the years it will have got lost in the ensuing layers of follow on posts… old but not unuseable :wink: Now same for API - there’s an idea… :rofl: No fear, no surprise!

Hi Nick

For my understanding, what is “live data”? Is it the data coming from LoRa network?

I’m looking at “EndDeviceRegistry.Create” documentation but there are very few information. For example, I don’t see a description of the format that I should use to send the data concerning the device to add (for example the DevEUI). Where is it documented?

Thank you

Real devices and particularly End device IDs that you may want to use - it’s easy for them to get lost in the database if you make an error.