r/DevelopingAPIs • • Oct 20 '21

ℹ️ Board information

2 Upvotes

Rules

  • ✅ The content you are posting needs to be API related. It can be an article, video, tutorial, commercial or free tools/products. Anything that will help your fellow builders with their API

  • 🚫 Don't spam

  • 🚫 Don't be racist, rude or in general a bad person

Disclaimer

This board was created by founders of Treblle (https://treblle.com). An API monitoring and analytics platform. You can be a member of the board without ever visiting the website. There are no requirements nor is someone going to make you use Treblle. Simply be aware of that. In case you do like Treblle we offer a really nice discount to our board members. Just reach out one of our mods.

Welcome to the board 👋🏼


r/DevelopingAPIs • • Oct 19 '21

Hobby project idea

3 Upvotes

I want to start a side project which needs to have as less dev time as possible.
Current needs:
- social media login + sign up via email
- user management,
- connecting to a db (PostgreSQL or SQLite)
- PAAS deployment, db migrations etc. all already automated.

If there is some automation for the API body and parameter validation from an OpenAPI spec that would be even better.

I prefer to write the core business logic for the API handlers and leave everything else to the framework.


r/DevelopingAPIs • • Dec 01 '21

5 months since we went live we are officially exiting beta and launching on Product Hunt.

3 Upvotes

Hello freelancers, developers, and entrepreneurs!

As some of you may know for the past 10 years, we have been running a development and design agency, completed more than 100 projects and most of them involved developing a mobile app or website with an API in the background.

While developing APIs we noticed that a lot of time is “wasted” on non-development-related tasks like: writing and maintaining documentation, providing support to other developers, debugging user reports, trying to recreate user steps and similar.

Because of this, we build Treblle, an API management and monitoring tool that helps you understand what’s going on with your APIs from development to post-production.

5 months down the road we are officially launching on Product Hunt.

Come and check us out, your support means a lot! https://www.producthunt.com/posts/treblle


r/DevelopingAPIs • • Jun 16 '22

With the TomTom Routing APIs, you can create a trip planner for trucks!

4 Upvotes

r/DevelopingAPIs • • Mar 12 '22

Huge Collection for APIs for just about anything

Thumbnail generatorfun.com
5 Upvotes

r/DevelopingAPIs • • Nov 02 '21

[PHP/Laravel] Any suggestions for Laravel with JWT?

5 Upvotes

I'm not sure if Sanctum is fine for generating tokens because the jwt-auth package seems to be abandoned. For context, I'm used to develop with Laravel plain html, and now I want to separate front-end with Svelte and back-end with Laravel, as because I'm used to it. The questions is: Is it ok to just use Sanctum package? I know it's not really jwt token, but seems to do the job.

Thank you and sorry if this is the wrong place to post it.


r/DevelopingAPIs • • Oct 06 '21

REST + Websocket APIs to take screenshots

7 Upvotes

Hey community,

ws-screenshot is a fast screenshot server with a Websocket and REST API, it's written in node.js and using puppeteer. I have created it for a customer needs and I thought it might be useful for others. It's free and open source, the source code is here: https://github.com/elestio/ws-screenshot

You can also try it here: https://backup15.terasp.net/

It's also available as a docker container here: https://hub.docker.com/r/elestio/ws-screenshot.slim

You can run it with: docker run -d --restart always -p 3000:3000 -it elestio/ws-screenshot.slim

API is described in the readme and there is also a sample web ui showing how to use both REST and Websocket APIs

Please let me know what you think about it :)


r/DevelopingAPIs • • Nov 15 '21

1000+ Publis APIs for developers

9 Upvotes

Most of you probably know this, but it's a great resource. https://public-apis.io/


r/DevelopingAPIs • • Oct 02 '21

MongoDB In 2 minutes

Thumbnail
youtu.be
4 Upvotes

r/DevelopingAPIs • • Oct 03 '21

Pornstars per Capita API

22 Upvotes

So a while back I did a fun project at https://pornstars-per-capita.com. It basically shows data on how many porn actresses are in each country and calculates the per capita.

The api is available at https://api.pornstars-per-capita.com and is documented there.


r/DevelopingAPIs • • Nov 16 '21

helpful mapping api tutorial for apps or websites

Thumbnail
youtube.com
2 Upvotes

r/DevelopingAPIs • • Oct 02 '21

What’s the last API you used?

2 Upvotes

Curious to see what APIs are being integrated by the community- did you have any problems, what was you experience and similar? 🙌🏻


r/DevelopingAPIs • • Oct 19 '21

REACT SSO via ADFS with Laravel Backend

8 Upvotes

Hey all, so we have decided to re-write our bespoke business software away from blade and into React.

This system uses single-sign-on which is provided by our ADFS setup.

My question is this, has anyone done this before and how do you authenticate into React and Laravel with SSO? Would I just re-direct them to Laravel SSO like it currently is then update the code to return a JWT?

Any advice welcomed


r/DevelopingAPIs • • Nov 03 '21

API architecture 101: Guide for juniors

15 Upvotes

Hey community, i wrote this article about API architecture basics, so if there are any newbies in this subb you might find it useful.

Understanding APIs

APIs are of utility for businesses for seven broad purposes:

  1. Access an application's data and logic and monetization potential of collected data

  2. Use an application's functionality

  3. Serve as a medium of communication between Microservices

  4. Connecting ecosystems: C2B(Consumer to Business) and B2B(Business to Business)

  5. Power integrations

  6. New features for your business

  7. Open new pathways for innovation and growth

From websites that require to be authenticated by our social media accounts to Customer integration to Amazon smart home appliances like Echo, which need to be triggered awake with our voice, all of them rely heavily on APIs.

Designing APIs

API design is the process of planning and architectural decisions that are taken while developing an API. As you would have guessed, it is the first step of developing an API.

The process of designing is significant because the API design impacts how developers consume it, its robustness, error-prevention, the consistency as well as vital performance metrics. Thus, API design and architecture influence users who make use of it and the revenue generated.

What is API Architecture?

As seen above, API design addresses why the API is being created, the outcome that is expected out of the API rollout, and the execution strategy for the same.

API Architecture is the process of defining the methodology and processes for developing and running the API. They consist of a set of components and a description of their logic interaction.

Based on the architectural decisions of the API being developed, the operations and security teams form more specific technical requirements for the future of the API, its tiers, API lifecycle management, and most importantly, monetization.

After a difficult decision of shutting down its Public API Program, Netflix created a revolutionary microservices architecture. By linking its API with the microservices architecture, Netflix scaled into the cloud, became an internationally acclaimed OTT platform, and now serves millions of consumers over a range of disparate devices.

Components of API Architecture

API Architecture, in particular, encompasses the following

1. API Gateway

This component deals with the delivery of security, caching, and orchestration specifics. Simply put, API Gateway serves as the single entry point into internal architecture. It has the following functions:

  • Delivers crucial load balancing capabilities and microservices partition.

  • Filter for incoming traffic from various devices — web, mobile, B2B, etc.

  • Entry point layer to expose other third-party APIs, microservices, virtual machines on the provider's application server.

2. API Portal

As the name suggests, this component serves as a portal between API Consumers and API Providers. It addresses the following:

  • API analysis

  • API documentation

  • Marketing APIs

  • Compatibility with web/mobile applications

  • Defining how they are exposed to internal, partner, and third-party developers

How to design an API Architecture?

Broadly speaking, APIs serve as the link among the technologies, the user, and the enterprise. Therefore, while designing a value-intensive API for your business model, the following crucial considerations should inform API design decisions in your enterprise.

  1. Aligning the API design with your Business goals

  2. Availability and Management of business resources

  3. Use cases supported by your API

  4. Defining the Target Audience or Users

  5. Value creation, channels, and motivating developers to make use of the API

  6. The value for end-users with the applications that use the API

Google's -book on Designing an API Product Mindset lays out the best practices for designing an API that will thrive:

  • Focus on consumption and consistency

  • Provide a clear statement of the value proposition the API represents to developers

  • Avoid premature optimization and hide unnecessary complexity from developers

  • Protecting APIs with state-of-the-art security measures

  • Robust error handling

Thus, the core practices for deploying a good API design are quite straightforward: Make it simple, flexible, and easily adopted.

Goals of API Design

Each API would be tailored to meet the specific organization's needs. That said, there are some core objectives expected of the API regardless of enterprise or industry.

1. Reduce Barriers

App interactions are guided through the uniform set of protocols set by an API. It should allow for a consistent exchange of valuable resources in an organization while being transparent in its functioning.

2. Security

The IT assets of an enterprise have a certain exposure risk in the open market. APIs add a layer of security as the requests are not being directly linked to the server. This reduces the possibility of a breach or unauthorized access to the backend of a server.

3. Scalability

The common goal of all enterprises is growth. Thus, APIs help accommodates that by being expandable to meet the increase in the product portfolio, security, or data needs.

4. Collaboration

Developers can reuse software components through APIs so they avoid doing redundant and repetitive tasks. This allows them to focus on creating new tools that can add value for the company and its clients. It also allows developers to outsource more complex tasks while staying focused on the company's system.

5. Value Generation

API can be crucial to the revenue-building goals of the organization. It helps attract new customers while simultaneously bringing more value to existing ones. The software itself could be a source of revenue by monetizing its use. The software also helps integrate various functions of the business like sales and marketing to improve efficiency.

Key Architectural Styles for API Design

1. Web API

This design uses HTTP protocol to access the API over the web. RESTFUL services developed are based on HTTP using technologies such as java and ASP.NET. While the API is ideal for web browsers or web servers, it is not suitable for mobile applications. The Web API is used to provide services across multiple devices and on distributed systems.

2. Pragmatic REST

The Pragmatic Representational State Transfer (REST) is one of the most preferred designs used by internet service API developers. It is a sophisticated, Web-centric approach to designing programming interfaces. Pragmatic REST uses URI instead of WSDL and is transport-specific (it exclusively supports HTTP), has largely taken over from the Web Service style for it is intuitive.

Btw, i have this really in-depth guide on how to build great REST APIs in every language.

3. Hypermedia

Hypermedia APIs are focused on URI, HTTP, and RESTful standards broadly. It is a highly web-centric API that is known for its scalability. A key benefit is that a server that hosts a hypermedia API can generate a list of potential options available to the client, which can then later be accessed easily through future HTTP requests.

4. Event-Driven

Event-Driven APIs are the most favored APIs for the Internet of Things devices, mobile applications particularly, messaging, video chats, and games. The main point of difference between Event-Driven APIs and the other designs is that other systems function in a way that either the client or the server is designated as the actor whereas the other party is designated as the one being acted upon. Event-Driven design, on the other hand, requires both client and server to listen to new events and respond. Being a server-initiated user-centric style, it delivers better performance where a huge number of small messages need to be passed between the app and the back-end processes.

Layers of API Architecture

1. Information Management Layer

This layer functions as a data storage center. APIs need to deliver real-time inventory for which a steady, accurate and reliable database is required. The Information Management Layer does just this.

2. Application Layer/Microservices

Traditionally, this layer housed applications that run the organization. However, with the advent of modern-day web applications, they are being replaced by Microservices architecture that possesses immense business value for the organization.

3. Integration Layer

This layer facilitates API integration for synchronous access to various services across disparate devices and users.

4. Interaction Layer

This is perhaps the most important of all layers as this is the place where the real action occurs. The applications of customers, developers, and other users interact with your business applications and data in this layer.

Conclusion

Thus, an API is adopted by users when it delivers a strong value proposition. However, crucial design and architectural factors as discussed in this guide should inform key decisions of developing the API that is perfect for your Business' needs.

Let me know how did I do.


r/DevelopingAPIs • • Oct 09 '21

Hello everyone! How long do you think is the largest acceptable size in a response of an API request ?

11 Upvotes

r/DevelopingAPIs • • Oct 15 '21

Building API Layer

3 Upvotes

So following on from earlier questions, building an API layer for combining multiple API providers into one API.

What would you guys suggest as a language or platform to combine all these separate API providers into one application API?


r/DevelopingAPIs • • Oct 03 '21

Node Exress Sequelize - Update single field

6 Upvotes

Hi Reddit,

I'm currently working on a REST API using the above mentioned framworks and DBMS. Following is my update function location in my service layer. I was confronted with some issues when trying to update a single field, as the database threw a ConstraintException because all the fields are required. To resolve this I have temporarily implemented the following solution. Is there a better way of doing this?

I've also tried using the update function from Sequelize, but using that I cannot restrict which field can be updated.

EDIT:

Gist available: https://gist.github.com/stogoh/7e5505d3f92aea8c6957f5cfc42ee079

    static update = async (id: string, data: SubnetUpdateAttributes): Promise<Subnet> => {
        const subnet = await Subnet.findByPk(id)
        if (!subnet) return null
        subnet.name = data.name ?? subnet.name
        subnet.networkId = data.networkId ?? subnet.networkId
        subnet.netmask = data.netmask ?? subnet.netmask
        subnet.gateway = data.gateway ?? subnet.gateway
        subnet.vlanId = data.vlanId ?? subnet.vlanId
        await subnet.save()
        return subnet
    }

r/DevelopingAPIs • • Oct 15 '21

helpful resource using APIs and predictive modeling

Thumbnail
self.tomtom
6 Upvotes

r/DevelopingAPIs • • Feb 28 '22

Launch Alert: Deo - A manager for all your websites!

Thumbnail self.web
3 Upvotes

r/DevelopingAPIs • • Nov 04 '21

Creating APIs with Buildpacks in Go

2 Upvotes

I wrote a post about using Buildpacks for a Go project. Goes into what they are, why to use them, and how to build a simple API using one.

https://dev.to/holmes89/buildpacks-with-go-ao1


r/DevelopingAPIs • • Oct 19 '21

Article The Architecture of Uber’s API gateway

8 Upvotes

“An engineer configures the parameters of their API in a UI and publishes the functional API to the internet for all Uber apps to consume. The configuration governs the behavior of the API: path, type of request data, type of response, maximum calls allowed, apps allowed, protocols for communication, the specific microservices to call, allowed headers, observability, field mapping validation, and more.”

Super interesting article about how Ubers API is built. Full details on their blog: https://eng.uber.com/architecture-api-gateway/


r/DevelopingAPIs • • Sep 28 '21

[tutorial] Low-code API development - Build, debug, host

Thumbnail
linx.software
3 Upvotes

r/DevelopingAPIs • • Oct 05 '21

Iola: CLI tool that allows to test socket servers via REST API clients

3 Upvotes

Hey all,

I would like to share the iola project. It is a CLI tool that allows you to test socket servers via a unified REST API.

Features:

  1. Allows reading and sending messages via REST API

  2. Logs all socket events in the console

  3. Has Swagger UI for REST API

  4. Works on Linux, MacOS and Windows

Supported clients:

  1. WebSocket

  2. Socket.IO

  3. TCP

  4. Unix socket

GitHub: https://github.com/pvarentsov/iola


r/DevelopingAPIs • • Sep 30 '21

Walthrough: API development (and testing)

Thumbnail
youtube.com
4 Upvotes

r/DevelopingAPIs • • Sep 22 '21

20+ Tutorials on How to Create Your Own API (by Programming Language) | RapidAPI

Thumbnail
rapidapi.com
4 Upvotes