swagger: '2.0'
info:
  title: 3Di API
  description: "3Di simulation API (latest stable version: v3) \n Framework release:
    3.3.35 \n 3Di core release: 3.4.2 \ndeployed on:  02:26PM (UTC) on May 14, 2024"
  termsOfService: ''
  contact:
    email: info@nelen-schuurmans.nl
  license:
    name: BSD License
  version: v3
host: null
schemes:
- https
basePath: /
consumes:
- application/json
produces:
- application/json
securityDefinitions:
  Basic:
    type: basic
    description: This scheme is for Personal API Keys. Use the key as password. The
      username must be '__key__' (the word 'key' enclosed in double underscores).
  Bearer:
    type: apiKey
    name: Authorization
    in: header
    description: This scheme is for tokens generated by 3Di. A token can be retrieved
      from auth/tokens.
  OAuth2:
    type: oauth2
    name: Authorization
    flow: accessCode
    authorizationUrl: https://auth.lizard.net/oauth2/authorize
    tokenUrl: https://auth.lizard.net/oauth2/token
    description: This scheme is for OAuth2 Bearer tokens. By default, a public client_id
      is set. Optionally supply another client id / secret (for testing).
security:
- Basic: []
- Bearer: []
- OAuth2: []
paths:
  /v3-beta/status/:
    get:
      operationId: status_list
      description: ''
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/Status'
      tags:
      - v3-beta
    parameters: []
  /v3-beta/status/current-version/:
    get:
      operationId: status_current_version
      description: ''
      parameters: []
      responses:
        '200':
          description: ''
          schema:
            $ref: '#/definitions/CurrentVersion'
      tags:
      - v3-beta
    parameters: []
  /v3/auth/refresh-token/:
    post:
      operationId: auth_refresh-token_create
      summary: Refresh API authentication token by refresh_token.
      description: |-
        Post "refresh" token as "refresh".

        The return "access" token needs to be sent as HTTP authentication header
        with every request with 'Bearer ' prefix (case-sensitive).
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Refresh'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Tokens'
      tags:
      - v3
    parameters: []
  /v3/auth/token/:
    post:
      operationId: auth_token_create
      summary: Retrieve tokens for API authentication.
      description: |-
        There are two ways for retrieving a tokens. The preferred way is attaching
        a Personal API Key to the request and leave the request body empty. For
        backwards compatibility, you can also supply your username and password
        in the request body directly.

        The response will contain an "access" and "refresh" JWT token.

        The "access" token needs to be sent as HTTP authentication header
        with every request with a 'Bearer ' prefix (case-sensitive).

        Note that the "access" token expires after some time.

        The "refresh" token can be used to get a new access token
        via the "refresh" endpoint.
      parameters:
      - name: data
        in: body
        required: true
        schema:
          $ref: '#/definitions/Authenticate'
      responses:
        '201':
          description: ''
          schema:
            $ref: '#/definitions/Tokens'
      tags:
      - v3
    parameters: []
definitions:
  Status:
    type: object
    properties:
      status:
        title: Status
        type: string
        readOnly: true
  CurrentVersion:
    type: object
    properties:
      threedi_version:
        title: Threedi version
        type: string
        readOnly: true
      threedicore_version:
        title: Threedicore version
        type: string
        readOnly: true
  Refresh:
    required:
    - refresh
    type: object
    properties:
      refresh:
        title: Refresh
        type: string
        minLength: 1
      access:
        title: Access
        type: string
        readOnly: true
        minLength: 1
  Tokens:
    type: object
    properties:
      access:
        title: Access
        type: string
        minLength: 1
      refresh:
        title: Refresh
        type: string
        minLength: 1
  Authenticate:
    type: object
    properties:
      username:
        title: Username
        type: string
        minLength: 1
      password:
        title: Password
        type: string
        minLength: 1
