Last active
January 8, 2020 15:23
-
-
Save btopro/c807a057f029f30f2a46a8c97a718bef to your computer and use it in GitHub Desktop.
HAXcms 0.12.3 OpenAPI documentation blob
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
title: 'HAXcms API' | |
description: 'API for interfacing with HAXcms end points' | |
termsOfService: 'https://haxtheweb.org' | |
contact: | |
email: hax@psu.edu | |
license: | |
name: 'Apache 2.0' | |
url: 'http://www.apache.org/licenses/LICENSE-2.0.html' | |
version: 0.12.3 | |
servers: | |
- | |
url: 'http://haxcms.ddev.site/system/api' | |
description: 'Site list / dashboard for administrator user' | |
paths: | |
/options: | |
post: | |
tags: | |
- api | |
operationId: 'Operations::options' | |
responses: | |
'200': | |
description: 'API bandaid till we get all the APIs documented. This is an array of callbacks' | |
/: | |
post: | |
tags: | |
- api | |
summary: 'Generate the swagger API documentation for this site' | |
operationId: 'Operations::api' | |
responses: | |
'200': | |
description: 'API documentation in YAML' | |
/openapi/json: | |
post: | |
tags: | |
- api | |
summary: 'Generate the swagger API documentation for this site' | |
operationId: 'Operations::openapi' | |
responses: | |
'200': | |
description: 'API documentation in JSON' | |
/saveManifest: | |
post: | |
tags: | |
- cms | |
- authenticated | |
operationId: 'Operations::saveManifest' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: 'Save the manifest of the site' | |
/saveOutline: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- site | |
operationId: 'Operations::saveOutline' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: 'Save an entire site outline' | |
/createNode: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- node | |
operationId: 'Operations::createNode' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
requestBody: | |
content: | |
application/json: | |
schema: | |
required: | |
- site | |
- node | |
properties: | |
site: | |
type: object | |
node: | |
type: object | |
indent: | |
type: number | |
order: | |
type: number | |
parent: | |
type: string | |
description: | |
type: string | |
metadata: | |
type: object | |
type: object | |
example: | |
site: | |
name: mysite | |
node: | |
id: null | |
title: 'Cool post' | |
location: null | |
indent: null | |
order: null | |
parent: null | |
description: 'An example description for the post' | |
metadata: | |
tags: 'metadata,can,be,whatever,you,want' | |
other: stuff | |
responses: | |
'200': | |
description: 'object with full properties returned' | |
/saveNode: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- node | |
operationId: 'Operations::saveNode' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: 'Save a node' | |
/deleteNode: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- node | |
operationId: 'Operations::deleteNode' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: 'Delete a node' | |
/siteUpdateAlternateFormats: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- meta | |
operationId: 'Operations::siteUpdateAlternateFormats' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: 'Update the alternative formats surrounding a site' | |
/revertCommit: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- meta | |
- git | |
- site | |
operationId: 'Operations::revertCommit' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: 'Revert the last commit to the git repo backing the site' | |
/getNodeFields: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- node | |
- form | |
operationId: 'Operations::getNodeFields' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: 'Update the alternative formats surrounding a site' | |
/generateAppStore: | |
post: | |
tags: | |
- hax | |
- api | |
operationId: 'Operations::generateAppStore' | |
responses: | |
'200': | |
description: 'Generate the AppStore spec for HAX editor directions' | |
/getUserData: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- user | |
- settings | |
operationId: 'Operations::getUserData' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: 'Load data about the logged in user' | |
/formLoad: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- form | |
operationId: 'Operations::formLoad' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: 'Load a form based on ID' | |
/formProcess: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- form | |
operationId: 'Operations::formProcess' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: 'Process a form based on ID and input data' | |
/loadFiles: | |
post: | |
tags: | |
- hax | |
- authenticated | |
- file | |
operationId: 'Operations::loadFiles' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: 'Load existing files for presentation in HAX find area' | |
/login: | |
post: | |
tags: | |
- cms | |
- user | |
description: 'Attempt a user login' | |
operationId: 'Operations::login' | |
parameters: | |
- | |
name: u | |
in: query | |
description: 'User name' | |
required: true | |
schema: | |
type: string | |
example: admin | |
- | |
name: p | |
in: query | |
description: Password | |
required: true | |
schema: | |
type: string | |
example: admin | |
responses: | |
'200': | |
description: 'JWT token as response' | |
'403': | |
description: 'Invalid token / Login is required' | |
/logout: | |
post: | |
tags: | |
- cms | |
- user | |
operationId: 'Operations::logout' | |
responses: | |
'200': | |
description: 'User logout, front end will kill token' | |
/setUserPhoto: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- user | |
operationId: 'Operations::setUserPhoto' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: 'Set the user''s uploaded photo' | |
/saveFile: | |
post: | |
tags: | |
- hax | |
- authenticated | |
- file | |
operationId: 'Operations::saveFile' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
- | |
name: file-upload | |
in: header | |
description: 'File to upload' | |
required: true | |
schema: | |
type: string | |
requestBody: | |
content: | |
application/json: | |
schema: | |
required: | |
- site | |
properties: | |
site: | |
type: object | |
node: | |
type: object | |
type: object | |
example: | |
site: | |
name: mynewsite | |
node: | |
id: '' | |
responses: | |
'200': | |
description: 'User is uploading a file to present in a site' | |
/listSites: | |
post: | |
tags: | |
- cms | |
operationId: 'Operations::listSites' | |
responses: | |
'200': | |
description: 'Load a list of all sites the user has created' | |
/createSite: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- site | |
operationId: 'Operations::createSite' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
requestBody: | |
content: | |
application/json: | |
schema: | |
required: | |
- site | |
- node | |
properties: | |
site: | |
type: object | |
theme: | |
type: object | |
type: object | |
example: | |
site: | |
name: mynewsite | |
domain: '' | |
theme: | |
name: learn-two-theme | |
variables: { image: '', icon: '', hexCode: '', cssVariable: '' } | |
responses: | |
'200': | |
description: 'Create a new site' | |
/gitImportSite: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- site | |
operationId: 'Operations::gitImportSite' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
requestBody: | |
content: | |
application/json: | |
schema: | |
required: | |
- site | |
properties: | |
site: | |
type: object | |
type: object | |
example: | |
site: | |
git: { url: '' } | |
responses: | |
'200': | |
description: 'Create a new site from a git repo reference' | |
/getConfig: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- settings | |
operationId: 'Operations::getConfig' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
responses: | |
'200': | |
description: 'Get configuration for HAXcms itself' | |
/setConfig: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- form | |
- settings | |
operationId: 'Operations::setConfig' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
requestBody: | |
content: | |
application/json: | |
schema: | |
required: | |
- site | |
properties: | |
values: | |
type: object | |
type: object | |
example: | |
values: [] | |
responses: | |
'200': | |
description: 'Set configuration for HAXcms' | |
/syncSite: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- git | |
- site | |
operationId: 'Operations::syncSite' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
requestBody: | |
content: | |
application/json: | |
schema: | |
required: | |
- site | |
properties: | |
site: | |
type: object | |
type: object | |
example: | |
site: | |
name: mynewsite | |
responses: | |
'200': | |
description: 'Sync the site using the git config settings in the site.json file' | |
/publishSite: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- git | |
- site | |
operationId: 'Operations::publishSite' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
requestBody: | |
content: | |
application/json: | |
schema: | |
required: | |
- site | |
properties: | |
site: | |
type: object | |
type: object | |
example: | |
site: | |
name: mynewsite | |
responses: | |
'200': | |
description: 'Publishes the site to a remote source using git settings from site.json for details ' | |
/cloneSite: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- site | |
operationId: 'Operations::cloneSite' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
requestBody: | |
content: | |
application/json: | |
schema: | |
required: | |
- site | |
properties: | |
site: | |
type: object | |
type: object | |
example: | |
site: | |
name: mynewsite | |
responses: | |
'200': | |
description: 'Clone a site by copying and renaming the folder on file system' | |
/deleteSite: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- site | |
operationId: 'Operations::deleteSite' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
requestBody: | |
content: | |
application/json: | |
schema: | |
required: | |
- site | |
properties: | |
site: | |
type: object | |
type: object | |
example: | |
site: | |
name: mynewsite | |
responses: | |
'200': | |
description: 'Delete a site from the file system' | |
/downloadSite: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- site | |
- meta | |
operationId: 'Operations::downloadSite' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
requestBody: | |
content: | |
application/json: | |
schema: | |
required: | |
- site | |
properties: | |
site: | |
type: object | |
type: object | |
example: | |
site: | |
name: mynewsite | |
responses: | |
'200': | |
description: 'Download the site folder as a zip file' | |
/archiveSite: | |
post: | |
tags: | |
- cms | |
- authenticated | |
- site | |
operationId: 'Operations::archiveSite' | |
parameters: | |
- | |
name: jwt | |
in: query | |
description: 'JSON Web token, obtain by using /login' | |
required: true | |
schema: | |
type: string | |
requestBody: | |
content: | |
application/json: | |
schema: | |
required: | |
- site | |
properties: | |
site: | |
type: object | |
type: object | |
example: | |
site: | |
name: mynewsite | |
responses: | |
'200': | |
description: 'Archive a site by moving it on the file system' | |
tags: | |
- | |
name: hax | |
description: 'Operations required for HAX editor to work' | |
externalDocs: | |
description: 'Find out more about hax editor integrations' | |
url: 'https://haxtheweb.org/integrations/create-new-ones' | |
- | |
name: cms | |
description: 'Operations for the CMS side' | |
- | |
name: site | |
description: 'Operations for sites' | |
- | |
name: node | |
description: 'Operations for individual nodes in a site' | |
- | |
name: file | |
description: 'Operations for files related to CMS or HAX' | |
- | |
name: form | |
description: 'Operations related to form submission or generation' | |
- | |
name: meta | |
description: 'Operations related to metadata management or processes' | |
- | |
name: git | |
description: 'Operations related to git / version control of the site' | |
- | |
name: user | |
description: 'Operations for the user account / object' | |
- | |
name: api | |
description: 'endpoint to generate the API or surrounding API callbacks' | |
- | |
name: settings | |
description: 'Internal settings related to configuration of this HAXcms deployment' | |
- | |
name: authenticated | |
description: 'Operations requiring authentication' | |
externalDocs: | |
description: 'HAXcms and all things HAX documentations' | |
url: 'https://haxtheweb.org/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment