> ## Documentation Index
> Fetch the complete documentation index at: https://docs.versori.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Put organisations schemas import

> ImportSchemaOperations adds the operations for a schema the database for faster retrieval.

Deprecated: This endpoint is no longer supported as schemas are automatically imported using the
`CreateSchema` (POST /organisations/{organisationId}/schemas) operation. This endpoint will be replaced with a
reimport endpoint in the future, in the meantime this may be used when the `force` parameter is set to true.




## OpenAPI

````yaml put /organisations/{organisationId}/schemas/{id}/import
openapi: 3.0.3
info:
  title: Switchboard API
  description: >-
    The Switchboard API provides users the ability to manage their Apps,
    Integrations and Workflows
  version: 0.0.1-alpha.0
servers:
  - url: https://platform.versori.com/api/switchboard/v1alpha1/
    description: Production server
  - url: http://localhost:8080/v1alpha1/
    description: Localhost
security:
  - apiKey: []
paths:
  /organisations/{organisationId}/schemas/{id}/import:
    put:
      tags:
        - schemas
      description: >
        ImportSchemaOperations adds the operations for a schema the database for
        faster retrieval.


        Deprecated: This endpoint is no longer supported as schemas are
        automatically imported using the

        `CreateSchema` (POST /organisations/{organisationId}/schemas) operation.
        This endpoint will be replaced with a

        reimport endpoint in the future, in the meantime this may be used when
        the `force` parameter is set to true.
      operationId: ImportSchemaOperations
      parameters:
        - name: organisationId
          in: path
          required: true
          schema:
            type: string
          example: '101'
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: force
          in: query
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          $ref: '#/components/responses/SchemaInfoResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
      deprecated: true
components:
  responses:
    SchemaInfoResponse:
      description: >
        SchemaInfoResponse is the response containing the SchemaInfo of a
        schema.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SchemaInfo'
    ErrorResponse:
      description: The default error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    SchemaInfo:
      properties:
        id:
          description: |
            The ID of the Schema record if it is stored.
          type: string
        title:
          description: >
            Title is calculated from the parsed schema. Not all schemas contain
            this information so may be null.
          type: string
        availableServers:
          type: array
          items:
            $ref: '#/components/schemas/Server'
        schemaMetadata:
          $ref: '#/components/schemas/SchemaMetadata'
        supportedAuthConfigs:
          description: >
            SupportedAuthConfigs is a list of authentication standards which can
            be used to connect a user's account to

            this app. At least one auth type needs to be valid for the App to be
            used by a user.
          type: array
          items:
            $ref: '#/components/schemas/AppAuthConfig'
      required:
        - availableServers
        - schemaMetadata
        - supportedAuthConfigs
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        extensions:
          type: object
      required:
        - code
        - message
    Server:
      type: object
      properties:
        name:
          description: >
            Description is a human-friendly name for this server address. If a
            friendly name isn't available then this

            defaults to the URL.
          type: string
        url:
          description: |
            URL is the server address listening for requests.
          type: string
      required:
        - name
        - url
    SchemaMetadata:
      type: object
      properties:
        type:
          description: >
            Type denotes the type of schema the corresponding App is backed by.
            Currently the only supported value is

            "openapi", but other types such as "soap", "graphql" and "grpc" are
            on the roadmap.
          type: string
        version:
          description: >
            Version denotes the version of the schema specification. This
            property is contextual based on the schema

            type, for example openapi schemas will contain the OpenAPI
            specification version (currently only 3.0.x is

            supported), but `grpc` APIs could be "proto2" or "proto3".
          type: string
        url:
          description: >
            URL is the private address for accessing the schema. This is not
            guaranteed to be publicly accessible and

            could be a non-HTTP protocol (i.e. gs:// or s3://)
          type: string
      required:
        - type
        - version
        - url
    AppAuthConfig:
      description: >
        AppAuthConfig describes how an organisation can authenticate with an
        app.
      type: object
      properties:
        type:
          description: >
            Type denotes the method of authentication. Valid values are:
            `"oidc"`, `"oauth2"`, `"apikey"`, `"httpBasicAuth"
          type: string
        isValid:
          description: >
            IsValid is true if and only if the `data` field is populated with
            all the required information to enable

            an organisation to connect to the App via this auth type. It is
            allowed for an App to have invalid auth

            configs providing there is at least one valid.
          type: boolean
        data:
          $ref: '#/components/schemas/AppAuthConfigData'
      required:
        - type
        - isValid
        - data
    AppAuthConfigData:
      type: object
      description: >
        AppAuthConfigData should JSON-marshal to one of the types specified in
        the jsonschema oneOf:


        - AppAuthConfigOIDC

        - AppAuthConfigOAuth2

        - AppAuthConfigApiKey

        - AppAuthConfigHTTPRefresh

        - AppAuthConfigHTTPBasicAuth

        - AppAuthConfigJWTBearer

        - AppAuthConfigCustomFunction
      oneOf:
        - $ref: '#/components/schemas/AppAuthConfigOIDC'
        - $ref: '#/components/schemas/AppAuthConfigOAuth2'
        - $ref: '#/components/schemas/AppAuthConfigApiKey'
        - $ref: '#/components/schemas/AppAuthConfigHTTPRefresh'
        - $ref: '#/components/schemas/AppAuthConfigHTTPBasicAuth'
        - $ref: '#/components/schemas/AppAuthConfigJWTBearer'
        - $ref: '#/components/schemas/AppAuthConfigCustomFunction'
    AppAuthConfigOIDC:
      description: >
        AppAuthConfigOIDC specifies the configuration for authenticating using
        the OpenID Connect specification.
      type: object
      properties:
        discoveryUrl:
          description: >-
            Takes precedent over the endpoint properties. If this property is
            set, it will be queried and override any defined endpoint
            properties.
          type: string
        clientId:
          type: string
        clientSecret:
          description: >
            ClientSecret is the OAuth2.0 client's secret. This should be
            write-only, and not be viewable after

            creation.
          type: string
        scopes:
          $ref: '#/components/schemas/Scopes'
    AppAuthConfigOAuth2:
      type: object
      properties:
        flowType:
          type: string
          enum:
            - authorization_code
            - client_credentials
            - resource_owner_password
          description: >
            FlowType is the type of OAuth2 Flow supported. Valid values are
            `authorization_code` and `client_credentials` and
            `resource_owner_password`.
        authorizationEndpoint:
          type: string
        tokenEndpoint:
          type: string
        username:
          type: string
        password:
          type: string
        clientId:
          type: string
        clientSecret:
          description: >
            ClientSecret is the OAuth2.0 client's secret. This should be
            write-only, and not be viewable after

            creation.
          type: string
        scopes:
          $ref: '#/components/schemas/Scopes'
    AppAuthConfigApiKey:
      type: object
      properties:
        name:
          description: >
            Name is the header, query param or cookie name which the API key
            should be provided as.
          type: string
        in:
          description: >
            In denotes where the API key should be set when calling the API.
            Possible values are: `"query"`,

            `"header"` or `"cookie"`.
          type: string
      required:
        - name
        - in
    AppAuthConfigHTTPRefresh:
      type: object
      properties:
        tokenEndpoint:
          description: |
            TokenEndpoint is the URL to use to Request a token.
          type: string
        method:
          description: The http method to use for the token request.
          type: string
          enum:
            - GET
            - PUT
            - POST
            - DELETE
            - OPTIONS
            - HEAD
            - PATCH
            - TRACE
        tokenTTL:
          description: >
            TokenTTL is the duration in seconds for a token to last before
            refreshing to get a new one.
          type: integer
          x-go-type: int64
        secretIn:
          description: >
            SecretIn denotes where the client secret should be set when calling
            the API. Possible values are: `"header"` or `"body"`.
          type: string
        headerDestination:
          description: >
            HeaderDestination is used if `"in"` is set to `"header"` to specify
            the header key for the ClientSecret data to be sent with.

            This can be empty if the `"in"` is not set to `"header"`.
          type: string
        headers:
          description: >
            Headers is a list of static headers to send along with the token
            request.
          type: object
          x-go-type: map[string][]string
          example:
            headers:
              summary: Example headers to send
              value: Payload `{"header1":["value1","value2"],"header2":["value3"]}`
        selector:
          description: >
            Selector is an expression to evaluate to obtain the token from the
            Response returned from the TokenEndpoint.

            This always extracts from the body response from the TokenEndpoint.
          type: string
          example:
            token contained in a single level field:
              summary: Extracting token from response `{"tok""my_token"}`
              value: tok
            token contained in a nested field:
              summary: Extracting token from response `{"result"`:{"tok""my_token"}}`
              value: result.tok
        name:
          description: >
            Name is the header, query param or cookie name which the token
            should be provided as.
          type: string
        in:
          description: >
            In denotes where the token should be set when calling the API.
            Possible values are: `"query"`,

            `"header"` or `"cookie"`.
          type: string
        prefix:
          description: >
            Prefix contains any prefix that should be used to set the token in
            the header, such as `"Bearer"`.
          type: string
      required:
        - tokenEndpoint
        - method
        - tokenTTL
        - secretIn
        - selector
        - name
        - in
        - prefix
    AppAuthConfigHTTPBasicAuth:
      type: object
      properties:
        user:
          description: |
            User is the identifier to perform the basic authentication.
          type: string
        password:
          description: |
            Password is the secret used to perform the basic authentication.
          type: string
      required:
        - user
        - password
    AppAuthConfigJWTBearer:
      type: object
      properties:
        payload:
          description: |
            Payload is the JWT payload.
          type: object
          x-go-type: map[string]interface{}
        secret:
          description: |
            The secret used to sign the JWT.
          type: string
        algorithm:
          description: |
            The algorithm used to sign the JWT.
          type: string
        prefix:
          description: >
            The prefix of the JWT in the header. Defaults to "Bearer" if not
            set.
          type: string
        expiresIn:
          description: |
            The duration for a token to last before refreshing to get a new one.
          type: string
      required:
        - algorithm
    AppAuthConfigCustomFunction:
      type: object
      properties:
        function_url:
          description: The url to the function to call to authenticate the request.
          type: string
      required:
        - function_url
    Scopes:
      description: >
        Scopes is a map of scopes this API supports, with the scope name as keys
        and a description as the value.

        It may not be required to specify them all to connect the App.
      type: object
      x-go-type: map[string]string
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization

````