Skip to content

Funktionen_StorageResource

Florian Fehring edited this page Apr 30, 2026 · 3 revisions

Here you find the storage functions. A storage is an organisation area inside the data structure. postgres: storage = schema

Function 1: Create a Storage

URL: {{base_url}}/{{smartdata}}/smartdata/storage/create?name=teststorage

Method: POST

Body: None

  1. Sending POST CreateStorage Request
    • Storage created
    • Response with State 201 CREATED

Testcases:

  • testCreateStorage()
  • testCreateSecondStorage()

Exceptions:

  1. A storage should be created that allready exists
    • Response with State NOT_MODIFIED

Testcases:

  • testCreateStorageAllreadyExists()

Function 2: Get Storages abilities

URL: {{base_url}}/{{smartdata}}/smartdata/storage/getAbilities?name=teststorage

Method: GET

  1. Sending GET request
  • Returns a list of abilities with names and versions.
  • Response state: 200 OK

Testcases:

  • testGetAbilities()

Exceptions:

  1. Storage does not have abilities
    • Responds with an empty list
    • Response state: 200 OK

Function 3: Get all collections of a storage

URL: {{base_url}}/{{smartdata}}/smartdata/storage/getCollections?name=teststorage

Method: GET

  1. Sending GET request
  • All available Collections in Storage are listed (JSON)
  • Response state: 200 OK

Testcases:

  • testGetCollections()

Exceptions:

  1. There are no Collections in Storage
    • Resulting list is empty (JSON)
    • Response state: 200 OK

Testcases:

  • testGetCollectionsNoOne()

Function 4: Get a list of collections but don't list some

URL: {{base_url}}/{{smartdata}}/smartdata/storage/getCollections?name=teststorage&exclude='label_labels','label_observedobject','tbl_datatype','tbl_locations'

  1. Sending GET request
  • Resulting list contains all collection but not that ones stated at exclude
  • Response state: 200 OK

Function 5: Delete a Storage

URL: {{base_url}}/{{smartdata}}/smartdata/storage/delete?name=teststorage

Method: DELETE

  1. Sending delete requet
    • Storage is remove from database
    • Response state: 200 OK

Testcases:

  • testDeleteStorage()

Exeptions:

  1. Storage does not exists
    • Response state: NOT_MODIFIED

Clone this wiki locally