diff --git a/api-doc/reference/Admin-API.v1.yaml b/api-doc/reference/Admin-API.v1.yaml index 9bb56b5ccde62a74c396cf6fb69d34c4e55f5328..5d4df4d67522a23fd146f9075c1e0593a9f0899e 100644 --- a/api-doc/reference/Admin-API.v1.yaml +++ b/api-doc/reference/Admin-API.v1.yaml @@ -17,6 +17,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Device' + examples: {} operationId: get-api-admin-device requestBody: description: '' @@ -29,19 +30,41 @@ paths: type: string in: query name: deviceId - description: Returns the device information. + description: Returns the device detailed information. put: summary: '' 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: '' 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 @@ -71,61 +94,161 @@ paths: type: string in: query name: username + description: Get a list of devices for a user. /api/admin/directory/entry: - get: - summary: Your GET endpoint - tags: [] - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/UserProfile' - operationId: get-api-admin-directory-entry - description: '' put: summary: '' operationId: put-api-admin-directory-entry responses: '200': description: OK + description: "Update a user's profile." post: - summary: '' + summary: 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: '' + operationId: delete-api-admin-directory-entry + responses: + '200': + description: OK + description: Method might probably never be implemented. /api/admin/user: get: - summary: Your GET endpoint + summary: User profile - User tags: [] - responses: {} + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/UserProfile' operationId: get-api-admin-user + description: "Get the user's profile." + parameters: + - schema: + type: string + in: query + name: username post: summary: '' operationId: post-api-admin-user responses: '200': description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Create an internal user. delete: summary: '' operationId: delete-api-admin-user responses: '200': description: OK + content: + application/json: + schema: + $ref: './User-API.v1.yaml#/components/schemas/DeviceRevocationResponse' + '500': + description: Internal Server Error + description: Revoke a user. + parameters: + - schema: + type: string + in: query + name: username put: summary: '' 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: Your GET endpoint + summary: Users Profile tags: [] - responses: {} + responses: + '200': + description: OK + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/UserProfile' operationId: get-api-admin-users + description: Return a list of users. + /api/subscription: + get: + summary: Subscription status - License + tags: [] + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriptionStatusResponse' + 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: '' + 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: System Status + tags: [] + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/FullSystemStatusResponse' + operationId: get-api-update + description: Return the current version number and the available version number of Jams(for update). + post: + summary: '' + operationId: post-api-update + responses: + '200': + description: OK + description: Update the version. components: schemas: Device: @@ -164,3 +287,65 @@ components: 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." + 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 + SubscriptionStatusResponse: + title: SubscriptionStatusResponse + type: object + 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 + FullSystemStatusResponse: + title: FullSystemStatusResponse + type: object + properties: + localVersions: + type: object + remoteVersions: + type: object + updateAvailable: + type: boolean diff --git a/api-doc/reference/Install-API.v1.yaml b/api-doc/reference/Install-API.v1.yaml index 03b15027dd565d4523768b30618c33b3af4fbcc2..0e3c6958d078a65c7456f63f8589cb2c69531580 100644 --- a/api-doc/reference/Install-API.v1.yaml +++ b/api-doc/reference/Install-API.v1.yaml @@ -13,6 +13,20 @@ paths: 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: Authentication Source + operationId: get-api-install-auth + responses: + '200': + description: OK + description: "Get server's Authentication Source." /api/install/ca: post: summary: '' @@ -20,6 +34,16 @@ paths: responses: '200': description: OK + '500': + description: Internal Server Error + description: Save Certificate Authority. + get: + summary: Certificate Request + operationId: get-api-install-ca + responses: + '200': + description: OK + description: Get Certificate Authority. /api/install/settings: post: summary: '' @@ -27,6 +51,16 @@ paths: responses: '200': description: OK + '500': + description: Internal Server Error + description: Finish Server installation. + get: + summary: '' + operationId: get-api-install-settings + responses: + '200': + description: OK + description: Get Server Settings. /api/install/start: post: summary: '' @@ -34,5 +68,52 @@ paths: responses: '200': description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthTokenResponse' + '403': + description: Forbidden + description: Authenticate user. + get: + summary: '' + 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: '' + operationId: put-api-install-start + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/AuthTokenResponse' + '500': + description: Internal Server Error + description: Create administrative user account. components: - schemas: {} + 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 diff --git a/api-doc/reference/Nameserver-API.v1.yaml b/api-doc/reference/Nameserver-API.v1.yaml index baec648acd279ccffc6982dde2375a150fde71fa..ae9de47f4fb8fb0b9f784282974d308c669fc393 100644 --- a/api-doc/reference/Nameserver-API.v1.yaml +++ b/api-doc/reference/Nameserver-API.v1.yaml @@ -16,8 +16,17 @@ paths: get: summary: Address lookup tags: [] - responses: {} + 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: @@ -31,6 +40,31 @@ paths: 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: {} + 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 diff --git a/api-doc/reference/Security-API.v1.yaml b/api-doc/reference/Security-API.v1.yaml index 05e04371a9b6cb270e7d0e9da2c43d8a9f947117..0b8d608963b591e75322988f87a5afa3d105081b 100644 --- a/api-doc/reference/Security-API.v1.yaml +++ b/api-doc/reference/Security-API.v1.yaml @@ -12,5 +12,66 @@ paths: 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/contacts: + get: + summary: User contacts + tags: [] + responses: {} + operationId: get-api-auth-contacts + description: "Get User's contacts" + put: + summary: '' + operationId: put-api-auth-contacts + responses: + '200': + description: OK + description: "Update User's contact." + delete: + summary: '' + operationId: delete-api-auth-contacts + responses: + '200': + description: OK + description: "Delete user's contact." + /api/auth/ocsp: + get: + summary: OCSP + tags: [] + responses: {} + operationId: get-api-auth-ocsp + description: Get OCSP. + /api/auth/crl: + get: + summary: CRL + tags: [] + responses: + '200': + description: OK + content: + text/plain: + schema: + type: string + operationId: get-api-auth-crl + description: Get CRL. components: schemas: {} diff --git a/api-doc/reference/User-API.v1.yaml b/api-doc/reference/User-API.v1.yaml index 07b6a4c77b933afdd75ed1daade127caaaa78e9d..fa5e3f9e44a2b2786629907657ce9c2036052190 100644 --- a/api-doc/reference/User-API.v1.yaml +++ b/api-doc/reference/User-API.v1.yaml @@ -11,6 +11,21 @@ paths: tags: [] responses: {} operationId: get-api-auth-contacts + description: "Get User's contacts." + put: + summary: '' + operationId: put-api-auth-contacts + responses: + '200': + description: OK + description: "Update User's contact." + delete: + summary: '' + operationId: delete-api-auth-contacts + responses: + '200': + description: OK + description: "Delete user's contact." '/api/auth/device/{deviceId}': parameters: - schema: @@ -29,12 +44,21 @@ paths: schema: $ref: './Admin-API.v1.yaml#/components/schemas/Device' operationId: get-api-auth-device-deviceId + description: "Get a user's specified device." put: summary: '' 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: '' operationId: post-api-auth-device-deviceId @@ -44,7 +68,23 @@ paths: content: application/json: schema: - allOf: [] + $ref: '#/components/schemas/DeviceRegistrationResponse' + '500': + description: Internal Server Error + description: Create/Store a device for a user. + delete: + summary: '' + 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 @@ -59,12 +99,22 @@ paths: 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 + summary: "Get the directories connect to JAMS, Authentication Sources' Directories" tags: [] - responses: {} + 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 @@ -77,6 +127,14 @@ paths: 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 @@ -98,14 +156,65 @@ paths: 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: User endpoint tags: [] - responses: {} + responses: + '200': + description: OK operationId: get-api-auth-user + description: "Read user's profile (User can \"read\" his own profile)." + put: + summary: '' + 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: {} + 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 + AuthModuleKey: + title: AuthModuleKey + type: object + properties: + realm: + type: string + type: + type: string + enum: + - AD + - LDAP + - LOCAL securitySchemes: API Key - 1: name: API Key