openapi: "3.0.1"
info:
  title: "HAL REST API"
  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.3\n- CDK and OpenAPI improvements.\nv1.0.2\n- Cleanup and internal\
    \ version release testing\nv1.0.1\n- Version testing\nv1.0.0\n- Initial API doc\
    \ release\n"
  version: "1.0.3"
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/MODEL356af3"
        "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: "aws_proxy"
        httpMethod: "POST"
        uri: "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:530786275774:function:HalDevStack-HalApiDevConstructHalLambdaApiD0F786B9-vtvqBzfti2C5/invocations"
        responses:
          default:
            statusCode: "200"
            responseParameters:
              method.response.header.Access-Control-Allow-Methods: "'*'"
              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: "'*'"
        passthroughBehavior: "when_no_match"
        contentHandling: "CONVERT_TO_TEXT"
  /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/MODEL4a6467"
        "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: "aws_proxy"
        httpMethod: "POST"
        uri: "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:530786275774:function:HalDevStack-HalApiDevConstructHalLambdaApiD0F786B9-vtvqBzfti2C5/invocations"
        responses:
          default:
            statusCode: "200"
            responseParameters:
              method.response.header.Access-Control-Allow-Methods: "'*'"
              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: "'*'"
        passthroughBehavior: "when_no_match"
        contentHandling: "CONVERT_TO_TEXT"
  /healthcheck:
    get:
      operationId: "findHealthStatus"
      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: {}
        "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: "aws_proxy"
        httpMethod: "POST"
        uri: "arn:aws:apigateway:us-east-1:lambda:path/2015-03-31/functions/arn:aws:lambda:us-east-1:530786275774:function:HalDevStack-HalApiDevConstructHalLambdaApiD0F786B9-vtvqBzfti2C5/invocations"
        responses:
          default:
            statusCode: "200"
            responseParameters:
              method.response.header.Access-Control-Allow-Methods: "'*'"
              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: "'*'"
        passthroughBehavior: "when_no_match"
        contentHandling: "CONVERT_TO_TEXT"
  /:
    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.3.yaml\"\
                > </rapi-doc>\n  </body>\n</html>\n"
        requestTemplates:
          application/json: "{\"statusCode\": 200}"
        passthroughBehavior: "when_no_match"
components:
  schemas:
    MODEL356af3:
      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"
    MODEL4a6467:
      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"
