Goobi workflow
Documentation homeGoobi workflow PluginsGoobi workflow Digests
English
English
  • Overview
    • Goobi workflow Handbook
    • Overview of documentation
    • What is Goobi?
  • Users
    • Goobi for Users
    • The basics
      • Logging in
      • Menu
      • Logging out
      • Switch between available languages
      • Help function
      • Personal settings
      • Changing your password
      • My tasks
      • Processes
      • How to find a process
      • How to create a new process
      • Edit task details
    • How different user groups work with Goobi
      • Scanning
      • Quality control
      • Manual script steps and plugin steps
      • Automatic script-run steps
      • Metadata processing
      • Export to the DMS
    • Metadata Editor
      • User interface
        • Structure tree
        • Page display
        • Menu options
      • Metadata indexing
        • Pagination
        • Structuring
          • Create new structure element
          • Moving structure elements
          • Copying structure elements from other processes
      • Modifying and verifying data
        • Subsequent changes to pagination
        • Uploading files
        • Downloading files
        • Server-based exports
        • Server-based imports
      • Edit OCR results
      • Overview of the keyboard combinations
  • Management
    • Goobi Management
    • Structure of the extended user interface
    • Rulesets
    • LDAP groups
    • Users
    • User groups
    • Processes
      • Searching processes
      • Activity
      • Activities for hit lists
      • GoobiScript
    • Variables
    • Harvester
  • Administration
    • Goobi Administration
    • File system
      • Global directory structure
        • ‘config’ sub-directory
        • ‘import’ sub-directory
        • ‘metadata’ sub-directory
        • ‘plugins’ sub-directory
        • ‘rulesets’ sub-directory
        • ‘scripts’ sub-directory
        • ‘xslt’ sub-directory
      • Directory structure of the application
      • Integrating external storage
      • Integration of S3 as storage
    • Services
      • MySQL database
      • Apache Tomcat servlet container
      • User authentication using LDAP
      • File system access using Samba
    • Exporting to digital libraries
      • Technical data
      • Mets parameters
      • Mets file groups
      • Export configuration in the Goobi configuration file
    • Working with the intranda Task Manager
    • Automatic workflow steps
      • Example combination for an automatic script task
      • Migration of technical data to METS files
      • Automatic image deletion
    • Configuration files
      • goobi_activemq.xml
      • goobi_config.properties
      • goobi_digitalCollections.xml
      • goobi_exportXml.xml
      • goobi_mail.xml
      • goobi_metadataDisplayRules.xml
      • goobi_normdata.xml
      • goobi_opac.xml
      • goobi_opacUmlaut.txt
      • goobi_processProperties.xml
      • goobi_projects.xml
      • goobi_rest.xml
      • goobi_webapi.xml
      • messages_xx.properties
      • config_contentServer.xml
    • Installation guide
      • Installation guide - Ubuntu 20.04
    • Update guide
      • Preparation of an update
      • Update steps
        • 2020
        • 2021
        • 2022
        • 2023
        • 2024
        • 2025
    • Authentication options
      • Authentication via the database
      • Authentication via HTTP header
      • Authentication via OpenID Connect
    • Use cases
      • Create thumbnails for accelerated image display
      • Handling of 3D Objects
      • Export of 3D-Objects into the Goobi viewer
  • Developer
    • Setting up a development environment
      • Preparatory work
      • Setting up Eclipse
      • Resetting the data
      • Best practice for developing Goobi and working with Eclipse
    • Using the REST API
    • Snippets for the development on Goobi workflow
      • HTML
      • JavaScript
Bereitgestellt von GitBook
Auf dieser Seite
  • Configuring the REST API
  • Swagger UI as interface description
Als PDF exportieren
  1. Developer

Using the REST API

VorherigeBest practice for developing Goobi and working with EclipseNächsteSnippets for the development on Goobi workflow

Zuletzt aktualisiert vor 5 Monaten

Goobi workflow has a very comprehensive REST API that can be used to connect external applications and services to Goobi workflow.

Configuring the REST API

This configuration of the REST API is already documented in detail here:

For easy testing, it may be helpful to temporarily adjust the configuration within the configuration file goobi_rest.xml so that all commands can be called from the desired IP range (e.g. for localhost) with a simple password (token). Such an example configuration could look like this:

<?xml version='1.0' encoding='UTF-8'?>
<config>
    <!-- allow all commands just locally with the token 'test' -->
    <endpoint path=".*">
      <method name="post">
        <allow netmask="0:0:0:0:0:0:0:1/128" token="test"/>
        <allow netmask="127.0.0.0/8" token="test"/>
      </method>
      <method name="get">
        <allow netmask="0:0:0:0:0:0:0:1/128" token="test"/>
        <allow netmask="127.0.0.0/8" token="test"/>
      </method>
      <method name="put">
        <allow netmask="0:0:0:0:0:0:0:1/128" token="test"/>
        <allow netmask="127.0.0.0/8" token="test"/>
      </method>
    </endpoint>
</config>

Swagger UI as interface description

There is an automated documentation for the REST API of Goobi workflow using Swagger UI. This is a very common interface description that allows developers to interactively try out Goobi workflow's REST API and thus implement a connection between external applications and Goobi workflow.

More information about the possibilities offered by interface documentation via Swagger can be found here:

The interface description can be accessed within Goobi workflow via the menu Administration and allows from here the testing of individual commands directly in the web browser:

To illustrate the functional scope of the REST API of Goobi workflow, here is an insight into the interface documentation in JSON format in a highly abbreviated form. The full current scope of the REST endpoints available depends largely on the Goobi version as well as the REST plugins installed and will differ greatly from the example shown here:

{
  "openapi": "3.0.1",
  "info": {
    "title": "Goobi workflow REST API.",
    "description": "This documentation describes the Goobi workflow REST API.",
    "contact": {
      "email": "info@intranda.com"
    },
    "license": {
      "name": "GPL2 or later",
      "url": "https://github.com/intranda/goobi-workflow/blob/master/LICENSE"
    }
  },
  "servers": [
    {
      "url": "/goobi"
    }
  ],
  "security": [
    {
      "query": [],
      "header": []
    }
  ],
  "paths": {
    "/api/ics/info.json": {
      "get": {
        "operationId": "getApplicationInfo",
        "responses": {
          "default": {
            "description": "default response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationInfo"
                }
              }
            }
          }
        }
      }
    },
    "/api/status": {
      "get": {
        "operationId": "getStatus",
        "responses": {
          "default": {
            "description": "default response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceStatus"
                }
              }
            }
          }
        }
      }
    },
    "/api/footer": {
      "get": {
        "operationId": "redirectToCanonicalImageInfo",
        "responses": {
          "default": {
            "description": "default response",
            "content": {
              "application/json": {},
              "application/ld+json": {}
            }
          }
        }
      }
    },
    "/api/footer/{region}/{size}/{rotation}/{quality}.{format}": {
      "get": {
        "operationId": "getImage",
        "parameters": [
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "size",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rotation",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quality",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "default response",
            "content": {
              "image/jpg": {},
              "image/png": {},
              "image/tif": {}
            }
          }
        }
      }
    },
    "/api/footer/{quality}.{format}": {
      "get": {
        "operationId": "redirectToFullImage",
        "parameters": [
          {
            "name": "quality",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "default response",
            "content": {
              "image/jpg": {},
              "image/png": {},
              "image/tif": {}
            }
          }
        }
      }
    },
    "/api/footer/status": {
      "get": {
        "operationId": "getStatus_1",
        "responses": {
          "default": {
            "description": "default response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResourceStatus"
                }
              }
            }
          }
        }
      }
    },
    "/api/image/{directory}/{filename}/info.json": {
      "get": {
        "operationId": "getInfoAsJson",
        "parameters": [
          {
            "name": "directory",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filename",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "default response",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageInformation"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImageInformation"
                }
              }
            }
          }
        }
      }
    },
    "/api/image/{directory}/{filename}": {
      "get": {
        "operationId": "redirectToCanonicalImageInfo_1",
        "parameters": [
          {
            "name": "directory",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filename",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "default response",
            "content": {
              "application/json": {},
              "application/ld+json": {}
            }
          }
        }
      }
    },
    "/api/image/{directory}/{filename}/{region}/{size}/{rotation}/{quality}.{format}/{cacheCommand}": {
      "get": {
        "operationId": "isInCache",
        "parameters": [
          {
            "name": "directory",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filename",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "size",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rotation",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "quality",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cacheCommand",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "default response",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      }
    },
    "/api/image/{directory}/{filename}/info.xml": {
      "get": {
        "operationId": "getInfoAsXml",
        "parameters": [
          {
            "name": "directory",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filename",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "default response",
            "content": {
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/ImageInformation"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "query": {
        "type": "apiKey",
        "name": "token",
        "in": "query"
      },
      "header": {
        "type": "apiKey",
        "name": "token",
        "in": "header"
      }
    }
  }
}

goobi_rest.xml
https://swagger.io/
Display details via the REST API using the Swagger interface
Display details via the REST API using the Swagger interface