openapi: 3.2.0 info: description: 'The API for Relay by Flume Health. For more information about how Flume can power your health plan, please [contact us](mailto:sales@flumehealth.com). [Redoc](/api/docs/) | [Swagger - Try It](/api/swagger/) ' title: Flume Console Accounts API contact: {} version: '1.0' x-logo: altText: Flume Health url: https://public-static.flume.health/front/logo-margin-512.png servers: - url: https://console.flumehealth.com/ - url: http://console.flumehealth.com/ tags: - name: Accounts paths: /api/v1/accounts: get: description: Lists Accounts. tags: - Accounts summary: List Accounts operationId: listAccounts parameters: - description: X-Flume-Account-ID name: X-Flume-Account-ID in: header schema: type: string - description: The page to request. Should be a previously-received nextPageToken name: pageToken in: query schema: type: string - description: Number of Accounts to return name: pageSize in: query schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/account.ListResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' default: description: '' content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' security: - OAuth2Implicit: - openid - profile - email post: description: Creates an Account. tags: - Accounts summary: Create Account operationId: createAccount parameters: - description: X-Flume-Account-ID name: X-Flume-Account-ID in: header schema: type: string responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/account.ReadModel' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' default: description: '' content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' security: - OAuth2Implicit: - openid - profile - email requestBody: content: application/json: schema: $ref: '#/components/schemas/account.WriteModel' description: Account Body required: true /api/v1/accounts/{id}: get: description: Gets an Account. tags: - Accounts summary: Get Account operationId: getAccount parameters: - description: X-Flume-Account-ID name: X-Flume-Account-ID in: header schema: type: string - description: id of the account name: id in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/account.ReadModel' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' default: description: '' content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' security: - OAuth2Implicit: - openid - profile - email put: description: Updates an Account. tags: - Accounts summary: Update Account With PUT operationId: updateAccountWithPut parameters: - description: X-Flume-Account-ID name: X-Flume-Account-ID in: header schema: type: string - description: id of the account name: id in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/account.ReadModel' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' default: description: '' content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' security: - OAuth2Implicit: - openid - profile - email requestBody: content: application/json: schema: $ref: '#/components/schemas/account.UpdateModel' description: Account Body required: true patch: description: Updates an Account. tags: - Accounts summary: Update Account operationId: updateAccount parameters: - description: X-Flume-Account-ID name: X-Flume-Account-ID in: header schema: type: string - description: id of the account name: id in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/account.ReadModel' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' default: description: '' content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' security: - OAuth2Implicit: - openid - profile - email requestBody: content: application/json: schema: $ref: '#/components/schemas/account.UpdateModel' description: Account Body required: true /api/v1/accounts/{id}/config: get: description: Gets an Account Config. tags: - Accounts summary: Get Account Config operationId: getAccountConfig parameters: - description: X-Flume-Account-ID name: X-Flume-Account-ID in: header schema: type: string - description: id of the account name: id in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/account.ReadAccountConfigModel' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' default: description: '' content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' security: - OAuth2Implicit: - openid - profile - email patch: description: Updates an Account Config. tags: - Accounts summary: Update Account Config operationId: updateAccountConfig parameters: - description: X-Flume-Account-ID name: X-Flume-Account-ID in: header schema: type: string - description: id of the account name: id in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/account.UpdateAccountConfigModel' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' default: description: '' content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' security: - OAuth2Implicit: - openid - profile - email requestBody: content: application/json: schema: $ref: '#/components/schemas/account.UpdateAccountConfigModel' description: Account Body required: true /api/v1/accounts/{id}/secret: get: description: Get an account secret. tags: - Accounts summary: Get Account Secret operationId: getAccountSecret parameters: - description: X-Flume-Account-ID name: X-Flume-Account-ID in: header schema: type: string - description: id of the account name: id in: path required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/secret.ApiCloudCredSecret' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' default: description: '' content: application/json: schema: $ref: '#/components/schemas/responses.ErrorResponse' security: - OAuth2Implicit: - openid - profile - email components: schemas: account.ListResponse: type: object properties: accounts: type: array items: $ref: '#/components/schemas/account.ReadModel' nextPageToken: type: string account.AccountConfigColors: type: object properties: primary: type: string secondary: type: string tertiary: type: string secret.ApiCloudCredSecret: type: object properties: name: type: string value: $ref: '#/components/schemas/cloudstoragecredentials.CloudStorageCredentials' cloudstoragecredentials.CloudStorageCredentials: type: object additionalProperties: type: string account.ReadModel: type: object properties: blobConfig: $ref: '#/components/schemas/account.BlobConfig' createTime: type: string id: description: System-set properties type: integer isDisabled: type: boolean name: type: string restrictMapAccess: type: boolean cloudstoragecredentials.CredentialType: type: string enum: - AwsStatic - AwsWebIdentity - GcpServiceAccount - AzureSharedKey - AzureSharedAccessSignature - AzureConnectionString x-enum-varnames: - CredentialTypeAwsStatic - CredentialTypeAwsWebIdentity - CredentialTypeGcpServiceAccount - CredentialTypeAzureSharedKey - CredentialTypeAzureSharedAccessSignature - CredentialTypeAzureConnectionString responses.ErrorResponse: type: object properties: code: type: integer details: type: array items: type: string message: type: string account.UpdateAccountConfigModel: type: object properties: colors: $ref: '#/components/schemas/account.AccountConfigColors' favicon: type: string logo: type: string account.ReadAccountConfigModel: type: object properties: accountId: type: integer colors: $ref: '#/components/schemas/account.AccountConfigColors' displayName: type: string favicon: type: string logo: type: string account.BlobConfig: type: object properties: bucketName: type: string bucketPath: type: string credentialType: $ref: '#/components/schemas/cloudstoragecredentials.CredentialType' credentials: description: "* `AwsStatic`\n * `AccessKeyID` - AWS access key ID\n * `SecretAccessKey` - AWS secret access key\n * `Region` - AWS region\n * `Endpoint` - AWS endpoint (optional)\n * `GcpServiceAccount`\n * `ServiceAccountJSON` - JSON string of the service account credentials\n * `AzureSharedKey`\n * `StorageAccount` - Azure storage account name\n * `SharedKey` - Azure storage account shared key\n * `AzureSharedAccessSignature`\n * `StorageAccount` - Azure storage account name\n * `SasToken` - Azure storage account shared access signature token\n * `AzureConnectionString`\n * `ConnectionString` - Azure storage account connection string" allOf: - $ref: '#/components/schemas/cloudstoragecredentials.CloudStorageCredentials' credentialsName: type: string account.WriteModel: type: object required: - name properties: blobConfig: $ref: '#/components/schemas/account.BlobConfig' isDisabled: type: boolean name: type: string minLength: 1 restrictMapAccess: type: boolean account.UpdateModel: type: object properties: blobConfig: $ref: '#/components/schemas/account.BlobConfig' isDisabled: type: boolean name: type: string minLength: 1 restrictMapAccess: type: boolean securitySchemes: OAuth2Implicit: type: oauth2 flows: implicit: scopes: email: User email address openid: OpenID Connect scope profile: User profile information authorizationUrl: https://auth.flumehealth.com/authorize?audience=https://console.flumehealth.com/api