Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageyaml
openapi: 3.0.0
info:
  title: GovStack IM configuration management API
  version: 1.0.0
  description: This is a GovStack Information Mediator Building Block Configuration Management API
  x-logo:
    url: ''
  contact:
    email: bb-information-mediat-aaaafm2vhf6hnebpu3tizg3v74@govstack.slack.com
servers:
  - url: https://{securityserver}:{managment_port}/api/v1
    variables:
      securityserver:
        default: ''
        description: security server address
      management_port:
        default: xxxx
        description: IM management port
  - description: SwaggerHub API Auto Mocking
    url: https://virtserver.swaggerhub.com/GovStack/GovStack_IM_Management_API/1.0.0
tags:
  - name: conf
    description: Configuration management
  - name: rights
    description: Access rights
paths:
  /config:
    get:
      tags:
        - conf
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IMconf'
          description: List of IM configuration
      operationId: listIMconf
      summary: List IM configuration
    post:
      requestBody:
        description: configuration description file
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IMconf'
        required: true
      tags:
        - conf
      parameters:
        - name: init
          description: Creates Central Servers if init=true
          schema:
            type: boolean
            default: false
          in: query
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IMconfResponse'
          description: IM starts configuration creation
      operationId: createIMconf
      summary: Initialize IM instance
    patch:
      requestBody:
        description: configuration description file
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IMconf'
        required: true
      tags:
        - conf
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IMconfResponse'
          description: IM starts configuration update
      operationId: updateIMconf
      summary: Update IM configuration. Not described parts are not changed
    put:
      requestBody:
        description: configuration description file
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IMconf'
        required: true
      tags:
        - conf
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IMconfResponse'
          description: IM starts configuration creation
      operationId: replaceIMconf
      summary: Replace IM configuration. Not described parts are deleted
  /status:
    get:
      tags:
        - conf
      responses:
        '200':
          description: IM is OK
      operationId: checkIMconf
      summary: Is IM configured. up and running?
  /applications/{app_id}/services/{service_id}/rights:
    get:
      tags:
        - rights
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllowedApplications'
          x-last-modified: 1678734276927
    post:
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AllowedApplications'
            example: ''
        required: false
      description: ''
      responses:
        '200':
          description: OK
      tags:
        - rights
    patch:
      tags:
        - rights
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AllowedApplications'
        required: false
      responses:
        '200':
          description: OK
    parameters:
      - name: app_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
        x-last-modified: 1678733991527
      - name: service_id
        in: path
        schema:
          type: string
        required: true
        deprecated: false
        x-last-modified: 1678734012254
    x-last-modified: 1678733971137
    delete:
      tags: 
        - rights
      description: ''
      responses:
        '200':
          description: OK
components:
  schemas:
    IMconf:
      type: object
      required:
        - domain
        - instance
      properties:
        domain:
          description: Subdomain for GovStack instance to run in
          type: string
          example: sample.sandbox.govstack.global
        instance:
          description: Name of GovStack instance
          type: string
          example: nowhereland
        members:
          description: List of Member organisations
          type: array
          items:
            type: object
            required:
              - name
              - class
              - code
            properties:
              name:
                description: Organisation (Member) name
                type: string
                example: Ministry of MinistryOfInteriorInterior
              class:
                description: Kind of organisation. Namespace for organisation {code}
                type: string
                example: COMGOV
              code:
                description: Registration number (or identifier) of the organisation in {class} namespace
                type: string
                example: '7001'
              applications:
                description: List of applications of Member organisation
                type: array
                items:
                  type: object
                  required:
                    - id
                  properties:
                    id:
                      type: string
                      description: Name of application
                      example: Citizens_Registry
                    connection:
                      type: string
                    services:  description: Connection protocol of application
                type: array     example: http
                items:      default: https
                 type: object  services:
                      requireddescription: List of services
                      type: -array
id                      items:
                        type: object
                        required:
                          - id
                          - spec_url
                          - service_url
                        properties:
                          id:
                            description: Name of service/API
                            type: string
                            example: registration
                          spec_url:
                            description: Location of OpenAPI spec file
                            type: string
                            format: uri
                            example: https://raw.githubusercontent.com/GovStackWorkingGroup/bb-example/api/registration.json
                        -  specservice_url:
                          - service_url  description: Location of service endpoints
                            propertiestype: string
                            idformat: uri
                           type example: stringhttp://hostname.internal/api/registration
                          spec_urlrights:
                            typedescription: string List of allowed consumers/clients
                            formattype: uriarray
                            items:
 service_url:                             type: stringobject
                            format: uri required:
                         rights:       - member
                    type: array           - application
                items:              properties:
                type: object               member:
               required:                   description: Name of Member
          - member                       type: string
        - application                         example: Local_Municipality
    properties:                            application:
    member:                              description: Name of application
 type: string                                type: application:string
                                  typeexample: stringRegistration_portal
    IMconfResponse:
      type: string 
    AllowedApplications:
      type: array
      items:
        $ref: '#/components/schemas/AllowedApplication'
      x-last-modified: 1678734189258
    AllowedApplication:
      description: >-
        An identified member application that has the permission to access a
        service.
      type: object
      x-last-modified: 1678734225326
      required:
        - member
        - application
  securitySchemes:
    OpenIDAuth:
      openIdConnectUrl: https://{id_bb_oidc_config}
      type: openIdConnect
      description: >-
        OpenID Connect (OIDC) is an identity layer built on top of the OAuth 2.0
        protocol.
      x-last-modified: 1678733600987
  headers: {}
  responses: {}
  parameters: {}
security:
  - OpenIDAuth: []