Skip to content
Snippets Groups Projects
Commit f8082a35 authored by Léo Banno-Cloutier's avatar Léo Banno-Cloutier
Browse files

api-doc: remove api-doc folder

Please refer to the README.md to generate the documentation for
jams-server with apidoc

Change-Id: I1633f3d932413b6f4e22295dee45b02e435deb01
parent 96511f30
No related branches found
No related tags found
No related merge requests found
openapi: 3.0.0
info:
title: Administration API
version: '1.0'
description: "This API is used to provide admin functions which are broader than the user's API and allow modifying users which are not oneself."
servers:
- url: 'http://localhost:8080'
paths:
/api/admin/device:
get:
summary: Get User device information
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Device'
examples:
example-1:
value:
deviceId: sfl123
displayName: ThinkpadL30
certificate: sjhgfdszwythudsiuyfdvsxkiwjhyed
operationId: get-api-admin-device
parameters:
- schema:
type: string
in: query
name: username
- schema:
type: string
in: query
name: deviceId
description: Returns the device detailed information.
put:
summary: Update device data
operationId: put-api-admin-device
responses:
'200':
description: OK
'500':
description: Internal Server Error
description: Update device data.
parameters:
- schema:
type: string
in: query
name: username
- schema:
type: string
in: query
name: deviceId
- schema:
type: string
in: query
name: deviceName
delete:
summary: Delete a device
operationId: delete-api-admin-device
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: './User-API.v1.yaml#/components/schemas/DeviceRevocationResponse'
'500':
description: Internal Server Error
parameters:
- schema:
type: string
in: query
name: username
- schema:
type: string
in: query
name: deviceId
description: Revoke/Delete a device.
/api/admin/devices:
get:
summary: "Get User's list of devices"
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Device'
examples:
example-1:
value:
- deviceId: sfl123
displayName: ThinkpadL30
certificate: sjhgfdszwythudsiuyfdvsxkiwjhyed
- deviceId: sfl1234
displayName: ThinkpadL304
certificate: sjhgfdszwyth4udsiuyfdvsxkiwjhyed
operationId: get-api-admin-devices
parameters:
- schema:
type: string
in: query
name: username
description: Get a list of devices for a user.
/api/admin/directory/entry:
put:
summary: Update user profile
operationId: put-api-admin-directory-entry
responses:
'200':
description: OK
description: "Update a user's profile."
post:
summary: Create User profile
operationId: post-api-admin-directory-entry
responses:
'200':
description: OK
'500':
description: Internal Server Error
description: Create a user profile.
parameters:
- schema:
type: string
in: query
name: directory
delete:
summary: Delete user profile
operationId: delete-api-admin-directory-entry
responses:
'200':
description: OK
description: Method might probably never be implemented.
/api/admin/user:
get:
summary: Get User profile
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/UserProfile'
examples:
example-1:
value:
username: lily
firstName: Lilye
lastName: Aldrin
phoneNumber: '5149876554'
phoneNumberExtension: '123'
mobileNumber: '4381230987'
faxNumber: '1239876543'
profilePicture: eowiiewjdkfjrekjdvreqljdlfrlqdmf
email: askiur@sfl.com
organization: SFL
operationId: get-api-admin-user
description: "Get the user's profile."
parameters:
- schema:
type: string
in: query
name: username
post:
summary: Create internal user
operationId: post-api-admin-user
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/User'
examples:
example-1:
value:
username: lily
password: abcs123
userType: LOCAL
realm: ''
accessLevel: USER
needsPasswordReset: 'false'
ethAddress: ''
ethKey: ''
jamiId: ''
description: Create an internal user.
delete:
summary: Delete a user
operationId: delete-api-admin-user
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: './User-API.v1.yaml#/components/schemas/DeviceRevocationResponse'
examples:
example-1:
value:
success: 'true'
errorDetails: ''
timestamp: '2020-06-01T12:30:01'
'500':
description: Internal Server Error
description: Revoke a user.
parameters:
- schema:
type: string
in: query
name: username
put:
summary: Update user data
operationId: put-api-admin-user
responses:
'200':
description: OK
'500':
description: Internal Server Error
description: Update User data.
parameters:
- schema:
type: string
in: query
name: username
- schema:
type: string
in: query
name: password
/api/admin/users:
get:
summary: Get Users Profile list
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/UserProfile'
examples:
example-1:
value:
- username: lily
firstName: Lilye
lastName: Aldrin
phoneNumber: '5149876554'
phoneNumberExtension: '123'
mobileNumber: '4381230987'
faxNumber: '1239876543'
profilePicture: eowiiewjdkfjrekjdvreqljdlfrlqdmf
email: askiur@sfl.com
organization: SFL
- username: ErikMar
firstName: Marshall
lastName: Eriksen
phoneNumber: '5149876554'
phoneNumberExtension: '123'
mobileNumber: '4381230987'
faxNumber: '1239876543'
profilePicture: eowiiewjdkfjrekjdvreqljdlfrlqdmf
email: askiur@sfl.com
organization: SFL
operationId: get-api-admin-users
description: Return a list of users.
/api/subscription:
get:
summary: Get Subscription status
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SubscriptionStatusResponse'
examples:
example-1:
value:
licenseInformation:
type: COMMUNITY
products: []
activated: true
versions:
Key: ''
FIleDescription: {}
headers:
Access-Control-Allow-Origin:
schema:
type: string
description: Server Domain of Certificate Authority
operationId: get-api-subscription
description: Get the subscription status.
post:
summary: Upload License
operationId: post-api-subscription
responses:
'200':
description: OK
description: 'Upload the license here, which is basically just uploading a base64 representation of the keypair - and store on disk.'
/api/update:
get:
summary: Get System Status (current and available versions)
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/FullSystemStatusResponse'
examples:
example-1:
value:
localVersions:
Key: ''
FIleDescription: []
remoteVersions:
Key: ''
FIleDescription: {}
updateAvailable: false
operationId: get-api-update
description: Return the current version number and the available version number of Jams(for update).
post:
summary: Update version
operationId: post-api-update
responses:
'200':
description: OK
description: Update the version.
components:
schemas:
Device:
title: Device
type: object
properties:
deviceId:
type: string
displayName:
type: string
certificate:
type: string
description: "The user's Jami device."
x-examples:
example-1:
deviceId: sfl123
displayName: ThinkpadL30
certificate: sjhgfdszwythudsiuyfdvsxkiwjhyed
UserProfile:
title: UserProfile
type: object
properties:
username:
type: string
firstName:
type: string
lastName:
type: string
phoneNumber:
type: string
phoneNumberExtension:
type: string
mobileNumber:
type: string
faxNumber:
type: string
profilePicture:
type: string
email:
type: string
organization:
type: string
description: "The user's extended information which is not critical to Jami operations, usually provided by LDAP, Active Directory or other backend."
x-examples:
example-1:
username: lily
firstName: Lilye
lastName: Aldrin
phoneNumber: '5149876554'
phoneNumberExtension: '123'
mobileNumber: '4381230987'
faxNumber: '1239876543'
profilePicture: eowiiewjdkfjrekjdvreqljdlfrlqdmf
email: askiur@sfl.com
organization: SFL
User:
title: User
type: object
properties:
username:
type: string
password:
type: string
userType:
type: string
enum:
- AD
- LDAP
- LOCAL
realm:
type: string
accessLevel:
type: string
enum:
- ADMIN
- USER
needsPasswordReset:
type: boolean
ethAddress:
type: string
ethKey:
type: string
jamiId:
type: string
x-examples:
example-1:
username: lily
password: abcs123
userType: LOCAL
realm: ''
accessLevel: USER
needsPasswordReset: 'false'
ethAddress: ''
ethKey: ''
jamiId: ''
SubscriptionStatusResponse:
title: SubscriptionStatusResponse
type: object
x-examples:
example-1:
licenseInformation:
type: COMMUNITY
products: []
activated: true
versions:
Key: ''
FIleDescription: {}
properties:
licenseInformation:
$ref: '#/components/schemas/LicenseInformation'
activated:
type: boolean
versions:
type: object
LicenseInformation:
title: LicenseInformation
type: object
properties:
type:
type: string
enum:
- COMMUNITY
- PREMIUM
products:
type: array
items:
type: string
x-examples: {}
FullSystemStatusResponse:
title: FullSystemStatusResponse
type: object
properties:
localVersions:
type: object
remoteVersions:
type: object
updateAvailable:
type: boolean
x-examples:
example-1:
localVersions:
Key: ''
FIleDescription: []
remoteVersions:
Key: ''
FIleDescription: {}
updateAvailable: false
openapi: 3.0.0
info:
title: Install API
version: '1.0'
description: This API is used by the Web-UI installer in order to get JAMS up and running.
servers:
- url: 'http://localhost:3000'
paths:
/api/install/auth:
post:
summary: Configure Authentication Source for Server
operationId: post-api-install-auth
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AuthTokenResponse'
'500':
description: Internal Server Error
description: 'Configure Server to use selected Authentication Source as authentication backend, save settings in config.json file.'
get:
summary: Get Authentication Source for server
operationId: get-api-install-auth
responses:
'200':
description: OK
description: "Get server's Authentication Source."
/api/install/ca:
post:
summary: Save Certificate Authority
operationId: post-api-install-ca
responses:
'200':
description: OK
'500':
description: Internal Server Error
description: Save Certificate Authority.
get:
summary: Get Certificate Authority
operationId: get-api-install-ca
responses:
'200':
description: OK
description: Get Certificate Authority.
/api/install/settings:
post:
summary: Finish Server installation
operationId: post-api-install-settings
responses:
'200':
description: OK
'500':
description: Internal Server Error
description: Finish Server installation.
get:
summary: Get Server Settings
operationId: get-api-install-settings
responses:
'200':
description: OK
description: Get Server Settings.
/api/install/start:
post:
summary: Authenticate user
operationId: post-api-install-start
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AuthTokenResponse'
'403':
description: Forbidden
description: Authenticate user.
get:
summary: Check if user should login or sign-up
operationId: get-api-install-start
responses:
'200':
description: OK
headers:
showLogin:
schema:
type: boolean
description: 'true'
description: Check if user should login or sign-up.
put:
summary: Create administrative user account
operationId: put-api-install-start
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AuthTokenResponse'
examples:
example-1: {}
'500':
description: Internal Server Error
description: Create administrative user account.
components:
schemas:
AuthTokenResponse:
title: AuthTokenResponse
type: object
properties:
token_type:
type: string
access_token:
type: string
expires_in:
type: number
scope:
type: string
enum:
- ADMIN
- USER
openapi: 3.0.0
info:
title: Nameserver API
version: '1.0'
description: This is the Jami-compatible implementation of the nameserver.
servers:
- url: 'http://localhost:8080'
paths:
'/api/nameserver/addr/{addr}':
parameters:
- schema:
type: string
name: addr
in: path
required: true
get:
summary: Get Username from Adress
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/AddrLookupResponse'
'404':
description: Not Found
operationId: get-api-nameserver-addr-addr
description: Get Username from Adress.
'/api/nameserver/name/{name}':
parameters:
- schema:
type: string
name: name
in: path
required: true
get:
summary: Get Address from username
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/NameLookupResponse'
'404':
description: Not Found
operationId: get-api-nameserver-name-name
description: Get Address from username.
components:
schemas:
AddrLookupResponse:
title: AddrLookupResponse
type: object
properties:
name:
type: string
NameLookupResponse:
title: NameLookupResponse
type: object
properties:
name:
type: string
addr:
type: string
publicKey:
type: string
signature:
type: string
openapi: 3.0.0
info:
title: Security API
version: '1.0'
servers:
- url: 'http://localhost:8080'
paths:
/api/auth/login:
post:
summary: Login and Receive Auth Token
operationId: post-api-auth-login
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: './Install-API.v1.yaml#/components/schemas/AuthTokenResponse'
'403':
description: Forbidden
description: This method returns the token which is used for all the next calls to the API.
parameters:
- schema:
type: string
in: query
name: username
- schema:
type: string
in: query
name: password
- schema:
type: string
in: header
name: authorization
/api/auth/ocsp:
get:
summary: Get OCSP
tags: []
responses: {}
operationId: get-api-auth-ocsp
description: Get OCSP.
/api/auth/crl:
get:
summary: Get CRL
tags: []
responses:
'200':
description: OK
content:
text/plain:
schema:
type: string
operationId: get-api-auth-crl
description: Get CRL.
components:
schemas: {}
openapi: 3.0.0
info:
title: User API
version: '1.0'
servers:
- url: 'http://localhost:8080'
paths:
/api/auth/contacts:
get:
summary: "Get User's list of contacts"
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Contact'
operationId: get-api-auth-contacts
description: "Get User's contacts."
put:
summary: "Update a User's contact"
operationId: put-api-auth-contacts
responses:
'200':
description: OK
'500':
description: Internal Server Error
description: "Update User's contact."
delete:
summary: "Delete a user's contact"
operationId: delete-api-auth-contacts
responses:
'200':
description: OK
'500':
description: Internal Server Error
description: "Delete user's contact."
'/api/auth/device/{deviceId}':
parameters:
- schema:
type: string
name: deviceId
in: path
required: true
get:
summary: Get user specified device
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: './Admin-API.v1.yaml#/components/schemas/Device'
operationId: get-api-auth-device-deviceId
description: "Get a user's specified device."
put:
summary: "Update user's device informations"
operationId: put-api-auth-device-deviceId
responses:
'200':
description: OK
'500':
description: Internal Server Error
description: "Update a user's device informations."
parameters:
- schema:
type: string
in: query
name: deviceName
post:
summary: "Create/Store a user's device"
operationId: post-api-auth-device-deviceId
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/DeviceRegistrationResponse'
'500':
description: Internal Server Error
description: Create/Store a device for a user.
delete:
summary: "Delete user's device"
operationId: delete-api-auth-device-deviceId
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/DeviceRevocationResponse'
'500':
description: Internal Server Error
description: "Delete a user's device."
/api/auth/devices:
get:
summary: Get the list of devices
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: './Admin-API.v1.yaml#/components/schemas/Device'
operationId: get-api-auth-devices
description: "Get user's devices."
/api/auth/directories:
get:
summary: "Get the directories connect to JAMS, Authentication Sources' Directories"
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/AuthModuleKey'
operationId: get-api-auth-directories
description: Get directories in Authentication Sources (Local/AD/LDAP).
/api/auth/directory/entry:
get:
summary: Get the profile of a user
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: './Admin-API.v1.yaml#/components/schemas/UserProfile'
operationId: get-api-auth-directory-entry
description: 'This is an endpoint to manipulate directory entry-data, this make sense only for local setups. Get a user profile from a directory.'
put:
summary: ''
operationId: put-api-auth-directory-entry
responses:
'200':
description: OK
description: Modify a profile only in the case of a LOCAL directory.
/api/auth/directory/search:
get:
summary: Search the directory
tags: []
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: './Admin-API.v1.yaml#/components/schemas/UserProfile'
'':
content:
application/json:
schema:
type: array
items:
$ref: './Admin-API.v1.yaml#/components/schemas/UserProfile'
operationId: get-api-auth-directory-search
description: Search user profiles in directory.
/api/auth/user:
get:
summary: Read user profile
tags: []
responses:
'200':
description: OK
operationId: get-api-auth-user
description: "Read user's profile (User can \"read\" his own profile)."
put:
summary: Update some user profiles fields if LOCAL authentication source
operationId: put-api-auth-user
responses:
'200':
description: OK
'500':
description: Internal Server Error
description: "Update some user profile's fields(password, privatekey, publickey) if authentication source is LOCAL."
components:
schemas:
DeviceRegistrationResponse:
title: DeviceRegistrationResponse
type: object
properties:
certificateChain:
type: string
displayName:
type: string
nameServer:
type: string
deviceReceipt:
type: string
receiptSignature:
type: string
userPhoto:
type: string
DeviceRevocationResponse:
title: DeviceRevocationResponse
type: object
properties:
success:
type: boolean
errorDetails:
type: string
timestamp:
type: string
x-examples:
example-1:
success: 'true'
errorDetails: ''
timestamp: '2020-06-01T12:30:01'
AuthModuleKey:
title: AuthModuleKey
type: object
properties:
realm:
type: string
type:
type: string
enum:
- AD
- LDAP
- LOCAL
Contact:
title: Contact
type: object
description: Contact database object
properties:
owner:
type: string
uri:
type: string
displayName:
type: string
securitySchemes:
API Key - 1:
name: API Key
type: apiKey
in: query
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment