University of Gothenburg Manage Corpora API

Routes for managing corpus resources with Sparv.

Operations 22

POST /corpus/create Create Corpus #
GET /corpus/list List Corpora #
GET /corpus/korp/list List Korp Corpora #
GET /list-korp-corpora List-Korp-Corpora-Deprecated #
DELETE /corpus/remove/{resource_id} Remove Corpus #
PUT /corpus/sources/upload/{resource_id} Upload Sources #
GET /corpus/sources/list/{resource_id} List Sources #
DELETE /corpus/sources/remove/{resource_id} Remove Sources #
GET /corpus/sources/download/{resource_id} Download Sources #
PUT /corpus/config/upload/{resource_id} Upload Config #
GET /corpus/config/download/{resource_id} Download Config #
GET /corpus/exports/list/{resource_id} List Exports #
GET /corpus/exports/download/{resource_id} Download Exports #
DELETE /corpus/exports/remove/{resource_id} Remove Exports #
GET /corpus/job/check-input/{resource_id} Check Input #
PUT /corpus/job/run/{resource_id} Run Sparv #
POST /corpus/job/abort/{resource_id} Abort Job #
DELETE /corpus/annotations/remove/{resource_id} Clear Annotations #
PUT /corpus/korp/install/{resource_id} Install Korp #
DELETE /corpus/korp/uninstall/{resource_id} Uninstall Korp #
PUT /corpus/strix/install/{resource_id} Install Strix #
DELETE /corpus/strix/uninstall/{resource_id} Uninstall Strix #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/university-of-gothenburg-manage-corpora-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

university-of-gothenburg-manage-corpora-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mink backend Manage Corpora API
  description: '## Introduction


    The Mink backend is a REST API that powers the Mink frontend, Språkbanken''s data

    platform.'
  x-logo:
    url: https://raw.githubusercontent.com/spraakbanken/mink-backend/main/mink/static/mink.svg
  contact:
    name: Språkbanken
    url: https://spraakbanken.gu.se/
    email: sb-info@svenska.gu.se
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 3.1.0.dev
servers:
- url: https://ws.spraakbanken.gu.se/ws/mink/v3
  description: Production server
- url: https://ws.spraakbanken.gu.se/ws/mink/dev
  description: Development server
tags:
- name: Manage Corpora
  description: Routes for managing corpus resources with Sparv.
paths:
  /corpus/create:
    post:
      tags:
      - Manage Corpora
      summary: Create Corpus
      description: 'Create a new corpus.


        ### Example


        ```bash

        curl -X POST ''https://ws.spraakbanken.gu.se/ws/mink/v3/corpus/create'' -H ''Authorization: Bearer YOUR_JWT''

        ```'
      operationId: create-corpus
      security:
      - OAuth2PasswordBearer: []
      - APIKeyHeader: []
      parameters:
      - name: session_id
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Session ID
          title: Session Id
        description: Session ID
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateResourceResponse'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse404Resource'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse422'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              example:
                status: error
                message: Failed to create resource
                return_code: failed_creating_resource
                info: BaseException
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
          description: Internal Server Error
  /corpus/list:
    get:
      tags:
      - Manage Corpora
      summary: List Corpora
      description: 'List the IDs of all available corpora.


        ### Example


        ```bash

        curl ''https://ws.spraakbanken.gu.se/ws/mink/v3/corpus/list'' -H ''Authorization: Bearer YOUR_JWT''

        ```'
      operationId: list-corpora
      security:
      - OAuth2PasswordBearer: []
      - APIKeyHeader: []
      parameters:
      - name: session_id
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Session ID
          title: Session Id
        description: Session ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/mink__sparv__models__ListResourcesResponse'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse404Resource'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse422'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
          description: Internal Server Error
  /corpus/korp/list:
    get:
      tags:
      - Manage Corpora
      summary: List Korp Corpora
      description: 'List the IDs of the user''s Mink corpora that are installed in Korp.


        This route is deprecated and will be removed in future versions.


        ### Example


        ```bash

        curl ''https://ws.spraakbanken.gu.se/ws/mink/v3/corpus/korp/list'' -H ''Authorization: Bearer YOUR_JWT''

        ```'
      operationId: list-korp-corpora
      deprecated: true
      security:
      - OAuth2PasswordBearer: []
      - APIKeyHeader: []
      parameters:
      - name: session_id
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Session ID
          title: Session Id
        description: Session ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/mink__sparv__models__ListResourcesResponse'
              example:
                status: success
                message: Listing contents
                return_code: listing_content
                info: Listing corpora installed in Korp
                resources:
                - mink-dxh6e6wtff
                - mink-j86tfreaf9
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse404Resource'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse422'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              example:
                status: error
                message: Failed to list contents
                return_code: failed_listing_content
                info: Failed to list corpora installed in Korp
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
          description: Internal Server Error
  /list-korp-corpora:
    get:
      tags:
      - Manage Corpora
      summary: List-Korp-Corpora-Deprecated
      description: 'List the IDs of the user''s Mink corpora that are installed in Korp.


        This route is deprecated and will be removed in future versions.


        ### Example


        ```bash

        curl ''https://ws.spraakbanken.gu.se/ws/mink/v3/corpus/korp/list'' -H ''Authorization: Bearer YOUR_JWT''

        ```'
      operationId: list_korp_corpora_deprecated_list_korp_corpora_get
      deprecated: true
      security:
      - OAuth2PasswordBearer: []
      - APIKeyHeader: []
      parameters:
      - name: session_id
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Session ID
          title: Session Id
        description: Session ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /corpus/remove/{resource_id}:
    delete:
      tags:
      - Manage Corpora
      summary: Remove Corpus
      description: 'Remove a corpus from the storage server.


        Will attempt to abort any running job for this corpus and also remove it from the Sparv server.


        ### Example


        ```bash

        curl -X DELETE ''https://ws.spraakbanken.gu.se/ws/mink/v3/corpus/remove/'' -H ''Authorization: Bearer YOUR_JWT''

        ```'
      operationId: remove-corpus
      security:
      - OAuth2PasswordBearer: []
      - APIKeyHeader: []
      parameters:
      - name: resource_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Resource ID
          title: Resource Id
        description: Resource ID
      - name: session_id
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Session ID
          title: Session Id
        description: Session ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse'
              example:
                status: success
                message: Resource successfully removed
                return_code: removed_resource
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse404Resource'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse422'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              example:
                status: error
                message: Failed to remove content
                return_code: failed_removing_content
                info: Failed to remove resource from Korp
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
          description: Internal Server Error
  /corpus/sources/upload/{resource_id}:
    put:
      tags:
      - Manage Corpora
      summary: Upload Sources
      description: 'Upload the attached files as corpus source files.


        Attached files will be added to the corpus or replace existing ones. Files identical in name, size and md5 checksum

        will not be uploaded again.


        ### Example


        ```bash

        curl -X PUT ''https://ws.spraakbanken.gu.se/ws/mink/v3/corpus/sources/upload/'' -H ''Authorization: Bearer YOUR_JWT'' -F ''files=@path_to_file1'' -F ''files=@path_to_file2''

        ```'
      operationId: upload-corpus-sources
      security:
      - OAuth2PasswordBearer: []
      - APIKeyHeader: []
      parameters:
      - name: resource_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Resource ID
          title: Resource Id
        description: Resource ID
      - name: session_id
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Session ID
          title: Session Id
        description: Session ID
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload-corpus-sources'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse'
        '201':
          content:
            application/json:
              example:
                status: success
                message: File(s) successfully uploaded
                return_code: uploaded_file
                warnings:
                - File 'example.txt' already existed and was replaced during upload.
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse404Resource'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse422'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              example:
                status: error
                message: Failed to upload file(s)
                return_code: failed_uploading_file
                info: BaseException
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
          description: Internal Server Error
        '413':
          content:
            application/json:
              example:
                status: error
                message: Request data too large
                return_code: content_too_large
                file: example.txt
                info: max file size exceeded
                max_size_mb: 10
              schema:
                $ref: '#/components/schemas/ErrorResponse413'
          description: Request Entity Too Large
  /corpus/sources/list/{resource_id}:
    get:
      tags:
      - Manage Corpora
      summary: List Sources
      description: 'List the available corpus source files.


        ### Example


        ```bash

        curl ''https://ws.spraakbanken.gu.se/ws/mink/v3/corpus/sources/list/'' -H ''Authorization: Bearer YOUR_JWT''

        ```'
      operationId: list-corpus-sources
      security:
      - OAuth2PasswordBearer: []
      - APIKeyHeader: []
      parameters:
      - name: resource_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Resource ID
          title: Resource Id
        description: Resource ID
      - name: session_id
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Session ID
          title: Session Id
        description: Session ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListingFilesResponse'
              example:
                status: success
                message: Listing contents
                return_code: listing_content
                info: Listing source files
                contents:
                - name: dokument1.xml
                  type: application/xml
                  last_modified: '2022-06-10T17:05:18+02:00'
                  size: 1397
                  path: dokument1.xml
                - name: dokument2.xml
                  type: application/xml
                  last_modified: '2022-06-10T17:05:16+02:00'
                  size: 116
                  path: dokument2.xml
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse404Resource'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse422'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              example:
                status: error
                message: Failed to list contents
                return_code: failed_listing_content
                info: Failed to list source files
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
          description: Internal Server Error
  /corpus/sources/remove/{resource_id}:
    delete:
      tags:
      - Manage Corpora
      summary: Remove Sources
      description: 'Remove the source files given in the `remove` parameter from the corpus.


        Files are provided as a comma-separated list of paths relative to the source directory. If any files could not be

        removed they will be listed in the error response.


        ### Example


        ```bash

        curl -X DELETE ''https://ws.spraakbanken.gu.se/ws/mink/v3/corpus/sources/remove/?remove=file1,file2'' -H ''Authorization: Bearer YOUR_JWT''

        ```'
      operationId: remove-corpus-sources
      security:
      - OAuth2PasswordBearer: []
      - APIKeyHeader: []
      parameters:
      - name: resource_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Resource ID
          title: Resource Id
        description: Resource ID
      - name: remove
        in: query
        required: true
        schema:
          type: array
          items:
            type: string
          description: Files to remove, comma-separated
          title: Remove
        description: Files to remove, comma-separated
      - name: session_id
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Session ID
          title: Session Id
        description: Session ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse'
              example:
                status: success
                message: Content successfully removed
                return_code: removed_content
                info: Removed source files
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse404Resource'
          description: Not Found
        '422':
          content:
            application/json:
              example:
                status: error
                message: Validation Error
                return_code: validation_error
                info: Missing required query parameter 'remove'
              schema:
                $ref: '#/components/schemas/BaseErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              example:
                status: error
                message: Failed to remove content
                return_code: failed_removing_content
                info: Failed to remove some source files
                failed:
                - file1.xml
                - file2.xml
                succeeded:
                - file3.xml
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
          description: Internal Server Error
  /corpus/sources/download/{resource_id}:
    get:
      tags:
      - Manage Corpora
      summary: Download Sources
      description: 'Download the corpus source files as a zip file.


        The parameter `file` may be used to download a specific source file. This parameter must either be a file name or an

        absolute path on the Storage server. The `zip` parameter may be set to `false` in combination with the file param to

        avoid zipping the file to be downloaded.


        ### Example


        ```bash

        curl ''https://ws.spraakbanken.gu.se/ws/mink/v3/corpus/sources/download/?file=some_file_name&zip=true'' -H ''Authorization: Bearer YOUR_JWT''

        ```'
      operationId: download-corpus-sources
      security:
      - OAuth2PasswordBearer: []
      - APIKeyHeader: []
      parameters:
      - name: resource_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Resource ID
          title: Resource Id
        description: Resource ID
      - name: file
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: The file name or path to download
          title: File
        description: The file name or path to download
      - name: zip
        in: query
        required: false
        schema:
          type: boolean
          description: Whether to zip the file or not
          default: false
          title: Zip
        description: Whether to zip the file or not
      - name: session_id
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Session ID
          title: Session Id
        description: Session ID
      responses:
        '200':
          description: A file download response
          content:
            application/octet-stream: {}
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse404File'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse422'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              example:
                status: error
                message: Failed to download file(s)
                return_code: failed_downloading_file
                info: BaseException
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
          description: Internal Server Error
  /corpus/config/upload/{resource_id}:
    put:
      tags:
      - Manage Corpora
      summary: Upload Config
      description: 'Upload a corpus configuration as file or plain text (using the `config` parameter).


        The config must be in yaml format. Read more about corpus config files in the Sparv Pipeline

        documentation.


        If a config file already exists for the given corpus it will be replaced by the newly uploaded one.


        Please note that any yaml comments may be removed from your config upon upload.


        ### Example


        ```bash

        curl -X PUT ''https://ws.spraakbanken.gu.se/ws/mink/v3/corpus/config/upload/'' -H ''Authorization: Bearer YOUR_JWT'' -F ''file=@path_to_config_file''

        ```'
      operationId: upload-corpus-config
      security:
      - OAuth2PasswordBearer: []
      - APIKeyHeader: []
      parameters:
      - name: resource_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Resource ID
          title: Resource Id
        description: Resource ID
      - name: config
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: The config file as plain text
          title: Config
        description: The config file as plain text
      - name: custom-config
        in: query
        required: false
        schema:
          type: boolean
          description: Whether this upload should be marked as a custom config upload
          default: true
          title: Custom-Config
        description: Whether this upload should be marked as a custom config upload
      - name: session_id
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Session ID
          title: Session Id
        description: Session ID
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_upload-corpus-config'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse'
              example:
                status: success
                message: File(s) successfully uploaded
                return_code: uploaded_file
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse404Resource'
          description: Not Found
        '422':
          content:
            application/json:
              example:
                status: error
                message: Validation Error
                return_code: validation_error
                info: Both a file and plain text config were provided
              schema:
                $ref: '#/components/schemas/BaseErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              example:
                status: error
                message: Failed to upload file(s)
                return_code: failed_uploading_file
                info: BaseException
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
          description: Internal Server Error
  /corpus/config/download/{resource_id}:
    get:
      tags:
      - Manage Corpora
      summary: Download Config
      description: 'Download the corpus config file in YAML format.


        ### Example


        ```bash

        curl ''https://ws.spraakbanken.gu.se/ws/mink/v3/corpus/config/download/'' -H ''Authorization: Bearer YOUR_JWT''

        ```'
      operationId: download-corpus-config
      security:
      - OAuth2PasswordBearer: []
      - APIKeyHeader: []
      parameters:
      - name: resource_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Resource ID
          title: Resource Id
        description: Resource ID
      - name: session_id
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Session ID
          title: Session Id
        description: Session ID
      responses:
        '200':
          description: A file download response
          content:
            application/octet-stream: {}
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse404File'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse422'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              example:
                status: error
                message: Failed to download file(s)
                return_code: failed_downloading_file
                info: BaseException
              schema:
                $ref: '#/components/schemas/ErrorResponse500'
          description: Internal Server Error
  /corpus/exports/list/{resource_id}:
    get:
      tags:
      - Manage Corpora
      summary: List Exports
      description: 'List the available export files created by Sparv.


        ### Example


        ```bash

        curl ''https://ws.spraakbanken.gu.se/ws/mink/v3/corpus/exports/list/'' -H ''Authorization: Bearer YOUR_JWT''

        ```'
      operationId: list-corpus-exports
      security:
      - OAuth2PasswordBearer: []
      - APIKeyHeader: []
      parameters:
      - name: resource_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Resource ID
          title: Resource Id
        description: Resource ID
      - name: session_id
        in: cookie
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Session ID
          title: Session Id
        description: Session ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListingFilesResponse'
              example:
                status: success
                message: Listing contents
                return_code: listing_content
                info: Listing export files
                contents:
                - name: dokument1.csv
                  type: text/csv
                  last_modified: '2022-06-10T17:55:37+02:00'
                  size: 4876
                  path: csv_export/dokument1.csv
                - name: dokument1_export.xml
                  type: application/xml
                  last_modified: '2022-06-10T17:55:38+02:00'
                  size: 13429
                  path: xml_export.pretty/dokument1_export.xml
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse400'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse401'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse404Resource'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse422'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              example:
                status: error
       

# --- truncated at 32 KB (90 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/university-of-gothenburg/refs/heads/main/openapi/university-of-gothenburg-manage-corpora-api-openapi.yml