Green Button Alliance OAuth2 Client Management API
Manage OAuth2 client registrations
Manage OAuth2 client registrations
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/green-button-alliance:green-button-alliance-oauth2-client-management-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: OpenESPI Authorization Server OAuth2 Client Management API
description: OAuth2/OIDC Authorization Server for Green Button Alliance ESPI 4.0 compliant applications.
version: 1.0.0
contact:
name: Green Button Alliance
email: support@greenbuttonalliance.org
url: https://www.greenbuttonalliance.org
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
termsOfService: https://www.greenbuttonalliance.org/terms
servers:
- url: https://authorization.greenbuttonalliance.org
description: Production server
- url: https://staging-authorization.greenbuttonalliance.org
description: Staging server
security:
- BearerAuth: []
- ClientCertificate: []
tags:
- name: OAuth2 Client Management
description: Manage OAuth2 client registrations
paths:
/api/v1/oauth2/clients:
get:
tags:
- OAuth2 Client Management
summary: List OAuth2 clients
description: Retrieve a paginated list of registered OAuth2 clients
security:
- BearerAuth: []
parameters:
- name: page
in: query
description: Page number (zero-based)
schema:
type: integer
default: 0
minimum: 0
- name: size
in: query
description: Page size
schema:
type: integer
default: 20
minimum: 1
maximum: 100
- name: sort
in: query
description: Sort field
schema:
type: string
enum:
- clientName
- clientId
- createdAt
default: clientName
- name: direction
in: query
description: Sort direction
schema:
type: string
enum:
- ASC
- DESC
default: ASC
- name: search
in: query
description: Search term for client name or ID
schema:
type: string
- name: espiCompliant
in: query
description: Filter by ESPI compliance
schema:
type: boolean
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/ClientListResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimit'
operationId: getApiV1Oauth2Clients
x-operation-id-source: derived
post:
tags:
- OAuth2 Client Management
summary: Create new OAuth2 client
description: Register a new OAuth2 client
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateClientRequest'
responses:
'201':
description: Client created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ClientResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'409':
$ref: '#/components/responses/Conflict'
'422':
$ref: '#/components/responses/ValidationError'
operationId: postApiV1Oauth2Clients
x-operation-id-source: derived
/api/v1/oauth2/clients/{clientId}:
get:
tags:
- OAuth2 Client Management
summary: Get client by ID
description: Retrieve a specific OAuth2 client by ID
security:
- BearerAuth: []
parameters:
- name: clientId
in: path
required: true
description: Client identifier
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/ClientResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
operationId: getApiV1Oauth2ClientsByClientId
x-operation-id-source: derived
put:
tags:
- OAuth2 Client Management
summary: Update client
description: Update an existing OAuth2 client
security:
- BearerAuth: []
parameters:
- name: clientId
in: path
required: true
description: Client identifier
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateClientRequest'
responses:
'200':
description: Client updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ClientResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'422':
$ref: '#/components/responses/ValidationError'
operationId: putApiV1Oauth2ClientsByClientId
x-operation-id-source: derived
delete:
tags:
- OAuth2 Client Management
summary: Delete client
description: Remove an OAuth2 client (soft delete)
security:
- BearerAuth: []
parameters:
- name: clientId
in: path
required: true
description: Client identifier
schema:
type: string
responses:
'200':
description: Client deleted successfully
content:
application/json:
schema:
$ref: '#/components/schemas/DeleteResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
operationId: deleteApiV1Oauth2ClientsByClientId
x-operation-id-source: derived
/api/v1/oauth2/clients/{clientId}/metrics:
get:
tags:
- OAuth2 Client Management
summary: Get client metrics
description: Retrieve usage metrics for a specific client
security:
- BearerAuth: []
parameters:
- name: clientId
in: path
required: true
description: Client identifier
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/ClientMetricsResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
operationId: getApiV1Oauth2ClientsByClientIdMetrics
x-operation-id-source: derived
components:
schemas:
UsageMetrics:
type: object
properties:
totalTokensIssued:
type: integer
format: int64
totalAuthorizationsGranted:
type: integer
format: int64
totalRefreshTokensUsed:
type: integer
format: int64
averageTokenLifetime:
type: integer
description: Average token lifetime in seconds
lastTokenIssuedAt:
type: string
format: date-time
peakUsageHour:
type: integer
minimum: 0
maximum: 23
weeklyStats:
$ref: '#/components/schemas/WeeklyStats'
ClientListResponse:
type: object
properties:
content:
type: array
items:
$ref: '#/components/schemas/ClientSummary'
pageable:
$ref: '#/components/schemas/Pageable'
totalElements:
type: integer
format: int64
totalPages:
type: integer
first:
type: boolean
last:
type: boolean
Pageable:
type: object
properties:
sort:
type: object
properties:
sorted:
type: boolean
orderBy:
type: string
pageNumber:
type: integer
pageSize:
type: integer
ClientResponse:
type: object
properties:
clientId:
type: string
clientName:
type: string
clientSecret:
type: string
description: '[PROTECTED] - Only returned on creation'
redirectUris:
type: array
items:
type: string
format: uri
scopes:
type: array
items:
type: string
authorizationGrantTypes:
type: array
items:
type: string
enum:
- authorization_code
- refresh_token
- client_credentials
clientAuthenticationMethods:
type: array
items:
type: string
enum:
- client_secret_basic
- client_secret_post
- tls_client_auth
espiCompliant:
type: boolean
securityLevel:
type: string
enum:
- LOW
- MEDIUM
- HIGH
certificationStatus:
type: string
enum:
- PENDING
- CERTIFIED
- EXPIRED
- REVOKED
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
lastUsed:
type: string
format: date-time
usageMetrics:
$ref: '#/components/schemas/UsageMetrics'
TokenSettings:
type: object
properties:
accessTokenTimeToLive:
type: string
description: ISO 8601 duration (e.g., PT1H)
default: PT1H
refreshTokenTimeToLive:
type: string
description: ISO 8601 duration (e.g., P30D)
default: P30D
reuseRefreshTokens:
type: boolean
default: false
ErrorResponse:
type: object
properties:
error:
type: string
error_description:
type: string
error_uri:
type: string
format: uri
timestamp:
type: string
format: date-time
path:
type: string
correlationId:
type: string
UpdateClientRequest:
type: object
properties:
clientName:
type: string
minLength: 1
maxLength: 100
redirectUris:
type: array
items:
type: string
format: uri
scopes:
type: array
items:
type: string
authorizationGrantTypes:
type: array
items:
type: string
enum:
- authorization_code
- refresh_token
- client_credentials
clientAuthenticationMethods:
type: array
items:
type: string
enum:
- client_secret_basic
- client_secret_post
- tls_client_auth
espiCompliant:
type: boolean
securityLevel:
type: string
enum:
- LOW
- MEDIUM
- HIGH
clientSettings:
$ref: '#/components/schemas/ClientSettings'
tokenSettings:
$ref: '#/components/schemas/TokenSettings'
WeeklyStats:
type: object
properties:
currentWeek:
$ref: '#/components/schemas/WeekStats'
previousWeek:
$ref: '#/components/schemas/WeekStats'
ClientMetricsResponse:
type: object
properties:
clientId:
type: string
metrics:
$ref: '#/components/schemas/UsageMetrics'
DeleteResponse:
type: object
properties:
message:
type: string
clientId:
type: string
deletedAt:
type: string
format: date-time
ClientSummary:
type: object
properties:
clientId:
type: string
clientName:
type: string
espiCompliant:
type: boolean
securityLevel:
type: string
enum:
- LOW
- MEDIUM
- HIGH
certificationStatus:
type: string
enum:
- PENDING
- CERTIFIED
- EXPIRED
- REVOKED
createdAt:
type: string
format: date-time
lastUsed:
type: string
format: date-time
CreateClientRequest:
type: object
required:
- clientName
- redirectUris
- scopes
properties:
clientName:
type: string
minLength: 1
maxLength: 100
redirectUris:
type: array
minItems: 1
items:
type: string
format: uri
scopes:
type: array
minItems: 1
items:
type: string
authorizationGrantTypes:
type: array
items:
type: string
enum:
- authorization_code
- refresh_token
- client_credentials
default:
- authorization_code
- refresh_token
clientAuthenticationMethods:
type: array
items:
type: string
enum:
- client_secret_basic
- client_secret_post
- tls_client_auth
default:
- client_secret_basic
espiCompliant:
type: boolean
default: false
securityLevel:
type: string
enum:
- LOW
- MEDIUM
- HIGH
default: MEDIUM
clientSettings:
$ref: '#/components/schemas/ClientSettings'
tokenSettings:
$ref: '#/components/schemas/TokenSettings'
WeekStats:
type: object
properties:
authorizationsGranted:
type: integer
tokensIssued:
type: integer
ClientSettings:
type: object
properties:
requireAuthorizationConsent:
type: boolean
default: true
requireProofKey:
type: boolean
default: true
ValidationErrorResponse:
allOf:
- $ref: '#/components/schemas/ErrorResponse'
- type: object
properties:
details:
type: array
items:
type: object
properties:
field:
type: string
message:
type: string
responses:
RateLimit:
description: Rate limit exceeded
headers:
X-RateLimit-Limit:
schema:
type: integer
description: Request limit per hour
X-RateLimit-Remaining:
schema:
type: integer
description: Remaining requests in current window
X-RateLimit-Reset:
schema:
type: integer
description: Unix timestamp when limit resets
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: rate_limit_exceeded
error_description: Too many requests
timestamp: '2024-01-16T15:30:00Z'
ValidationError:
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
example:
error: validation_error
error_description: Request validation failed
timestamp: '2024-01-16T15:30:00Z'
details:
- field: clientName
message: Client name is required
Forbidden:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: insufficient_scope
error_description: The request requires higher privileges
timestamp: '2024-01-16T15:30:00Z'
Conflict:
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: client_already_exists
error_description: A client with this ID already exists
timestamp: '2024-01-16T15:30:00Z'
BadRequest:
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: invalid_request
error_description: The request is malformed
timestamp: '2024-01-16T15:30:00Z'
path: /api/v1/oauth2/clients
NotFound:
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: client_not_found
error_description: The specified client was not found
timestamp: '2024-01-16T15:30:00Z'
Unauthorized:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
error: invalid_token
error_description: The access token is invalid or expired
timestamp: '2024-01-16T15:30:00Z'
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
ClientCredentials:
type: http
scheme: basic
ClientCertificate:
type: mutualTLS
externalDocs:
description: OpenESPI Authorization Server Documentation
url: https://docs.greenbuttonalliance.org/authorization-server