{"openapi":"3.0.1","info":{"title":"TrendMiner Work Organisation API","description":"API to organize work.","termsOfService":"urn:tos'","contact":{"name":"TrendMiner","url":"http://www.trendminer.com","email":"support@trendminer.com"},"license":{"name":"Commercial","url":"http://www.trendminer.com"},"version":"1.0.0"},"servers":[{"url":"https://tm-toggles-next.trendminer.net/work","description":"Generated server url"}],"security":[{"bearerAuth":[]},{"openIdConnect":[]}],"paths":{"/saveditem/{id}":{"get":{"tags":["Saved items"],"summary":"Retrieve a saved item","operationId":"getSavedItem","parameters":[{"name":"id","in":"path","description":"The identifier of the saved item to retrieve.<br/>This identifier should be a valid UUID.","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"Resource(s) not found!","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}},"403":{"description":"Forbidden","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}},"200":{"description":"Ok","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}}}},"put":{"tags":["Saved items"],"summary":"Update a saved item","description":"This will update the saved item based on the API model. <br/>The saved item will be completely overridden with the model, except for the identifier, owner and creation date<br/>Omitting the parentId will move the saved item to the top level folder","operationId":"updateSavedItem","parameters":[{"name":"id","in":"path","description":"The identifier of the saved item that will be updated","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The API model containing the changes to apply to the saved item.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedItemModel"}}},"required":true},"responses":{"404":{"description":"The resource was not found!","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}},"400":{"description":"Validation failed","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}},"200":{"description":"Ok","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}},"406":{"description":"Duplicate item! | Folder structure invalid!","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}}}},"delete":{"tags":["Saved items"],"summary":"Delete saved item(s)","description":"If a saved item is a folder, all children are deleted as well.<br/>This cascades until all children are deleted.","operationId":"deleteSavedItem","parameters":[{"name":"id","in":"path","description":"The id's of the saved items to delete","required":true,"schema":{"type":"string"}}],"responses":{"404":{"description":"The resource was not found!","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/DeletedItemsResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/DeletedItemsResource"}}}},"200":{"description":"OK","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/DeletedItemsResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/DeletedItemsResource"}}}}}},"patch":{"tags":["Saved items"],"summary":"Patch a saved item","description":"This will patch the saved item. <br/>Only extended view properties are allowed and implemented. Other properties will be ignored","operationId":"patchSavedItem","parameters":[{"name":"id","in":"path","description":"The identifier of the saved item that will be patched","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The API model containing the changes to apply to the saved item. Only the extended view properties are checked and the rest will be ignored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedItemModel"}}},"required":true},"responses":{"404":{"description":"The resource was not found!","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}},"400":{"description":"Validation failed","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}},"200":{"description":"Ok","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}},"406":{"description":"Duplicate item! | Folder structure invalid!","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}}}}},"/saveditem/{id}/move":{"put":{"tags":["Saved items"],"summary":"Move saved item(s) to a folder","description":"If no destination identifier is provided, the saved item(s) will be moved to the top level folder.","operationId":"moveSavedItem","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"array","items":{"type":"string"}}},{"name":"destination","in":"query","description":"The identifier of the destination folder.","required":false,"schema":{"type":"string"}},{"name":"itemsToMove","in":"path","description":"The identifier(s) of the saved item(s) to move.","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Ok","content":{"application/hal+json":{"schema":{"type":"object"}},"application/x-spring-data-compact+json":{"schema":{"type":"object"}}}},"404":{"description":"The resource was not found!","content":{"application/hal+json":{"schema":{"type":"object"}},"application/x-spring-data-compact+json":{"schema":{"type":"object"}}}},"406":{"description":"Duplicate item! | Folder structure invalid!","content":{"application/hal+json":{"schema":{"type":"object"}},"application/x-spring-data-compact+json":{"schema":{"type":"object"}}}}}}},"/preferences/{name}":{"get":{"tags":["Preferences"],"summary":"Retrieve an existing preference for the logged in user","operationId":"getPreference","parameters":[{"name":"name","in":"path","description":"The name of an existing preference to retrieve","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}},"404":{"description":"Resource(s) not found!","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}},"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}}}},"put":{"tags":["Preferences"],"summary":"Update a preference","description":"The preference needs to exist with the given name for the logged in user.<br>The data in the api model needs to be valid json","operationId":"updatePreference","parameters":[{"name":"name","in":"path","description":"The name of an existing preference to update","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"A representation of a preference with data to update.<br> The name in this model will be ignored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceModel"}}},"required":true},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}},"404":{"description":"Resource(s) not found!","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}},"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}}}},"delete":{"tags":["Preferences"],"summary":"Delete an existing preference for the logged in user","operationId":"deletePreference","parameters":[{"name":"name","in":"path","description":"The name of an existing preference to delete","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Resource(s) not found!","content":{"application/json":{"schema":{"type":"string"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"type":"string"}}}},"204":{"description":"No response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/sessions":{"get":{"tags":["Sessions"],"summary":"Get a session by viewId","operationId":"getSessionByViewId","parameters":[{"name":"viewId","in":"query","description":"The viewId of the session","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}},"404":{"description":"Resource(s) not found!","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}},"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}}}},"post":{"tags":["Sessions"],"summary":"Create a new session","description":"A session is user specific. It will always be created for the logged in user.<br/>The data of a session needs to be valid json.<br/><br/>A created session with an unique short url identifier will be returned.<br/>This identifier can be used to retrieve the stored session data.<br/>NOTE: there is no option to retrieve a list of all stored sessions!","operationId":"createSession","requestBody":{"description":"A session containing valid JSON data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionModel"}}},"required":true},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}}}}},"/saveditem":{"post":{"tags":["Saved items"],"summary":"Create a new saved item","description":"A saved item can be a saved item with a type or a folder.\nTo create a typed saved item:\n- Set the property \"folder\" to false\n- Provide a type via the \"type\" property\n- Provide content via the \"data\" property\n\nTo create a folder:\n- Set the property \"folder\" to true;\n- The properties \"data\" and \"type\" are not accepted. These should not be provided.","operationId":"createSavedItem","requestBody":{"description":"A model of the item to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedItemModel"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}},"400":{"description":"Validation failed","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}}}}},"/saveditem/{savedItemId}/accessrule":{"get":{"tags":["Access rules"],"summary":"Get the access rules for a saved item.","operationId":"getRules","parameters":[{"name":"savedItemId","in":"path","description":"The saved item to which the access rules apply","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccessRuleResource"}}}}},"404":{"description":"The resource was not found","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccessRuleResource"}}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccessRuleResource"}}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccessRuleResource"}}}}}}},"post":{"tags":["Access rules"],"summary":"Create an access rule for the saved item.","operationId":"createRule","parameters":[{"name":"savedItemId","in":"path","description":"The saved item for which to create the access rule","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The access rule model.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedItemAccessRuleModel"}}},"required":true},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRuleResource"}}}},"404":{"description":"The resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRuleResource"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRuleResource"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRuleResource"}}}}}}},"/saveditem/{id}/copy":{"post":{"tags":["Saved items"],"summary":"Copy an existing saved item.","description":"Some restrictions apply:\n- A folder can not be copied;\n- Only the owner of the saved item can create a copy;\n- The copied saved item is created in the same location as the origin saved item;\n- Ony name and description can be changed during copying.","operationId":"copySavedItem","parameters":[{"name":"id","in":"path","description":"The identifier of the existing saved item that will be copied","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The API model containing the changes to apply to the copied saved item.<br/>Only the name and/or description can be changed ","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedItemModel"}}},"required":true},"responses":{"403":{"description":"Forbidden","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}},"404":{"description":"The resource was not found!","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}},"201":{"description":"Created","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}},"400":{"description":"Validation failed","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemResource"}}}}}}},"/saveditem/demo":{"post":{"tags":["Saved items - Demo"],"summary":"Create demo saved items for a (new) user","operationId":"createDemoSavedItems","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInformationModel"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/hal+json":{"schema":{"type":"object"}},"application/x-spring-data-compact+json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/hal+json":{"schema":{"type":"object"}},"application/x-spring-data-compact+json":{"schema":{"type":"object"}}}}},"deprecated":true}},"/preferences":{"get":{"tags":["Preferences"],"summary":"Retrieve all preferences for the logged in user","operationId":"getPreferences","responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceResource"}}}}},"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceResource"}}}}}}},"post":{"tags":["Preferences"],"summary":"Create a new preference","description":"A preference is user specific. It will always be created for the logged in user.<br>The data in the api model needs to contain valid json.<br>The name in the api model needs to be unique and non-existing.","operationId":"createPreference","requestBody":{"description":"A representation of a preference with name and data to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceModel"}}},"required":true},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}}}}},"/preferences/store":{"post":{"tags":["Preferences"],"summary":"Store a list of preferences","description":"The list can contain new and existing preferences.<br>The new preferences need to contain unique non-existing name and valid JSON node.<br>The existing preferences need to contain an existing name and valid JSON.<br>The preferences will be stored for the logged in user.","operationId":"storePreferences","requestBody":{"description":"A list of preferences to store","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceModel"}}}},"required":true},"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceResource"}}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceResource"}}}}},"200":{"description":"Ok","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceResource"}}}}}}}},"/import":{"post":{"tags":["Saved items - Export / Import"],"summary":"Import saved items","operationId":"importSavedItems","parameters":[{"name":"username","in":"query","description":"The username for which the savedItems need to be imported (default: current user)","required":false,"schema":{"type":"string"}},{"name":"skip","in":"query","description":"when set to true, duplicates will not be imported; when set to false, duplicates will be replaced (default: true)","required":false,"schema":{"type":"boolean"},"example":true}],"requestBody":{"description":"The file containing exported items","content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}},"required":true},"responses":{"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ImportResult"}}}},"200":{"description":"Ok","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ImportResult"}}}}}}},"/sessions/{identifier}":{"get":{"tags":["Sessions"],"summary":"Retrieve a session","operationId":"getSession","parameters":[{"name":"identifier","in":"path","description":"The short url identifier of the session to retrieve","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}},"404":{"description":"Resource(s) not found!","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}},"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferenceResource"}}}}}},"delete":{"tags":["Sessions"],"summary":"Delete an existing session","operationId":"deleteSession","parameters":[{"name":"identifier","in":"path","description":"The short url identifier of the session to delete","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Resource(s) not found!","content":{"application/json":{"schema":{"type":"object"}}}},"405":{"description":"Method Not Allowed","content":{"application/json":{"schema":{"type":"object"}}}},"204":{"description":"No response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/saveditemtype":{"get":{"tags":["Saved item types"],"summary":"List all the available saved item types","operationId":"getSavedItemTypes","responses":{"200":{"description":"OK","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/CollectionModelSavedItemTypeResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/CollectionModelSavedItemTypeResource"}}}}}}},"/saveditemtype/{id}":{"get":{"tags":["Saved item types"],"summary":"Retrieves the details of the specified type","operationId":"getSavedItemType","parameters":[{"name":"id","in":"path","description":"The name of the saved item type to retrieve details of","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/SavedItemTypeResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/SavedItemTypeResource"}}}}}}},"/saveditem/search":{"get":{"tags":["Saved items"],"summary":"Search saved items","operationId":"searchSavedItems","parameters":[{"name":"query","in":"query","description":"A query string to search.<br/>Only the name and description of the saved item are search.<br/>Wildcards (*) are supported on all locations.","required":true,"schema":{"type":"string"}},{"name":"excludeTypes","in":"query","description":"A list of saved item types.<br/>These types will be excluded from the result.","required":false,"schema":{"type":"string"}},{"name":"includeTypes","in":"query","description":"A list of saved item types.<br/>The result will only contain these types.","required":false,"schema":{"type":"string"}},{"name":"includeData","in":"query","description":"Set to true to include the full data object in the result.<br/>Defaults to false","required":false,"schema":{"type":"boolean"}},{"name":"sharedWithMe","in":"query","description":"Set to true to filter the results to only show items that are shared with the logged in user.<br/>Defaults to false","required":false,"schema":{"type":"boolean"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","schema":{"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","schema":{"type":"integer","default":20}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"400":{"description":"Validation failed","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelSavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/PagedModelSavedItemResource"}}}},"200":{"description":"Ok","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelSavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/PagedModelSavedItemResource"}}}}}}},"/saveditem/browse":{"get":{"tags":["Saved items"],"summary":"Browse the contents of a folder","description":"A folder is a saved item with no data and marked as `folder=true`.<br/>Will return a list of all children within the folder.<br/>The children can be a mix of saved items and other folders.<br/>This list can be filtered with extra query parameters.","operationId":"browseFolder","parameters":[{"name":"parent","in":"query","description":"The identifier of the folder you want to browse","required":false,"schema":{"type":"string"}},{"name":"excludeTypes","in":"query","description":"A list of saved item types.<br/>These types will be excluded from the result.","required":false,"schema":{"type":"string"}},{"name":"includeTypes","in":"query","description":"A list of saved item types.<br/>The result will only contain these types.","required":false,"schema":{"type":"string"}},{"name":"includeData","in":"query","description":"Set to true to include the full data object in the result.<br/>Defaults to false","required":false,"schema":{"type":"boolean"}},{"name":"foldersOnly","in":"query","description":"Set to true to only return folders.","required":false,"schema":{"type":"boolean"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","schema":{"type":"integer","default":0}},{"name":"size","in":"query","description":"The size of the page to be returned","schema":{"type":"integer","default":20}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"404":{"description":"The resource was not found!","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelSavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/PagedModelSavedItemResource"}}}},"400":{"description":"Validation failed","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelSavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/PagedModelSavedItemResource"}}}},"200":{"description":"Ok","content":{"application/hal+json":{"schema":{"$ref":"#/components/schemas/PagedModelSavedItemResource"}},"application/x-spring-data-compact+json":{"schema":{"$ref":"#/components/schemas/PagedModelSavedItemResource"}}}}}}},"/permissions":{"get":{"tags":["Permissions"],"summary":"Returns a list of permissions for the saved item for the current logged in user","operationId":"getPermissions","parameters":[{"name":"saved-item-identifier","in":"query","description":"The identifier of the saved item to fetch permissions.This can be omitted for complex-item-identifier.","required":false,"schema":{"type":"string"}},{"name":"complex-item-identifier","in":"query","description":"The external identifier of the complex item to fetch permissions. This will be ignored if saved-item-identifier is present.","required":false,"schema":{"type":"string"}}],"responses":{"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsResource"}}}},"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsResource"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermissionsResource"}}}}}}},"/import/result":{"get":{"tags":["Saved items - Export / Import"],"summary":"Retrieve the results from the current or last import","operationId":"getImportResult","responses":{"200":{"description":"Ok","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ImportResult"}}}}}}},"/export":{"get":{"tags":["Saved items - Export / Import"],"summary":"Export saved items","operationId":"exportSavedItems","parameters":[{"name":"username","in":"query","description":"The username for which the savedItems need to be exported (default: current user)","required":false,"schema":{"type":"string"}}],"responses":{"403":{"description":"Forbidden","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StreamingResponseBody"}}}},"200":{"description":"Ok","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StreamingResponseBody"}}}}}}},"/saveditem/{savedItemId}/accessrule/{accessRuleId}":{"delete":{"tags":["Access rules"],"summary":"Delete an access rule for a saved item","operationId":"deleteRule","parameters":[{"name":"savedItemId","in":"path","description":"The saved item to which the access rule apply","required":true,"schema":{"type":"string"}},{"name":"accessRuleId","in":"path","description":"The identifier of the access rule to delete","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"The resource was not found","content":{"application/json":{"schema":{"type":"string"}}}},"204":{"description":"No response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"SavedItemModel":{"required":["name"],"type":"object","properties":{"id":{"type":"string","description":"The identifier of the saved item.<br/>This identifier is a UUID."},"parentId":{"type":"string","description":"The UUID of the folder where this saved item can be found.<br/>This folder is a saved item.<br/>When empty, the saved item will be saved in the most top level."},"type":{"type":"string","description":"The type of the saved item.<br/>The type indicates what can be stored in the data property.","enum":["SIMILARITY_SEARCH","VALUE_BASED_SEARCH","CROSS_ASSET_VALUE_BASED_SEARCH","DIGITAL_STEP_SEARCH","AREA_SEARCH","FINGERPRINT","LEGACY_FINGERPRINT","VIEW","TREND_HUB_2_VIEW","FILTER","CONTEXT_LOGBOOK_VIEW","FORMULA","AGGREGATION","DASHBOARD","MONITOR","MACHINE_LEARNING","PREDICTIVE","TOTALIZER","NOTEBOOK","PIPELINE"]},"name":{"type":"string","description":"The name of the savedItem"},"description":{"type":"string","description":"The description of the savedItem"},"data":{"type":"object","additionalProperties":{"type":"object","description":"A Json Object representing the content of the saved item.<br/>This content is specific to the saved item type."},"description":"A Json Object representing the content of the saved item.<br/>This content is specific to the saved item type."},"extendedViewProperties":{"type":"object","additionalProperties":{"type":"string","description":"Key value pairs representing the extended view properties of the saved item.<br/>This content is specific to the saved item type."},"description":"Key value pairs representing the extended view properties of the saved item.<br/>This content is specific to the saved item type."},"folder":{"type":"boolean","description":"true if the saved item is a folder; false otherwise.<br/>A folder can not contain data nor a type.<br/>As a result, both the data and type property will be ignored when a folder is saved."}},"description":"API model for creation or modification of a saved item"},"Links":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Link"}},"SavedItemResource":{"type":"object","properties":{"identifier":{"type":"string","description":"The identifier of the saved item.<br/>This identifier is a UUID."},"type":{"type":"string","description":"The type of the saved item.<br/>The type indicates what can be stored in the data property.","readOnly":true,"enum":["SIMILARITY_SEARCH","VALUE_BASED_SEARCH","CROSS_ASSET_VALUE_BASED_SEARCH","DIGITAL_STEP_SEARCH","AREA_SEARCH","FINGERPRINT","LEGACY_FINGERPRINT","VIEW","TREND_HUB_2_VIEW","FILTER","CONTEXT_LOGBOOK_VIEW","FORMULA","AGGREGATION","DASHBOARD","MONITOR","MACHINE_LEARNING","PREDICTIVE","TOTALIZER","NOTEBOOK","PIPELINE"]},"name":{"type":"string","description":"The name of the saved item."},"description":{"type":"string","description":"The description of the saved item."},"data":{"type":"object","additionalProperties":{"type":"object","description":"A Json Object representing the content of the saved item.<br/>This content is specific to the saved item type.<br/>The data is, by default, only available when retrieving a single saved item.<br/>This behaviour can be overridden in lists by explicitly providing \"includeData\" in the request URL."},"description":"A Json Object representing the content of the saved item.<br/>This content is specific to the saved item type.<br/>The data is, by default, only available when retrieving a single saved item.<br/>This behaviour can be overridden in lists by explicitly providing \"includeData\" in the request URL."},"extendedViewProperties":{"type":"object","additionalProperties":{"type":"string","description":"Key value pairs representing the extended view properties of the saved item.<br/>This content is specific to the saved item type."},"description":"Key value pairs representing the extended view properties of the saved item.<br/>This content is specific to the saved item type."},"lastModifiedDate":{"type":"string","description":"The UTC date when the saved item was last modified.","format":"date-time"},"folder":{"type":"boolean","description":"true if the saved item is a folder; false otherwise."},"shared":{"type":"boolean","description":"true if the saved item is shared; false otherwise."},"owner":{"type":"string","description":"The name of the saved item's owner."},"ownerUuid":{"type":"string","description":"The UUID of the saved item's owner."},"ownerUserDetails":{"$ref":"#/components/schemas/UserDetailsResource"},"parentId":{"type":"string","description":"The UUID of the folder where this saved item can be found.<br/>This folder is a saved item."},"permissions":{"uniqueItems":true,"type":"array","description":"A list of permissions on the saved item for the current logged in user.<br/>Possible permissions:<br/>* SAVED_ITEM_NO_PERMISSIONS - The item can not be accessed;<br/>* SAVED_ITEM_READ_ITEM - The item can be read;<br/>* SAVED_ITEM_WRITE_ITEM - The item can be updated.","items":{"type":"string","description":"A list of permissions on the saved item for the current logged in user.<br/>Possible permissions:<br/>* SAVED_ITEM_NO_PERMISSIONS - The item can not be accessed;<br/>* SAVED_ITEM_READ_ITEM - The item can be read;<br/>* SAVED_ITEM_WRITE_ITEM - The item can be updated."}},"_links":{"$ref":"#/components/schemas/Links"}},"description":"The definition of a saved item"},"UserDetailsResource":{"type":"object","properties":{"userId":{"type":"string","description":"Unique identifier"},"userName":{"type":"string","description":"Username"},"firstName":{"type":"string","description":"First name"},"lastName":{"type":"string","description":"Last name"}},"description":"Details about a user","readOnly":true},"JsonNode":{"type":"object","description":"JSON object containing the definition of the preference"},"PreferenceModel":{"required":["data","name"],"type":"object","properties":{"name":{"type":"string","description":"A unique name for the preference","example":"UserPreference_b"},"data":{"$ref":"#/components/schemas/JsonNode"}},"description":"API model of a preference"},"PreferenceResource":{"type":"object","properties":{"name":{"type":"string","description":"The name of the preference"},"data":{"$ref":"#/components/schemas/JsonNode"},"_links":{"$ref":"#/components/schemas/Links"}},"description":"Represents a saved user preference"},"SessionModel":{"required":["data"],"type":"object","properties":{"data":{"$ref":"#/components/schemas/JsonNode"}},"description":"API model of a session"},"SavedItemAccessRuleModel":{"required":["permissions","subjectType"],"type":"object","properties":{"subjectId":{"type":"string","description":"The identifier of the subject for which to grant the access rule"},"subjectType":{"type":"string","description":"The type of the subject","enum":["GUEST","EVERYONE","GROUP","USER"]},"permissions":{"uniqueItems":true,"type":"array","description":"The set of permissions","items":{"type":"string","description":"The set of permissions","enum":["SAVED_ITEM_NO_PERMISSIONS","SAVED_ITEM_READ_ITEM","SAVED_ITEM_WRITE_ITEM"]}},"autoGenerated":{"type":"boolean"}},"description":"API model for an access rule on a SavedItem"},"AccessRuleResource":{"required":["objectId","paths","permissions","subjectId","subjectType"],"type":"object","properties":{"identifier":{"type":"string","description":"The identifier of the access rule."},"objectId":{"type":"string","description":"The identifier of the object."},"paths":{"type":"array","description":"An array of paths towards the object.","items":{"type":"string","description":"An array of paths towards the object."}},"subjectId":{"type":"string","description":"The identifier of the subject."},"subjectType":{"type":"string","description":"The type of the subject: USER, GROUP, EVERYBODY, GUEST.","enum":["GUEST","EVERYONE","GROUP","USER"]},"permissions":{"uniqueItems":true,"type":"array","description":"A set of permissions the subject has on the specified object. Can be an empty set.","items":{"type":"string","description":"A set of permissions the subject has on the specified object. Can be an empty set.","enum":["SAVED_ITEM_NO_PERMISSIONS","SAVED_ITEM_READ_ITEM","SAVED_ITEM_WRITE_ITEM"]}},"userDetailsResource":{"$ref":"#/components/schemas/UserDetailsResource"},"_links":{"$ref":"#/components/schemas/Links"}},"description":"Represents an access rule definition"},"UserInformationModel":{"type":"object","properties":{"userUuid":{"type":"string","description":"The uuid of the owner of the new demo tag","example":"875ard025fd9f039015fd9f1de110000"}}},"ImportFailure":{"type":"object","properties":{"fileLocation":{"type":"string"},"typeOfFailure":{"type":"string"},"message":{"type":"string"},"itemIdentifier":{"type":"string"},"itemName":{"type":"string"},"itemType":{"type":"string"},"itemLocation":{"type":"array","items":{"type":"string"}}}},"ImportResult":{"type":"object","properties":{"identifier":{"type":"string","format":"uuid"},"inProgress":{"type":"boolean"},"startTime":{"type":"string"},"endTime":{"type":"string"},"severeFailure":{"$ref":"#/components/schemas/ImportFailure"},"totalOfItemsSuccessfullyImported":{"type":"integer","format":"int32"},"totalOfItemsFailedToImport":{"type":"integer","format":"int32"},"totalOfSkippedItems":{"type":"integer","format":"int32"},"totalOfReplacedItems":{"type":"integer","format":"int32"},"failureDetails":{"type":"array","items":{"$ref":"#/components/schemas/ImportFailure"}},"itemsSkipped":{"type":"array","items":{"type":"string"}},"itemsReplaced":{"type":"array","items":{"type":"string"}}}},"CollectionModelSavedItemTypeResource":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"savedItemTypeResourceList":{"type":"array","items":{"$ref":"#/components/schemas/SavedItemTypeResource"}}}},"_links":{"$ref":"#/components/schemas/Links"}}},"SavedItemTypeResource":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"category":{"type":"string"},"_links":{"$ref":"#/components/schemas/Links"}},"description":"Represents a SavedItemType definition"},"PageMetadata":{"type":"object","properties":{"size":{"type":"integer","format":"int64"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int64"},"number":{"type":"integer","format":"int64"}}},"PagedModelSavedItemResource":{"type":"object","properties":{"_embedded":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/SavedItemResource"}}}},"_links":{"$ref":"#/components/schemas/Links"},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"PermissionsResource":{"type":"object","properties":{"permissions":{"type":"array","description":"The list of permissions","items":{"type":"string","description":"The list of permissions"}},"_links":{"$ref":"#/components/schemas/Links"}},"description":"Describes a list of permissions"},"StreamingResponseBody":{"type":"object"},"DeletedItemsResource":{"type":"object","properties":{"identifiers":{"type":"array","description":"The identifiers of the deleted items","items":{"type":"string","description":"The identifiers of the deleted items"}},"_links":{"$ref":"#/components/schemas/Links"}},"description":"Object to describe the saved items that were deleted"},"Link":{"type":"object","properties":{"href":{"type":"string"},"hreflang":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"deprecation":{"type":"string"},"profile":{"type":"string"},"name":{"type":"string"},"templated":{"type":"boolean"}}}},"securitySchemes":{"bearerAuth":{"type":"http","name":"bearerAuth","scheme":"bearer","bearerFormat":"JWT"},"openIdConnect":{"type":"openIdConnect","name":"openIdConnect","scheme":"bearer","bearerFormat":"JWT","openIdConnectUrl":"https://tm-toggles-next.trendminer.net/auth/realms/trendminer/.well-known/openid-configuration"}}}}