PHPackages                             dukt/rest - 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. dukt/rest

ActiveCraft-plugin[API Development](/categories/api)

dukt/rest
=========

REST plugin for Craft CMS

1.1.1(8y ago)2162PHP

Since Nov 24Pushed 8y ago2 watchersCompare

[ Source](https://github.com/dukt/rest)[ Packagist](https://packagist.org/packages/dukt/rest)[ RSS](/packages/dukt-rest/feed)WikiDiscussions v1 Synced 3d ago

READMEChangelogDependenciesVersions (7)Used By (0)

REST for Craft CMS
==================

[](#rest-for-craft-cms)

Perform authenticated REST requests

---

Table of Contents
-----------------

[](#table-of-contents)

- [Installing and updating](#installing-and-updating)
    - [Requirements](#requirements)
    - [Installation](#installation)
    - [Updating](#updating)
- [Requests](#requests)
    - [Simple Request](#simple-request)
    - [Query Parameters](#query-parameters)
    - [Authentication](#authentication)
    - [Token](#token)
- [Authentications](#authentications)

Installing and updating
-----------------------

[](#installing-and-updating)

### Requirements

[](#requirements)

- Craft 2.5
- Craft OAuth 1.0

### Installation

[](#installation)

1. Download the latest release of the plugin
2. Drop the `rest` plugin folder to `craft/plugins`
3. Install REST plugin from the control panel in `Settings > Plugins`

### Updating

[](#updating)

1. Download the latest release of the plugin
2. Replace the `rest` plugin folder by the new one under `craft/plugins`
3. Access your Craft control panel. You might be prompted to "Finish Up" the update if one or more migrations need to be applied.

Requests
--------

[](#requests)

### Simple Request

[](#simple-request)

```
{% set response = craft.rest.request.url('http://api.openweathermap.org/data/2.5/weather?q=London,uk&appid=2de143494c0b295cca9337e1e96b00e0').send() %}

{{ dump(response) }}

```

### Query Parameters

[](#query-parameters)

```
{% set response = craft.rest.request
    .url('http://api.openweathermap.org/data/2.5/weather')
    .query({
        q: 'London,uk',
        appid: '2de143494c0b295cca9337e1e96b00e0',
    })
    .send() %}

```

### Authentication

[](#authentication)

```
{% set response = craft.rest.request
    .authentication('youtube')
    .url('https://www.googleapis.com/youtube/v3/search')
    .query({
        part: 'snippet',
        q: 'timelapse',
    })
    .send() %}

```

### Token

[](#token)

```
{% set response = craft.oauth.getTokenById(123) %}

{% set response = craft.rest.request
    .token(token)
    .url('https://www.googleapis.com/youtube/v3/search')
    .query({
        part: 'snippet',
        q: 'timelapse',
    })
    .send() %}

```

Authentications
---------------

[](#authentications)

### Supported Providers

[](#supported-providers)

You can set up authentication with any OAuth provider provided by the OAuth plugin:

- Facebook
- GitHub
- Google
- Slack
- Twitter
- Vimeo

The plugin also supports any third party OAuth providers supported by the OAuth plugin.

[Dukt.net](https://dukt.net/) © 2017 - All rights reserved

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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 ~174 days

Recently: every ~234 days

Total

7

Last Release

3146d ago

Major Versions

0.9.4 → 1.1.02017-09-30

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2911900?v=4)[Benjamin David](/maintainers/benjamindavid)[@benjamindavid](https://github.com/benjamindavid)

---

Top Contributors

[![benjamindavid](https://avatars.githubusercontent.com/u/2911900?v=4)](https://github.com/benjamindavid "benjamindavid (163 commits)")

---

Tags

craft-plugincraft2craftcmsrest

### Embed Badge

![Health badge](/badges/dukt-rest/health.svg)

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

###  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)
