swagger: '2.0'
info:
  description: |
    This is a sample Petstore server.  You can find 
    out more about Swagger at 
    [http://swagger.io](http://swagger.io) or on 
    [irc.freenode.net, #swagger](http://swagger.io/irc/).
  version: 1.0.0
  title: Admission System
  termsOfService: http://swagger.io/terms/
  contact:
    email: apiteam@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
# host: petstore.swagger.io
# basePath: /v2
tags:
- name: careers
  description: All about careers
- name: cepre
  description: All about cepre
- name: registereds
  description: All about registereds
- name: type-exams
  description: All about type exams
- name: regions
  description: All about regions
- name: provinces
  description: All about  provinces
- name: districts
  description: All about  districts
- name: languages
  description: All about  languages
- name: schools
  description: All about schools
- name: school-levels
  description: All about schools
- name: users
  description: All about users
- name: type-managements
  description: Everything about type of managements
- name: type-users
  description: Everything about type of users


# schemes:
# - http
paths:

   # ---------------------
  #   Careers
  # ---------------------
  
  "/careers":
    get:
      tags:
      - careers
      summary: Get all careers
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            type: array
            items:
              $ref: '#/definitions/CareerResource'
        401:
          description: unauthenticated
  
  # ---------------------
  #   Cepre
  # ---------------------
  "/registereds/cepre":
    get:
      tags:
      - cepre
      summary: Get all registereds
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: confirmed
        in: query
        type: boolean
        description: "Game account of a specific user"
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            type: array
            items:
              $ref: '#/definitions/RegisteredResource'
        401:
          description: unauthenticated
  
  "/registereds/cepre/excel/list-confirmed":
    get:
      tags:
      - cepre
      summary: Generates the list of confirmed cepre registereds in an excel
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        200:
          description: Data modified succesfully
          schema:
            $ref: '#/definitions/ReportRegisteredPerDayExcel'
        401:
          description: Unauthenticated
        403:
          description: Forbidden Access 
          
  "/registereds/cepre/{id}/payments":
    post:
      tags:
      - cepre
      summary: Add a payment to cepre student
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: id
        in: path
        required: true
        type: integer
        description: Registered ID
      - in: body
        name: body
        schema:
          $ref: '#/definitions/PaymentRequest'
      responses:
        201:
          description: Data was inserted succesfully
        400:
          description: Invalid input, object invalid
        401:
          description: Unauthenticated
        403:
          description: Forbidden access
          
  # ---------------------
  #   Provinces
  # ---------------------
  
  "/provinces":
    get:
      tags:
      - provinces
      summary: Get all provinces
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            type: array
            items:
              $ref: '#/definitions/ProvinceResource'
        401:
          description: unauthenticated
          
          
  # ---------------------
  #   Regions
  # ---------------------
  
  "/regions":
    get:
      tags:
      - regions
      summary: Get all regions
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            type: array
            items:
              $ref: '#/definitions/RegionResource'
        401:
          description: unauthenticated
  
  "/excel/daily":
    get:
      tags:
      - registereds
      summary: Report excel daily
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: from
        in: query
        type: string
        format: date
        description: "Y-m-d"
      - name: to
        in: query
        type: string
        format: date
        description: "Y-m-d"
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            type: object
            properties:
              pdfPath:
                type: string
            
        401:
          description: unauthenticated
          
                
  # ---------------------
  #   Registereds
  # ---------------------
  
  "/registereds/{id}/edit-permission":
    patch:
      tags:
      - registereds
      summary: Edit permission boolean
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: id
        in: path
        required: true
        type: integer
        description: Registered ID
      - in: body
        name: body
        required: true
        schema:
          type: object
          properties:
            reason:
              type: string
            can_edit:
              type: boolean
              enum: ["0", "1"]
          
      responses:
        200:
          description: Data modified succesfully
        401:
          description: Unauthenticated
        403:
          description: Forbidden Access 
  
  "/registereds/{id}/image/save":
    patch:
      tags:
      - registereds
      summary: Update image and image_path of a registered
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: id
        in: path
        required: true
        type: integer
        description: Registered ID
      - in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/RegisteredUpdateImageRequest'
      responses:
        200:
          description: Data modified succesfully
          schema:
            $ref: '#/definitions/ReportPDFResource'
        401:
          description: Unauthenticated
        403:
          description: Forbidden Access 
  
  "/registereds/{id}/generate/reports":
    get:
      tags:
      - registereds
      summary: Generate format and report for confirmed registered
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: id
        in: path
        required: true
        type: integer
        description: Registered ID
      responses:
        200:
          description: Data modified succesfully
          schema:
            $ref: '#/definitions/ReportPDFResource'
        401:
          description: Unauthenticated
        403:
          description: Forbidden Access 
   
  "/registereds/report-per-day/excel":
    get:
      tags:
      - registereds
      summary: Generates the list of registereds per day in an excel
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        200:
          description: Data modified succesfully
          schema:
            $ref: '#/definitions/ReportRegisteredPerDayExcel'
        401:
          description: Unauthenticated
        403:
          description: Forbidden Access 
   
  "/registereds/verify-inscription":
    get:
      tags:
      - registereds
      summary: Verify inscription
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: dni
        in: query
        type: string
        description: "DNI Registered"
      - name: legal_representative
        in: query
        type: string
        description: "legal representative"
      responses:
        200:
          description: Data modified succesfully
          schema:
            $ref: '#/definitions/RegisteredShortResource'
        401:
          description: Unauthenticated
        403:
          description: Forbidden Access 
          
  "/registereds":
    get:
      tags:
      - registereds
      summary: Get all registereds
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: confirmed
        in: query
        type: boolean
        description: "Game account of a specific user"
      - name: enabledEdit
        in: query
        type: boolean
        description: "Get all registereds confirmed that are enabled to Edit"
      - name: cancelRegistereds
        in: query
        type: boolean
        description: "Get all registered deleted"
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            type: array
            items:
              $ref: '#/definitions/RegisteredResource'
        401:
          description: unauthenticated
          
    post:
      tags:
      - registereds
      summary: Add a registered
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: body
        schema:
          $ref: '#/definitions/RegisteredRequest'
      responses:
        201:
          description: Data was inserted succesfully
        400:
          description: Invalid input, object invalid
        401:
          description: Unauthenticated
        403:
          description: Forbidden access
  
  "/upload/file":
    post:
      tags:
      - registereds
      summary: Upload file
      consumes:
      - multipart/form-data
      produces:
      - application/json
      parameters:
      - name: file
        in: body
        description: image
        schema:
          type: string
      responses:
        201:
          description: Image uploaded succesfully
          schema:
            $ref: '#/definitions/FileResource'
        400:
          description: Invalid input, object invalid
        401:
          description: Unauthenticated
        403:
          description: Forbidden access
          
  "/registereds/image":
    post:
      tags:
      - registereds
      summary: Upload image for a registered
      consumes:
      - multipart/form-data
      produces:
      - application/json
      parameters:
      - name: img
        in: body
        description: image
        required: true
        schema:
          type: string
      responses:
        201:
          description: Image uploaded succesfully
          schema:
            $ref: '#/definitions/Image'
        400:
          description: Invalid input, object invalid
        401:
          description: Unauthenticated
        403:
          description: Forbidden access
  
  "/registereds/{id}/observe":
    patch:
      tags:
      - registereds
      summary: Observar a un pre inscrito
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: id
        in: path
        required: true
        type: integer
        description: Registered ID
      - in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/ObservationRequest'
      responses:
        200:
          description: Data modified succesfully
        401:
          description: Unauthenticated
        403:
          description: Forbidden Access 
          
          
  "/registereds/{id}":
    get:
      tags:
      - registereds
      summary: Get a registered
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: id
        in: path
        required: true
        type: integer
        description: ID registered
      - name: preRegistration
        in: query
        type: boolean
        description: "If this value is true, generate PreRegistration forma of a registered , value return "
      responses:
        200:
          description: Data retrieved successfully
          schema:
            $ref: '#/definitions/RegisteredResource'
        404:
          description: Method or resource not found
        401:
          description: Unauthenticated
    
    put:
      tags:
      - registereds
      summary: A recorder can edit data from registered
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: id
        in: path
        required: true
        type: integer
        description: Registered ID
      - in: body
        name: body
        required: true
        schema:
          $ref: '#/definitions/RegisteredUpdateRequest'
      responses:
        200:
          description: Data modified succesfully
        401:
          description: Unauthenticated
        403:
          description: Forbidden Access 
    
    delete:
      tags:
      - registereds
      summary: Delete registered
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: id
        in: path
        required: true
        type: integer
        description: Registered ID
      responses:
        200:
          description: Data deleted succesfully
        401:
          description: Unauthenticated
        403:
          description: Forbidden Access
        404:
          description: Resource not found
          
  "/registereds/search":
     get:
      tags:
      - registereds
      summary: Search registereds by DNI or father_surname
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: dni
        in: query
        type: string
        description: "Dni of registered"
      - name: fatherSurname
        in: query
        type: string
        description: "fatherSurname of registered"
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            type: array
            items:
              $ref: '#/definitions/RegisteredResource'
        401:
          description: unauthenticated
  
  "/registereds/verify":
    get:
      tags:
      - registereds
      summary: Verify if a new registered already exists in the database in the same type of exam
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: dni
        in: query
        type: string
        description: "Dni of new registered"
      - name: examId
        in: query
        type: string
        description: "Id of type of exam"
      responses:
        200:
          description: Registered passed validation
        409:
          description: New registered already exists in the database
  
  # ---------------------
  #   Languages
  # ---------------------
  
  "/languages":
    get:
      tags:
      - languages
      summary: Get all languages
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            type: array
            items:
              $ref: '#/definitions/LanguageResource'
        401:
          description: unauthenticated
          
  # ---------------------
  #   Schools
  # ---------------------
  
  "/schools":
    get:
      tags:
      - schools
      summary: Get all schools
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            type: array
            items:
              $ref: '#/definitions/SchoolResource'
        401:
          description: unauthenticated
    
    post:
      tags:
      - schools
      summary: Create a school
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: body
        schema:
          $ref: '#/definitions/SchoolCreateRequest'
      responses:
        200:
          description: Loged succesfully
          schema:
            type: object
            properties:
              token:
                type: string
                example: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ...PgNg
              token_type:
                type: string
                example: bearer
                default: bearer
              expires_in:
                type: string
                example: "86400"
                default: "86400"
        401:
          description: unauthenticated
  
   # ---------------------
  #   Schools-Levels
  # ---------------------
  
  "/schools-levels":
    get:
      tags:
      - school-levels
      summary: Get all schools-levels
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            type: array
            items:
              $ref: '#/definitions/SchoolLevelResource'
        401:
          description: unauthenticated
    
          
  # ---------------------
  #   Type Exams
  # ---------------------
  
  "/type-exams":
    get:
      tags:
      - type-exams
      summary: Get all type exams
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            type: array
            items:
              $ref: '#/definitions/TypeExamResource'
        401:
          description: unauthenticated
  
   # ---------------------
  #   Type Managements
  # ---------------------
  
  "/type-managements":
    get:
      tags:
      - type-managements
      summary: Get all type managements
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            type: array
            items:
              $ref: '#/definitions/TypeManagementResource'
        401:
          description: unauthenticated
  
  
  # ---------------------
  #   Type Users
  # ---------------------
  "/type-users":
    get:
      tags:
      - type-users
      summary: Get all type of users
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            type: array
            items:
              $ref: '#/definitions/TypeUserResource'
        401:
          description: unauthenticated
          
          
  # ---------------------
  #   Users
  # ---------------------
  
  "/login":
    post:
      tags:
      - users
      summary: User authentication
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: body
        schema:
          $ref: '#/definitions/LoginRequest'
      responses:
        200:
          description: Loged succesfully
          schema:
            type: object
            properties:
              token:
                type: string
                example: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ...PgNg
              token_type:
                type: string
                example: bearer
                default: bearer
              expires_in:
                type: string
                example: "86400"
                default: "86400"
        401:
          description: unauthenticated
  
  "/user":
    get:
      tags:
      - users
      summary: Get data of current user logged
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            $ref: '#/definitions/UserResource'
        401:
          description: unauthenticated
  
  "/users/{id}":
    get:
      tags:
      - users
      summary: Get a user
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - name: id
        in: path
        required: true
        type: integer
      responses:
        200:
          description: Data retrieved successfully
          schema:
            $ref: '#/definitions/UserResource'
        404:
          description: Method or resource not found
        401:
          description: Unauthenticated
          
  "/users":
    get:
      tags:
      - users
      summary: Get all users
      consumes:
      - application/json
      produces:
      - application/json
      responses:
        200:
          description: Retrieved data succesfully
          schema:
            type: array
            items:
              $ref: '#/definitions/UserResource'
        401:
          description: unauthenticated
    
    post:
      tags:
      - users
      summary: Add a user
      consumes:
      - application/json
      produces:
      - application/json
      parameters:
      - in: body
        name: body
        schema:
          $ref: '#/definitions/UserCreateRequest'
      responses:
        201:
          description: Data was inserted succesfully
        400:
          description: Invalid input, object invalid
        401:
          description: Unauthenticated
        403:
          description: Forbidden access
    
securityDefinitions:
  petstore_auth:
    type: oauth2
    authorizationUrl: http://petstore.swagger.io/oauth/dialog
    flow: implicit
    scopes:
      write:pets: modify pets in your account
      read:pets: read your pets
  api_key:
    type: apiKey
    name: api_key
    in: header
definitions:

  CareerResource:
    type: object
    properties:
      id:
        type: integer
      title:
        type: string
  
  LanguageResource:
    type: object
    properties:
      id:
        type: integer
      title:
        type: string
  
  RegisteredResource:
    type: object
    properties:
      id:
        type: integer
      dni:
        type: string
      name:
        type: string
      father_surname:
        type: string
      mother_surname:
        type: string
      telephone:
        type: string
      email:
        type: string
        format: email
      gender:
        type: string
        enum: ["Hasculino", "Femenino"]
      birth_date:
        type: string
        format: date
      origin_address:
        type: string
      career:
        $ref: "#/definitions/CareerResource"
      typeExam:
        $ref: "#/definitions/TypeExamResource"
      birthDistrict:
        $ref: "#/definitions/DistrictResource"
      originDistrict:
        $ref: "#/definitions/DistrictResource"
      school:
        $ref: "#/definitions/SchoolResource"
      language:
        $ref: "#/definitions/LanguageResource"
      turn:
        type: string
        enum: ["Mañana", "Tarde"]
      graduate_year:
        type: integer
      is_completed:
        type: boolean
      payments:
        type: array
        items:
          $ref: "#/definitions/PaymentResource"
      legal_representative:
        type: string
      telephone_legal_representative:
        type: string
      has_disability:
        type: boolean
      disability:
        type: string
      achievement_certificate_url:
        type: string
      year_5th_certificate_url:
        type: string
      dni_file_url:
        type: string
      payment_file_url:
        type: string
      request_file_url:
        type: string
      reading:
        type: boolean
      writing:
        type: boolean
      speaking:
        type: boolean
      is_observed:
        type: boolean
      observation:
        type: string
  
  RegisteredShortResource:
    type: object
    properties:
      id:
        type: integer
      dni:
        type: string
      name:
        type: string
      father_surname:
        type: string
      mother_surname:
        type: string
      telephone:
        type: string
      email:
        type: string
        format: email
      gender:
        type: string
        enum: ["Hasculino", "Femenino"]
      birth_date:
        type: string
        format: date
      is_observed:
        type: boolean
      observation:
        type: string
      format_path:
        type: string
        
  PaymentResource:
    type: object
    properties:
      id:
        type: integer
      amount_paid:
        type: integer
      user_id:
        type: integer
      cepre_student_id:
        type: integer
      
  
  RegionResource:
    type: object
    properties:
      id:
        type: integer
      ubigeo:
        type: string
      name:
        type: string
      provinces:
        type: array
        items:
          $ref: "#/definitions/ProvinceResource"
  
  ProvinceResource:
    type: object
    properties:
      id:
        type: integer
      ubigeo:
        type: string
      name:
        type: string
      region_id:
        type: integer
      districts:
        type: array
        items:
          $ref: "#/definitions/DistrictResource"
   
  DistrictResource:
    type: object
    properties:
      id:
        type: integer
      name:
        type: string
      region_id:
        type: integer
      province_id:
        type: integer
  Image:
    type: object
    properties:
      image_path:
        type: string
      image_url:
        type: string  
  
  FileResource:
    type: object
    properties:
      file_path:
        type: string
      file_url:
        type: string  
  
  FileRequest:
    type: object
    properties:
      file:
        type: string
   
  LoginRequest:
    type: object
    properties:
      username:
        type: string
        format: email
      password:
        type: string
  
  ReportPDFResource:
    type: object
    properties:
      report_path:
        type: string
      format_path:
        type: string
    
  PaymentRequest:
    type: object
    properties:
      amount_paid:
        type: integer
      code_bill:
        type: string
      code_voucher:
        type: string
  
  RegisteredRequest:
    type: object
    properties:
      dni:
        type: string
      name:
        type: string
      father_surname:
        type: string
      mother_surname:
        type: string
      telephone:
        type: string
      email:
        type: string
      gender:
        type: string
        enum: ["Hasculino", "Femenino"]
      birth_date:
        type: string
        format: date
      origin_address:
        type: string
      career_id:
        type: integer
      type_exam_id:
        type: integer
      birth_district_id:
        type: integer
      origin_district_id:
        type: integer
      school_id:
        type: integer
      code_bill:
        type: string
      code_voucher:
        type: string
      language_id:
        type: integer
      turn:
        type: string
        enum: ["Mañana", "Tarde"]
      graduate_year:
        type: integer
      legal_representative:
        type: string
      telephone_legal_representative:
        type: string
      has_disability:
        type: boolean
      disability:
        type: string
      achievement_certificate_url:
        type: string
      year_5th_certificate_url:
        type: string
      dni_file_url:
        type: string
      payment_file_url:
        type: string
      request_file_url:
        type: string
      reading:
        type: boolean
      writing:
        type: boolean
      speaking:
        type: boolean
      observation:
        type: string
  
  RegisteredEditPermissionRequest:
    type: object
    properties:
      can_edit:
        type: boolean
  
  RegisteredUpdateImageRequest:
    type: object
    properties:
      image:
        type: string
      image_path:
        type: string
        
  
  ObservationRequest:
    type: object
    properties:
      observation:
        type: string
        
  RegisteredUpdateRequest:
    type: object
    properties:
      dni:
        type: string
      name:
        type: string
      father_surname:
        type: string
      mother_surname:
        type: string
      telephone:
        type: string
      email:
        type: string
      gender:
        type: string
        enum: ["Hasculino", "Femenino"]
      birth_date:
        type: string
        format: date
      origin_address:
        type: string
      career_id:
        type: integer
      type_exam_id:
        type: integer
      birth_district_id:
        type: integer
      origin_district_id:
        type: integer
      school_id:
        type: integer
      confirmed:
        type: boolean
      payment_method:
        type: string
        enum: ["Boleta de venta", "Voucher"]
      code_bill:
        type: string
      code_voucher:
        type: string
      turn:
        type: string
        enum: ["Mañana", "Tarde"]
      graduate_year:
        type: integer
      language_id:
        type: integer
      legal_representative:
        type: string
      telephone_legal_representative:
        type: string
      has_disability:
        type: boolean
      disability:
        type: string
      achievement_certificate_url:
        type: string
      year_5th_certificate_url:
        type: string
      dni_file_url:
        type: string
      payment_file_url:
        type: string
      request_file_url:
        type: string
      reading:
        type: boolean
      writing:
        type: boolean
      speaking:
        type: boolean
  
  ReportRegisteredPerDayExcel:
    type: object
    properties:
      excel_path: 
        type: string
  
  SchoolCreateRequest:
    type: object
    properties:
      code:
        type: string
      title:
        type: string
      address:
        type: string
      school_level_id:
        type: integer
      type_management_id:
        type: integer
      district_id:
        type: integer
      
    
  SchoolResource:
    type: object
    properties:
      id:
        type: integer
      code:
        type: string
      title:
        type: string
      address:
        type: string
      schoolLevel:
        $ref: "#/definitions/SchoolLevelResource"
      typeManagement:
        $ref: "#/definitions/TypeManagementResource"
      district_id:
        type: integer
      region_id:
        type: integer
      province_id:
        type: integer
      
  SchoolLevelResource:
    type: object
    properties:
      id:
        type: integer
      title:
        type: string
  
  TypeManagementResource:
    type: object
    properties:
      id:
        type: integer
      title:
        type: string
  
  TypeExamResource:
    type: object
    properties:
      id:
        type: integer
      title:
        type: string
      code:
        type: string
      price:
        type: integer
      inactive:
        type: boolean
        
  UserResource:
    type: object
    properties:
      id:
        type: number
      name:
        type: string  
      email:
        type: string
        format: email
      typeUser:
        $ref: "#/definitions/TypeUserResource"
  
  UserCreateRequest:
    type: object
    properties:
      email:
        type: string
        format: email
      name:
        type: string 
      password:
        type: string
      type_user_id:
        type: number
        
  TypeUserResource:
    type: object
    properties:
      id:
        type: number
      title:
        type: string
        
  ApiResponse:
    type: object
    properties:
      code:
        type: integer
        format: int32
      type:
        type: string
      message:
        type: string
externalDocs:
  description: Find out more about Swagger
  url: http://swagger.io
# Added by API Auto Mocking Plugin
host: virtserver.swaggerhub.com
basePath: /aldo1400/testing/1.0.0
schemes:
 - https
 - http