openapi: "3.0.1"
info:
  title: "HAL OpenAPI"
  description: "# The HAL API services provides the following features\n- Gets organization\
    \ account information\n- Gets payer and unit information per acccount\n### Release\
    \ Notes\nv1.0.0\n- Initial API doc release\n"
  version: "1.0.1"
servers:
- url: "https://api-dev.pearsoncloudmanagement.com/{basePath}"
  variables:
    basePath:
      default: "/hal"
paths:
  /payeraccountorgdetails:
    get:
      operationId: "findPayers"
      responses:
        "404":
          description: "404 response"
          content: {}
        "200":
          description: "200 response"
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: "string"
            Access-Control-Allow-Methods:
              schema:
                type: "string"
            Access-Control-Allow-Headers:
              schema:
                type: "string"
            Content-Type:
              schema:
                type: "string"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MODELc50f61"
        "400":
          description: "400 response"
          content: {}
        "401":
          description: "401 response"
          content: {}
        "500":
          description: "500 response"
          content: {}
        "403":
          description: "403 response"
          content: {}
      x-amazon-apigateway-integration:
        type: "mock"
        passthroughBehavior: "when_no_match"
  /accountsandorgdata:
    get:
      operationId: "findAccounts"
      responses:
        "404":
          description: "404 response"
          content: {}
        "200":
          description: "200 response"
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: "string"
            Access-Control-Allow-Methods:
              schema:
                type: "string"
            Access-Control-Allow-Headers:
              schema:
                type: "string"
            Content-Type:
              schema:
                type: "string"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MODELcaf387"
        "400":
          description: "400 response"
          content: {}
        "401":
          description: "401 response"
          content: {}
        "500":
          description: "500 response"
          content: {}
        "403":
          description: "403 response"
          content: {}
      x-amazon-apigateway-integration:
        type: "mock"
        passthroughBehavior: "when_no_match"
  /:
    get:
      operationId: "APILandingPage"
      responses:
        "404":
          description: "404 response"
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: "string"
            Access-Control-Allow-Methods:
              schema:
                type: "string"
            Access-Control-Allow-Headers:
              schema:
                type: "string"
            Content-Type:
              schema:
                type: "string"
          content: {}
        "200":
          description: "200 response"
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: "string"
            Access-Control-Allow-Methods:
              schema:
                type: "string"
            Access-Control-Allow-Headers:
              schema:
                type: "string"
            Content-Type:
              schema:
                type: "string"
          content: {}
      x-amazon-apigateway-integration:
        type: "mock"
        responses:
          default:
            statusCode: "200"
            responseParameters:
              method.response.header.Access-Control-Allow-Methods: "'DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT'"
              method.response.header.Content-Type: "'text/html'"
              method.response.header.Access-Control-Allow-Headers: "'Content-Type,Authorization,X-Amz-Date,X-Api-Key,X-Amz-Security-Token,Api-Auth-Token'"
              method.response.header.Access-Control-Allow-Origin: "'http://localhost:3000'"
            responseTemplates:
              text/html: "<!DOCTYPE html> <html lang=\"en\">\n  <head>\n    <meta\
                \ charset=\"utf-8\"> <!-- Important: rapi-doc uses utf8 charecters\
                \ -->\n    <script type=\"module\" src=\"https://unpkg.com/rapidoc/dist/rapidoc-min.js\"\
                ></script>\n  </head>\n  <body>\n    <!-- Swagger build propagates\
                \ info.version. Change the version in openapi.yaml, not here. v0.0.0\
                \ is a placeholder. -->\n    <rapi-doc spec-url = \"https://downloads.pearsoncloudmanagement.com/hal/$context.stage/api/openapi_bundled__v1.0.1.yaml\"\
                > </rapi-doc>\n  </body>\n</html>\n"
        requestTemplates:
          application/json: "{\"statusCode\": 200}"
        passthroughBehavior: "when_no_match"
components:
  schemas:
    MODELc50f61:
      type: "object"
      additionalProperties:
        type: "object"
        additionalProperties:
          required:
          - "AISERVICES_OPT_OUT_POLICY"
          - "BACKUP_POLICY"
          - "SERVICE_CONTROL_POLICY"
          - "TAG_POLICY"
          - "accounts"
          - "name"
          type: "object"
          properties:
            name:
              type: "string"
            AISERVICES_OPT_OUT_POLICY:
              type: "array"
              items:
                minItems: 0
                uniqueItems: true
                required:
                - "Arn"
                - "AwsManaged"
                - "Id"
                - "Name"
                - "Type"
                type: "object"
                properties:
                  Id:
                    type: "string"
                  Arn:
                    type: "string"
                  Name:
                    type: "string"
                  Type:
                    type: "string"
                    enum:
                    - "AISERVICES_OPT_OUT_POLICY"
                    - "BACKUP_POLICY"
                    - "SERVICE_CONTROL_POLICY"
                    - "TAG_POLICY"
                  AwsManaged:
                    type: "boolean"
                description: "List of policies"
            BACKUP_POLICY:
              type: "array"
              items:
                minItems: 0
                uniqueItems: true
                required:
                - "Arn"
                - "AwsManaged"
                - "Id"
                - "Name"
                - "Type"
                type: "object"
                properties:
                  Id:
                    type: "string"
                  Arn:
                    type: "string"
                  Name:
                    type: "string"
                  Type:
                    type: "string"
                    enum:
                    - "AISERVICES_OPT_OUT_POLICY"
                    - "BACKUP_POLICY"
                    - "SERVICE_CONTROL_POLICY"
                    - "TAG_POLICY"
                  AwsManaged:
                    type: "boolean"
                description: "List of policies"
            SERVICE_CONTROL_POLICY:
              type: "array"
              items:
                minItems: 0
                uniqueItems: true
                required:
                - "Arn"
                - "AwsManaged"
                - "Id"
                - "Name"
                - "Type"
                type: "object"
                properties:
                  Id:
                    type: "string"
                  Arn:
                    type: "string"
                  Name:
                    type: "string"
                  Type:
                    type: "string"
                    enum:
                    - "AISERVICES_OPT_OUT_POLICY"
                    - "BACKUP_POLICY"
                    - "SERVICE_CONTROL_POLICY"
                    - "TAG_POLICY"
                  AwsManaged:
                    type: "boolean"
                description: "List of policies"
            TAG_POLICY:
              type: "array"
              items:
                minItems: 0
                uniqueItems: true
                required:
                - "Arn"
                - "AwsManaged"
                - "Id"
                - "Name"
                - "Type"
                type: "object"
                properties:
                  Id:
                    type: "string"
                  Arn:
                    type: "string"
                  Name:
                    type: "string"
                  Type:
                    type: "string"
                    enum:
                    - "AISERVICES_OPT_OUT_POLICY"
                    - "BACKUP_POLICY"
                    - "SERVICE_CONTROL_POLICY"
                    - "TAG_POLICY"
                  AwsManaged:
                    type: "boolean"
                description: "List of policies"
            accounts:
              type: "array"
              items:
                pattern: "[0-9]{12}"
                minItems: 0
                uniqueItems: true
                type: "string"
                description: "List of accounts belonging to the OU"
      description: "Definition for the payer-org-units-and-policies json"
    MODELcaf387:
      type: "object"
      additionalProperties:
        required:
        - "Arn"
        - "Email"
        - "Id"
        - "JoinedMethod"
        - "JoinedTimestamp"
        - "Name"
        - "Status"
        - "payer_account_id"
        - "unit_id"
        - "unit_path"
        type: "object"
        properties:
          Id:
            pattern: "[0-9]{12}"
            type: "string"
          Arn:
            pattern: "arn:aws:organizations::[0-9]{12}:account/o-[a-z0-9]*/[0-9]{12}"
            type: "string"
          Email:
            type: "string"
            format: "email"
          Name:
            type: "string"
          Status:
            type: "string"
            enum:
            - "ACTIVE"
            - "SUSPENDED"
            - "PENDING_CLOSURE"
          JoinedMethod:
            type: "string"
            enum:
            - "INVITED"
            - "CREATED"
          JoinedTimestamp:
            type: "string"
            format: "date-time"
          unit_path:
            type: "string"
          unit_id:
            type: "string"
          payer_account_id:
            pattern: "[0-9]{12}"
            type: "string"
      description: "Definition for the accounts-to-org-units json"
