-
Notifications
You must be signed in to change notification settings - Fork 2
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
URL: {{base_url}}/{{smartdata}}/smartdata/storage/create?name=teststorage
Method: POST
Body: None
- Sending POST CreateStorage Request
- Storage created
- Response with State 201 CREATED
Testcases:
- testCreateStorage()
- testCreateSecondStorage()
Exceptions:
- A storage should be created that allready exists
- Response with State NOT_MODIFIED
Testcases:
- testCreateStorageAllreadyExists()
URL: {{base_url}}/{{smartdata}}/smartdata/storage/getAbilities?name=teststorage
Method: GET
- Sending GET request
- Returns a list of abilities with names and versions.
- Response state: 200 OK
Testcases:
- testGetAbilities()
Exceptions:
- Storage does not have abilities
- Responds with an empty list
- Response state: 200 OK
URL: {{base_url}}/{{smartdata}}/smartdata/storage/getCollections?name=teststorage
Method: GET
- Sending GET request
- All available Collections in Storage are listed (JSON)
- Response state: 200 OK
Testcases:
- testGetCollections()
Exceptions:
- There are no Collections in Storage
- Resulting list is empty (JSON)
- Response state: 200 OK
Testcases:
- testGetCollectionsNoOne()
- Es wird eine Liste aller Collections im angegebenen Storage zurückgegeben. Dabei werden Collections, die im Parameter "exclude" angegeben wurden, ignoriert.
Beispiel:
localhost:8080/SmartDataTest/smartdata/storage/getCollections?name=smartmonitoring&exclude='label_labels','label_observedobject','map_pictures','map_pictures_join_oo','schemes','schemes_visuals','tbl_card','tbl_datatype','tbl_locations'
- Es wird der angegebene Storage mit allen Collections gelöscht
- testDeleteStorage()
Ausnahmen:
- Es gibt den Storage nicht
- Es wird mit Status NOT_MODIFIED geantwortet