REST APIs use Uniform Resource Identifiers (URI) to access resources.

Good URIs and well-named resources make your API feasible and intuitive.

Here are a few tips that can help you. 🧵
1️⃣ Use of nouns in URIs

REST APIs are used to get and manipulate resources that are information (nouns), not actions (verbs).

In simple terms, REST URIs should not indicate CRUD (Create, Read, Update, Delete) functionality.

For example 👇🏻
2️⃣ Use forward-slash (/)

Use forward-slash (/) special character to indicate the hierarchy relationship between resources.

This will increase the readability of URIs and hence increase the adoption of API.
3️⃣ Use hyphens (-) instead of underscores ( _ )

There is nothing wrong with using underscores, but hyphens reduce chaos as underscores are sometimes not readable due to fonts or browsers.
4️⃣ Don't use file extensions

File extensions don't serve any additional features. They simply increase the length of URI and hence decrease the readability of endpoints.
You can use the `Content-Type` header to indicate the media type of a particular file, if necessary.
5️⃣ Use query parameters

Do not create a separate endpoint for a specific resource. Instead, enable sorting based on certain attributes.

For example 👇🏻
With that being said, these are five tips that can help you increase your API's adoption.

Don't forget to publish your API on RapidAPI Hub (RapidAPI.com/hub?utm_source…) and make it accessible to over 3 million developers.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with RapidAPI

RapidAPI Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Rapid_API

21 Dec 21
Top 10 Artificial Intelligence APIs.

Thread 🧵👇🏻
1️⃣ Restb AI Watermark Detection

- Detect artificially added watermarks, texts, and logos in images with an AI

RapidAPI.com/restb/api/rest…
2️⃣ Sentiments

- Sentiments API returns the sentiment score of any given text.

RapidAPI.com/connexun-srl-c…
Read 12 tweets
20 Dec 21
Introduction to Async APIs

🧵👇🏻
Before talking about AsyncAPI, let’s briefly mention Event-Driven Architecture (EDA).
📌 Event-Driven Architecture

The EDA is a software architecture paradigm involving production, detection, consumption, and reaction to events.
Read 14 tweets
18 Dec 21
Top ten Machine Learning APIs.

Thread 🧵👇🏻
1️⃣ OOPSpam Spam Filter

OOPSpam Anti-Spam API helps you better identify spam content for contact forms, comment systems, blogs, live chat, etc.

RapidAPI.com/oopspam/api/oo…
2️⃣ Speech Recognition English

Speech Recognition English API can convert any English voice to text.

RapidAPI.com/hivoicy-vxmKOG…
Read 12 tweets
17 Dec 21
API Tip 💡

You can make a conditional HTTP request using the `If-Modified-Since` HTTP header. Condition HTTP Request
The client is asking for the resource (/posts) if it has been modified after the given date.

There are two possible ways in which server can respond back: 👇🏻
1️⃣ If the resource has not changed

The server will return a 304 "Not Modified" response if the resource has not changed.

In this case, the client uses the cached resource.
Read 4 tweets
15 Dec 21
Project-based learning is the way to go. 🚀

We bring you the five complete project tutorials that help you sharpen your coding skills.

Thread 🧵👇🏻
1️⃣ Phone Number Validation App

Build a Phone Number Validation App using free Phone Validate API available on RapidAPI Hub.

RapidAPI.com/guides/build-p…
2️⃣ Hotel App

Build a Web Application that will allow users to look up hotels and book them.

RapidAPI.com/guides/build-h…
Read 7 tweets
13 Dec 21
Introduction to API Rate Limiting Factor

The rate-limiting factor plays a crucial role in your API security by controlling an unlimited number of requests in the given period.

Let's talk more about it. 🧵👇🏻
When designing an API, you follow various best practices to ensure your API’s performance and success. Rate-limiting factor in one of them.
The rate-limiting factor is the process through which you limit the amount of traffic coming to your API from a single IP address.
Read 13 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(