Proposed REST and GraphQL APIs for Concrete CMS 9.2+

Overview

Concrete CMS API Proposal 2022

Hello there! This is a package for Concrete CMS (9.1.1+) that adds a proposed REST API. This API is reasonably comprehensive: there are certainly many things you won't be able to do with this API that you can do with the full CMS application, but this API should give you significant access to the most important aspects of a Concrete CMS application.

The Purpose of this Package

This package demonstrates a comprehensive REST API. It demonstrates a proposed format for REST calls, including API scopes, endpoints, schemas, formats and operations. This proposal package has been built to be fully functional – meaning the documented operations in this package should actually work with a real site – but that doesn't mean it's fully tested and ready for production. Instead, this package is meant to demonstrate a proposed API, spark discussion about the API, and work as a spec.

Now that this proposed API is available, I hope that developers will install it somewhere, take a look at its proposals, kick the tires, and let me know if they think it's perfect everywhere (:fingerscrossed) or whether it needs some tweaks (more likely!)

Ultimately, this API – including any enhancements or tweaks that come about during this testing phase – is slated for inclusion in Concrete CMS 9.2.0 this fall.

Installation

Clone this repository into your testing site's packages/ directory.

Within your testing site, enable the Concrete CMS REST API on Dashboard > System and Settings > API > Settings. Do not create an integration at this time, it will be created for you when the package is installed.

For the redirect URL in this API integration, specify http://www.yoursiteurl.com/packages/concrete_api_proposal_2022/swagger/oauth2-redirect.html

Now, install the "Concrete CMS API Proposal" package into your site.

Try it Out

API proposals can be found in Dashboard > API Proposal. Clicking on this page will redirect you into a REST API page. From this page, click the "View API Documentation Console" button. This will launch standard REST API docs, powered by Swagger UI.

Screen Shot 2022-08-04 at 2 58 58 PM

Demonstration Video

For a quick walkthrough of installation and a demonstration of a couple REST endpoints in the new proposal, watch this video:

https://www.loom.com/share/d3f22bd837a44105a5c6b5ae982bcfe3

GraphQL

Yes, we are planning on a GraphQL API in addition to a REST API. No, that work has not yet been started.

Feedback

-- @aembler

You might also like...
A framework for serving GraphQL from Laravel
A framework for serving GraphQL from Laravel

Lighthouse A framework for serving GraphQL from Laravel Lighthouse is a GraphQL framework that integrates with your Laravel application. It takes the

EXPERIMENTAL plugin extending WPGraphQL to support querying (Gutenberg) Blocks as data, using Server Side Block registries to map Blocks to the GraphQL Schema.

WPGraphQL Block Editor This is an experimental plugin to work toward compatiblity between the WordPress Gutenberg Block Editor and WPGraphQL, based on

🍞🧑‍🍳 An on-the-fly GraphQL Schema generator from Eloquent models for Laravel.

An on-the-fly GraphQL Schema generator from Eloquent models for Laravel. Installation Quickstart Model schemas Installation This package requires PHP

Test your PHP GraphQL server in style, with Pest!

Pest GraphQL Plugin Test your GraphQL API in style, with Pest! Installation Simply install through Composer! composer require --dev miniaturebase/pest

GraphQL implementation with power of Laravel

Laravel GraphQL Use Facebook GraphQL with Laravel 5.2 =. It is based on the PHP implementation here. You can find more information about GraphQL in t

Add Price Including tax for Magento's "cart" GraphQl query

Comwrap_GraphQlCartPrices Add Price Including tax for Magento's "cart" GraphQl query Query will looks like following: items { id __typenam

GraPHPinator ⚡ 🌐 ⚡ Easy-to-use & Fast GraphQL server implementation for PHP

Easy-to-use & Fast GraphQL server implementation for modern PHP. Includes features from latest draft, middleware directives and modules with extra functionality.

Place where I record all knowledge gained for GraphQL from Laracasts & other tutorials.

Knowledge from Laracasts series: https://laracasts.com/series/graphql-with-laravel-and-vue What is GraphQL It is a query language for your API, and it

Pure PHP realization of GraphQL protocol
Pure PHP realization of GraphQL protocol

Looking for Maintainers! Unfortunatelly, we cannot longer support this package and are looking for someone to take the ownership. Currently Only PRs w

Comments
  • Proposal: change type for $results

    Proposal: change type for $results

    The type of $results is array , but getSlice may return an object. How about changing it to iterable ?

    https://github.com/concretecms/concrete_api_proposal_2022/blob/2d48a3af6d8b05aa32ba5d2d38dea8bb03715f35/src/Traits/SupportsCursorTrait.php#L28-L34

    https://github.com/BabDev/Pagerfanta/blob/da4e5587853ae39662f8804e55a214fce820cb7f/lib/Core/Adapter/AdapterInterface.php#L17-L25

    opened by hissy 1
  • Client secrets not hashed

    Client secrets not hashed

    Client secrets should be hashed in the database and verified using password_verify. The ClientRepository wrapper included here does handle hashed passwords, but we rely on them being not hashed in the swagger UI and we should never have them not hashed.

    opened by KorvinSzanto 1
  • Responses are unstructured JSON

    Responses are unstructured JSON

    We're using the DataArraySerializer by default which doesn't structure data beyond throwing it underneath a data key. Compare that to the JsonApiSerializer which does a lot more like integrating with pagerfanta to structure the data in a standard format.

    The value of having a fixed organized structure is clients can be written to consume things like pagination, search, and any other metadata without needing to write separate functionality for each endpoint and implementors can be sure their outputs match the requirements rather than write something unique each time. Take for example Stripe's API, all endpoints that include pagination respond in the same clearly defined way: https://stripe.com/docs/api/pagination

    opened by KorvinSzanto 1
Owner
Concrete CMS
Concrete CMS
Monorepo of the PoP project, including: a server-side component model in PHP, a GraphQL server, a GraphQL API plugin for WordPress, and a website builder

PoP PoP is a monorepo containing several projects. The GraphQL API for WordPress plugin GraphQL API for WordPress is a forward-looking and powerful Gr

Leonardo Losoviz 265 Jan 7, 2023
Monorepo of the PoP project, including: a server-side component model in PHP, a GraphQL server, a GraphQL API plugin for WordPress, and a website builder

PoP PoP is a monorepo containing several projects. The GraphQL API for WordPress plugin GraphQL API for WordPress is a forward-looking and powerful Gr

Leonardo Losoviz 265 Jan 7, 2023
Syntax to query GraphQL through URL params, which grants a GraphQL API the capability to be cached on the server.

Field Query Syntax to query GraphQL through URL params, which grants a GraphQL API the capability to be cached on the server. Install Via Composer com

PoP 4 Jan 7, 2022
The server component of API Platform: hypermedia and GraphQL APIs in minutes

API Platform Core API Platform Core is an easy to use and powerful system to create hypermedia-driven REST and GraphQL APIs. It is a component of the

API Platform 2.2k Dec 27, 2022
GraphQL API to Studio Ghibli REST API

GhibliQL GhibliQL is a GraphQL wrapper to the Studio Ghibli REST API Usage First, you'll need a GraphQL client to query GhibliQL, like GraphQL IDE Con

Sebastien Bizet 8 Nov 5, 2022
A Statamic Pro addon that provides alternative GraphQL queries for collections, entries and global sets.

Statamic Enhanced GraphQL A Statamic CMS GraphQL Addon that provides alternative GraphQL queries for collections, entries and global sets. ⚠️ This is

Grischa Erbe 2 Dec 7, 2021
This bundle provides tools to build a complete GraphQL server in your Symfony App.

OverblogGraphQLBundle This Symfony bundle provides integration of GraphQL using webonyx/graphql-php and GraphQL Relay. It also supports: batching with

Webedia - Overblog 720 Dec 25, 2022
Pure PHP implementation of GraphQL Server – Symfony Bundle

Symfony GraphQl Bundle This is a bundle based on the pure PHP GraphQL Server implementation This bundle provides you with: Full compatibility with the

null 283 Dec 15, 2022
GraphQL Bundle for Symfony 2.

Symfony 2 GraphQl Bundle Use Facebook GraphQL with Symfony 2. This library port laravel-graphql. It is based on the PHP implementation here. Installat

Sergey Varibrus 35 Nov 17, 2022
Laravel wrapper for Facebook's GraphQL

Laravel GraphQL Use Facebook's GraphQL with Laravel 6.0+. It is based on the PHP port of GraphQL reference implementation. You can find more informati

Mikk Mihkel Nurges 1.9k Dec 31, 2022