added registry module

This commit is contained in:
balzack 2021-12-21 00:13:48 -08:00
parent f6948d079e
commit fb56679f0d

262
api.oa3
View File

@ -16,7 +16,9 @@ tags:
- name: revision - name: revision
description: websocket endpoint for receiving module revision events description: websocket endpoint for receiving module revision events
- name: portal - name: portal
description: portal creation and configuration for portal backend description: account creation and configuration for portal backend. supports app attachment
- name: registry
description: listing of public accounts
- name: profile - name: profile
description: getting and setting of the public profile description: getting and setting of the public profile
- name: content - name: content
@ -34,7 +36,7 @@ paths:
get: get:
tags: tags:
- revision - revision
summary: Websocket placeholder endpoint for receiving revision updates description: Websocket placeholder endpoint for receiving revision updates
operationId: websocket operationId: websocket
responses: responses:
'200': '200':
@ -44,7 +46,7 @@ paths:
get: get:
tags: tags:
- portal - portal
summary: Check if portal params have been set description: Check if portal params have been set
operationId: get-config operationId: get-config
responses: responses:
'200': '200':
@ -58,7 +60,7 @@ paths:
post: post:
tags: tags:
- portal - portal
summary: Set admin password and node domain description: Set admin password and node domain
operationId: set-config operationId: set-config
security: security:
- basicAuth: [] - basicAuth: []
@ -79,7 +81,7 @@ paths:
put: put:
tags: tags:
- portal - portal
summary: Set portal domain description: Set portal domain
operationId: set-domain operationId: set-domain
security: security:
- basicAuth: [] - basicAuth: []
@ -168,7 +170,7 @@ paths:
post: post:
tags: tags:
- portal - portal
summary: Generate authentication update token description: Generate authentication update token
operationId: prepare-authentication operationId: prepare-authentication
security: security:
- basicAuth: [] - basicAuth: []
@ -186,7 +188,7 @@ paths:
put: put:
tags: tags:
- portal - portal
summary: Update authentication with extra auth header description: Update authentication with extra auth header
operationId: set-authentication operationId: set-authentication
security: security:
- bearerAuth: [] - bearerAuth: []
@ -205,12 +207,12 @@ paths:
'500': '500':
description: internal server error description: internal server error
/portal/profile/code: /portal/profile/attachment:
put: post:
tags: tags:
- portal - portal
summary: Generate pass code description: Generate attach token
operationId: set-access-code operationId: create-attach-token
security: security:
- basicAuth: [] - basicAuth: []
responses: responses:
@ -224,12 +226,99 @@ paths:
description: invalid password description: invalid password
'500': '500':
description: internal server error description: internal server error
put:
tags:
- portal
description: Apply attach token
operationId: apply-attach-token
security:
- bearerAuth: []
responses:
'201':
description: generated
content:
application/json:
schema:
type: string
'401':
description: invalid token
'406':
description: app limit reached
'500':
description: internal server error
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AppData'
/portal/profile/apps:
get:
tags:
- portal
description: Get list of attached apps
operationId: get-apps
security:
- basicAuth: []
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
type: string
'401':
description: invalid password
'404':
description: handle not found
'500':
description: internal server error
/portal/profile/config:
get:
tags:
- portal
description: Get account config
operationId: get-account-config
security:
- basicAuth: []
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/AccountConfig'
'401':
description: authentication error
'500':
description: internal server error
put:
tags:
- portal
description: Set account config
operationId: set-account-config
security:
- basicAuth: []
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/AccountConfig'
'401':
description: authentication error
'500':
description: internal server error
/portal/token: /portal/token:
get: get:
tags: tags:
- portal - portal
summary: Check if bearer token is valid description: Check if bearer token is valid
operationId: check-token operationId: check-token
security: security:
- bearerAuth: [] - bearerAuth: []
@ -243,7 +332,7 @@ paths:
put: put:
tags: tags:
- portal - portal
summary: Create password reset token description: Create password reset token
operationId: set-account operationId: set-account
security: security:
- basicAuth: [] - basicAuth: []
@ -270,7 +359,7 @@ paths:
post: post:
tags: tags:
- portal - portal
summary: Create new portal token description: Create new portal token
operationId: add-account operationId: add-account
security: security:
- basicAuth: [] - basicAuth: []
@ -362,11 +451,60 @@ paths:
'500': '500':
description: internal server error description: internal server error
/registry/accounts:
get:
tags:
- registry
description: Get list of publically searchable profiles
operationId: get-public-profiles
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Profile'
'401':
description: invalid password
'404':
description: account not found
'500':
description: internal server error
/registry/accounts/{guid}:
get:
tags:
- registry
description: Get public profile of specified account
operationId: get-profile-message
parameters:
- name: guid
in: path
description: id of specified account
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/DataMessage'
'401':
description: invalid password
'404':
description: account not found
'500':
description: internal server error
/sample: /sample:
put: put:
tags: tags:
- sample - sample
summary: sample description: sample
operationId: sample operationId: sample
responses: responses:
'400': '400':
@ -434,34 +572,100 @@ components:
type: object type: object
required: required:
- guid - guid
- handle - data
- name
- description
- location
- revision - revision
- node - node
properties: properties:
id: guid:
type: string
name:
type: string
description:
type: string
location:
type: string type: string
data:
$ref: '#/components/schemas/ProfileData'
revision: revision:
type: integer type: integer
format: int64 format: int64
node: node:
type: string type: string
ProfileData:
type: object
properties:
handle:
type: string
name:
type: string
description:
type: string
image:
type: string
format: base64 encoded data
location:
type: string
AccountConfig:
type: object
properties:
searchable:
type: boolean
App:
type: object
required:
- appId
- appData
- attached
properties:
appId:
type: string
appData:
$ref: '#/components/schemas/AppData'
attached:
type: integer
format: int32
AppData:
type: object
properties:
name:
type: string
description:
type: string
url:
type: string
image:
type: string
format: base64 encoded image
DataMessage:
type: object
required:
- message
- messageType
- keyType
- publicKey
- signature
properties:
messageTyep:
type: string
enum: [OpenConnection, CloseConnection, Profile]
format: type of key
message:
type: string
format: base64 encoded object
keyType:
type: string
enum: [RSA4096, RSA2048]
format: type of key
publicKey:
type: string
format: base64 encoding of account key
requestBodies: requestBodies:
Sample: Sample:
content: content:
application/json: application/json:
schema: schema:
$ref: '#/components/schemas/Pet' $ref: '#/components/schemas/Profile'
description: Sample description: Sample
required: true required: true