PHPackages                             underpin/rest-endpoint-loader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. underpin/rest-endpoint-loader

ActiveLibrary[API Development](/categories/api)

underpin/rest-endpoint-loader
=============================

Rest endpoint loader for Underpin

1.1.0(4y ago)03181GPL-2.0-or-laterPHP

Since May 6Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Underpin-WP/rest-endpoint-loader)[ Packagist](https://packagist.org/packages/underpin/rest-endpoint-loader)[ RSS](/packages/underpin-rest-endpoint-loader/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (1)

Underpin Rest Endpoint Loader
=============================

[](#underpin-rest-endpoint-loader)

Loader That assists with registering REST endpoints to a WordPress website.

Installation
------------

[](#installation)

### Using Composer

[](#using-composer)

`composer require underpin/rest-endpoint-loader`

### Manually

[](#manually)

This plugin uses a built-in autoloader, so as long as it is required *before*Underpin, it should work as-expected.

`require_once(__DIR__ . '/underpin-rest-endpoints/rest-endpoints.php');`

Setup
-----

[](#setup)

1. Install Underpin. See [Underpin Docs](https://www.github.com/underpin-wp/underpin)
2. Register new rest endpoints as-needed.

Example
-------

[](#example)

A very basic example could look something like this.

```
// Register rest endpoint
underpin()->rest_endpoints()->add( 'example-endpoint', [
	'endpoint_callback'       => function ( \WP_REST_Request $request ) {
		return [ 'result' => 'Wow this worked nicely!' ];
	},
	'has_permission_callback' => '__return_true',
	'rest_namespace'          => 'example/v1',
	'route'                   => 'example-endpoint',
	'args'                    => [ 'methods' => 'GET' ],
] );
```

Alternatively, you can extend `Rest_Endpoint` and reference the extended class directly, like so:

```
underpin()->rest_endpoints()->add('endpoint-key','Namespace\To\Class');
```

A common use-case is to extend `Rest_Endpoint` with your own `rest_namespace` to keep code DRY.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~202 days

Total

2

Last Release

1635d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e6206223bd6f2a57b8ac80605b1b5c3521faaec18ad3f20f25fb728a9a13784?d=identicon)[tstandiford](/maintainers/tstandiford)

---

Top Contributors

[![alexstandiford](https://avatars.githubusercontent.com/u/8210827?v=4)](https://github.com/alexstandiford "alexstandiford (11 commits)")

---

Tags

rest-endpointunderpinwordpress

### Embed Badge

![Health badge](/badges/underpin-rest-endpoint-loader/health.svg)

```
[![Health](https://phpackages.com/badges/underpin-rest-endpoint-loader/health.svg)](https://phpackages.com/packages/underpin-rest-endpoint-loader)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
