openapi: 3.2.0 info: title: CoreStack External Master Account API version: 1.0.0 termsOfService: http://corestack.io/ license: name: CoreStack Inc License url: http://corestack.io/licenses/LICENSE-2.0.html description: Manage Master Account servers: - url: / tags: - name: MasterAccount description: Manage Master Account paths: /v1/master_accounts: post: responses: '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelError' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelError' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelError' '201': description: Created content: application/json: schema: $ref: '#/components/schemas/CreateMasterAccountResponse' description: Creates a new master account under a CoreStack account. There can be multiple tenants within a CoreStack account. operationId: createMasterAccount security: - auth_token: [] tags: - MasterAccount requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateMasterAccountRequest' required: true /v1/master_accounts/batch: post: responses: '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelError' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelError' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelError' '200': description: Success content: application/json: schema: $ref: '#/components/schemas/MasterAccountBatchResponse' description: Master Account Batch operationId: MasterAccountBatch security: - auth_token: [] tags: - MasterAccount requestBody: content: application/json: schema: $ref: '#/components/schemas/BatchRequest' required: true /v1/master_accounts/item/{master_account_id}: parameters: - name: master_account_id in: path required: true schema: type: string delete: responses: '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ModelError' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelError' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelError' '200': description: Removed content: application/json: schema: type: boolean summary: Master Account Delete description: Delete the master account operationId: MasterAccountDelete security: - auth_token: [] tags: - MasterAccount get: responses: '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ModelError' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelError' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelError' '200': description: Success content: application/json: schema: $ref: '#/components/schemas/MasterAccountDetails' summary: Master Account View description: View the master account operationId: MasterAccountView security: - auth_token: [] tags: - MasterAccount put: responses: '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelError' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/ModelError' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelError' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelError' '200': description: Success content: application/json: schema: $ref: '#/components/schemas/MasterAccountDetails' summary: Master Account Update description: Update the master account operationId: MasterAccountUpdate security: - auth_token: [] tags: - MasterAccount requestBody: content: application/json: schema: $ref: '#/components/schemas/MasterAccountDetails' required: true /v1/master_accounts/list: post: responses: '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/ModelError' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ModelError' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ModelError' '200': description: Success content: application/json: schema: $ref: '#/components/schemas/ListResponse' description: List master account operationId: ListMasterAccount security: - auth_token: [] tags: - MasterAccount requestBody: content: application/json: schema: $ref: '#/components/schemas/MasterAccountListRequest' required: true components: schemas: MasterAccountDomainInfo: properties: domain_name: type: string description: Domain Name role_ids: type: array description: list of role ids items: type: string x-cs-type: ObjectId allow_auto_signup: type: boolean description: Flag set to allow auto signup for new users type: object FiscalYearConfiguration: properties: start: type: string description: Start Date for Financial Year in DD-MMM format end: type: string description: End Date for Financial Year in DD-MMM format type: object MasterAccountNotificationSetting: properties: organization_name: type: string description: Organization name support_email: type: string description: Support email activation_email: type: string description: Activation email activation_email_type: type: string description: Activation email type email_template: type: string description: Email Template custom_domain_name: type: string description: Custom domain name header_logo: type: string description: Header Logo banner_logo: type: string description: Banner Logo footer_text: type: string description: Footer text template_type: type: string description: Type of template email_settings: description: Email settings $ref: '#/components/schemas/MasterAccountEmailSetting' to_address: type: string description: To Address subject: type: string description: Subject message: type: string description: Message user_guide_url: type: string description: User Guide URL support_url: type: string description: Support URL terms_and_conditions_url: type: string description: Terms and Conditions URL support_tool_account_id: type: string description: Integrated Tool for support system x-cs-type: ObjectId type: object NextgenReportSettings: properties: max_allowed_groupby_count: type: integer description: Maximum number of group by fields allowed in a report type: object MasterAccountBatchResponse: properties: results: type: object description: Map from identifier to response model additionalProperties: $ref: '#/components/schemas/MasterAccountDetails' type: object MasterAccountListFilters: properties: search: type: string description: Text query to search by name and status status: type: string description: Status of the master account example: active enum: - active - inactive x-cs-enum-type: MasterAccountStatus account_status: type: string description: Status of the master account subscription example: pending enum: - pending - active - expired - cancelled x-cs-enum-type: MasterAccountSubscriptionStatus auth_type: type: string description: Auth type of the master account example: azure_active_directory enum: - azure_active_directory - corestack - azure_sso - AD_LDAP - CAS - Okta - onelogin - openid_connect x-cs-enum-type: MasterAccountAuthType created_from: type: string description: 'Datetime string to filter accounts by created date. Format: yyyy-mm-dd hh:mm:ss.fff' type: object MasterAccountAuthConfig: properties: auth_type: type: string description: Type of Authentication domain_info: type: array description: Domain information items: $ref: '#/components/schemas/MasterAccountDomainInfo' type: object RoleInfoModel: properties: tenant_id: type: string description: Tenant id roles: type: array description: list of role ids assigned to user items: type: string type: object ThirdPartySubscription: properties: provider: type: string description: Provider of subscription type: type: string description: Type of subscription example: marketplace enum: - marketplace x-cs-enum-type: ThirdPartySubscriptionType subscription_name: type: string description: Subscription Name subscription_id: type: string description: Subscription ID plan_id: type: string description: Plan ID offer_id: type: string description: Offer ID purchaser_email: type: string description: Purchaser Email Id activation_details: description: Activation Details $ref: '#/components/schemas/ActivationDetails' type: object MasterAccountSubscription: properties: action: type: string description: Action will be create for project master creation subscription_id: type: string description: Subscription id of user type: object MasterAccountListRequest: properties: list_context: description: Optional list context $ref: '#/components/schemas/ListContext' sort: type: array description: Sort criteria items: $ref: '#/components/schemas/MasterAccountDetailsSortCriteria' filters: description: Filters for the request $ref: '#/components/schemas/MasterAccountListFilters' type: object MasterAccountEmailSetting: required: - email - password - smtp - smtp_port - username properties: smtp: type: string description: SMTP smtp_port: type: integer description: Smtp port no username: type: string description: User name email: type: string description: Email password: type: string description: Password for email x-cs-type: SensitiveString enable_starttls: type: boolean description: Enable Starttls type: object ConfigurationForNotifications: properties: enabled: type: boolean description: Whether Notifications Are Enabled emails: type: array description: Emails items: type: string webhooks: type: array description: Webhooks items: type: string microsoft_teams_webhooks: type: array description: Microsoft Teams Webhooks items: type: string type: object ModelError: required: - message properties: message: type: string description: Error response message. type: object MasterAccountDetailsSortCriteria: required: - column properties: column: type: string example: CreatedAt enum: - CreatedAt x-cs-enum-type: MasterAccountDetailsSortColumn ascending: type: boolean type: object KeyValuePair: properties: key: type: string description: Key of the pair value: type: string description: Value of the pair type: object ListContext: properties: batch_size: type: integer description: Max number of ids in the response batch_offset: type: integer description: Offset of batches into the results. First batch is 0 total: type: integer description: Total number of results type: object BatchRequest: properties: ids: type: array description: Identifiers to fetch items: type: string type: object CreateMasterAccountRequest: allOf: - $ref: '#/components/schemas/MasterAccountBase' - required: - name - tenant_name properties: name: type: string description: Name of the master account. It can be only alphanumeric tenant_name: type: string description: Tenant name. It can be only alphanumeric sso_tenant_id: type: string description: SSO tenant id third_party_subscription_details: description: Third party subscription details $ref: '#/components/schemas/ThirdPartySubscription' type: object CostProcessingSettings: properties: max_tag_value_count: type: integer description: Maximum number of unique values per tag to process for cost allocation tags number_of_months_to_backfill: type: integer description: Back filling value for cost processing (in months) type: object ListResponse: properties: results: type: array description: List of result identifiers items: type: string next_list_context: description: List context $ref: '#/components/schemas/ListContext' type: object ConfigurationForCostAnomalyNotification: allOf: - $ref: '#/components/schemas/ConfigurationForNotifications' - properties: enable_realtime_notification: type: boolean description: Specifies whether realtime notification enabled or not. enable_daily_summary_notification: type: boolean description: Specifies whether daily summary notification enabled or not. type: object MasterAccountCostRecommendationSettings: required: - product properties: product: type: string description: Name of the product example: AppSecOps enum: - AppSecOps - Assessments - CloudOps - FinOps - Product_Admin - SecOps - Self Service - StackOps x-cs-enum-type: ProductEnum cloud_native_recommendation_sync_enabled: type: boolean description: Enable/Disable cloud native recommendation sync for the product type: object MasterAccountDetails: allOf: - $ref: '#/components/schemas/MasterAccountBase' - properties: status: type: string description: Master account status created_by: type: string description: Name of the user created this master account. updated_by: type: string description: Name of the user last updated this master account. updated_at: type: string format: date-time description: DateTime in UTC when the master account was last updated. created_at: type: string format: date-time description: DateTime in UTC when the master account was created. auth_config: type: array description: Auth Configuration items: $ref: '#/components/schemas/MasterAccountAuthConfig' mcp_server_enabled: type: boolean description: Checks if the account is mcp server enabled or not automation_workflow_enabled: type: boolean description: Checks if the accounts automation workflow configuration has enabled or not cost_anomaly_settings: $ref: '#/components/schemas/CostAnomalyConfiguration' cost_recommendation_settings: type: array items: $ref: '#/components/schemas/MasterAccountCostRecommendationSettings' dimension_pre_computation_enabled: type: boolean description: Flag to enable dimension precomputation for this master account discover_azure_csp_partner_accounts: type: boolean description: Flag to enable Azure CSP Partner account discovery for this master account cost_processing_settings: $ref: '#/components/schemas/CostProcessingSettings' nextgen_report_settings: $ref: '#/components/schemas/NextgenReportSettings' type: object MasterAccountBase: properties: name: type: string description: Master account name subscription_info: description: Subscription Info $ref: '#/components/schemas/MasterAccountSubscription' notification_settings: description: Notification settings $ref: '#/components/schemas/MasterAccountNotificationSetting' fiscal_year_configuration: description: Fiscal Year settings $ref: '#/components/schemas/FiscalYearConfiguration' crm_id: type: string description: CRM id mfa_enabled: type: boolean description: Flag to enable MFA for the master account custom_tags: type: array description: List of tag key/value pairs items: $ref: '#/components/schemas/KeyValuePair' hierarchy_level: type: string description: Hierarchy level parent_master_account_id: type: string description: ID of the parent master account. products: type: array description: Products items: type: string require_access_key: type: boolean description: Flag to set API keys generation is allowed or not for the users of this master account. priority: type: integer description: Priority of the master account. type: object CostAnomalySetting: properties: category: type: string description: Cost anomaly settings category. example: all enum: - all - product_category - resource_category x-cs-enum-type: CostAnomalySettingCategory category_values: type: array description: List of categories. items: type: string minimum_cost_spend: type: integer description: Minimum Cost Spend default: 0 minimum_cost_impact: type: integer description: Minimum Cost Impact default: 0 minimum_cost_impact_percentage: type: integer description: Minimum Cost Anomaly Impact Percentage default: 0 cost_impact_spend_operator: type: string description: Cost Impact and Spend condition default: and example: and enum: - and - or x-cs-enum-type: CostImpactSpendOperator type: object CreateMasterAccountResponse: properties: id: type: string description: Account master id status: type: string description: Account master status tenant_id: type: string description: Tenant id role_info: description: Role info $ref: '#/components/schemas/RoleInfoModel' type: object ActivationDetails: properties: status: type: string description: Status of the activation details example: activated enum: - activated - failed - pending_activation x-cs-enum-type: ActivationDetailsStatus message: type: string description: Message of the activation details type: object CostAnomalyConfiguration: properties: threshold_configuration: description: threshold configuration. $ref: '#/components/schemas/CostAnomalySetting' notifications: type: array description: Notification configuration. items: $ref: '#/components/schemas/ConfigurationForCostAnomalyNotification' billing_source: type: string description: Base billing metric where the aggregation query will be executed. default: raw_cost example: raw_cost enum: - raw_cost - raw_effective_cost - customer_true_cost x-cs-enum-type: CostAnomalyBillingMetrics type: object securitySchemes: auth_token: type: apiKey in: header name: X-Auth-Token