{"note":"OpenAPI conversion -- returning structured metadata","name":"slicebox-local","description":"Slicebox API","version":"2.0","base_url":"","endpoints":118,"raw":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Slicebox API\n@version 2.0\n@auth ApiKey token in path\n@endpoints 118\n@hint download_for_search\n@toc sources(1), destinations(1), system(2), import(6), metadata(26), images(13), anonymization(8), users(6), log(3), boxes(11), transactions(7), directorywatches(3), scps(3), scus(4), filtering(9), seriestypes(12), forwarding(3)\n\n@group sources\n@endpoint GET /sources\n@desc Returns a list of currently available data sources. Possible source types are user - data imported by an API call by a user, box - data received from a remote box, directory - data imported via a watched directory, import - data imported into slicebox using import sessions, or scp - data received from a PACS.\n@returns(200) currently available sources\n\n@endgroup\n\n@group destinations\n@endpoint GET /destinations\n@desc Returns a list of currently available destinations. Possible destinations are box - sending data to a remote box, and scu - sending data a receiving SCP.\n@returns(200) currently available destinations\n\n@endgroup\n\n@group system\n@endpoint POST /system/stop\n@desc stop and shut down slicebox\n@returns(200) shutdown message\n\n@endpoint GET /system/health\n@desc No-op route for checking whether the service is alive or not\n@returns(200) The service is up and running\n\n@endgroup\n\n@group import\n@endpoint GET /import/sessions\n@desc Returns a list of available import sessions.\n@optional {startindex: any # start index of returned slice of import sessions, count: any # size of returned slice of import sessions}\n@returns(200) available import sessions\n\n@endpoint POST /import/sessions\n@desc create a new import sessions\n@required {import session: map # The import session to create containing the user defined name of the session}\n@returns(201) the created import session\n\n@endpoint GET /import/sessions/{id}\n@desc Returns the import sessions with the supplied ID\n@required {id: any # ID of session}\n@returns(200) the import session with the supplied ID\n@errors {404: import session not found (invalid ID)}\n\n@endpoint DELETE /import/sessions/{id}\n@desc deletes the import session with the supplied ID\n@required {id: any # ID of import session to delete}\n@returns(204) import session deleted\n\n@endpoint POST /import/sessions/{id}/images\n@desc add a DICOM dataset to the import session with the supplied ID\n@required {id: any # ID of session, dataset: any # The dataset file}\n@returns(200) meta data for the imported dataset on the image level of the DICOM hierarchy. Status code 200 signifies that this image was already present in the slicebox database.\n@returns(201) meta data for the imported dataset on the image level of the DICOM hierarchy\n@errors {404: import session not found (invalid ID)}\n\n@endpoint GET /import/sessions/{id}/images\n@desc get the imported images corresponding to the import session with the supplied ID\n@required {id: any # ID of import session}\n@returns(200) images corresponding to the specified import session\n@errors {404: import session not found (invalid ID)}\n\n@endgroup\n\n@group metadata\n@endpoint GET /metadata/patients\n@desc Returns a list of metadata on the patient level of the DICOM hierarchy\n@optional {startindex: any # start index of returned slice of patients, count: any # size of returned slice of patients, orderby: any # patient property to order results by, orderascending: any # order result ascendingly if true, descendingly otherwise, filter: any # filter the results by matching substrings of patient properties against this value, sources: any # filter the results by matching on one or more underlying series sources. Examples of sources are user, box, directory or scp. The list of sources to filter results by must have the form TYPE1:ID1,TYPE2:ID2,...,TYPEN:IDN. For instance, the argument sources=box:1,user:5 shows results either sent from (slice)box with id 1 or uploaded by user with id 5., seriestypes: any # filter the results by matching on one or more underlying series types. The supplied list of series types must be a comma separated list of series type ids. For instance, the argument seriestypes=3,7,22 shows results including series assigned to either of the series types with ids 3, 7 and 22., seriestags: any # filter the results by matching on one or more underlying series tags. The supplied list of series tags must be a comma separated list of series tag ids. For instance, the argument seriestags=6,2,11 shows results including series with either of the series tags with ids 6, 2 and 11.}\n@returns(200) patients\n\n@endpoint POST /metadata/patients/query\n@desc submit a query for patients\n@required {query: map # parameters of patient query}\n@returns(200) patients\n\n@endpoint GET /metadata/patients/{id}\n@desc Return the patient with the supplied ID\n@required {id: any # ID of patient}\n@returns(200) patient response\n@errors {404: patient not found (invalid ID)}\n\n@endpoint GET /metadata/patients/{id}/images\n@desc Returns all images for the patient with the supplied patient ID\n@required {id: any # ID of patient}\n@optional {sources: any # filter the results by matching on one or more series sources. Examples of sources are user, box, directory or scp. The list of sources to filter results by must have the form TYPE1:ID1,TYPE2:ID2,...,TYPEN:IDN. For instance, the argument sources=box:1,user:5 shows results either sent from (slice)box with id 1 or uploaded by user with id 5., seriestypes: any # filter the results by matching on one or more series types. The supplied list of series types must be a comma separated list of series type ids. For instance, the argument seriestypes=3,7,22 shows series assigned to either of the series types with ids 3, 7 and 22., seriestags: any # filter the results by matching on one or more series tags. The supplied list of series tags must be a comma separated list of series tag ids. For instance, the argument seriestags=6,2,11 shows series with either of the series tags with ids 6, 2 and 11.}\n@returns(200) list of images\n\n@endpoint GET /metadata/studies\n@desc Returns a list of metadata on the study level of the DICOM hierarchy\n@required {patientid: any # reference to patient to list studies for}\n@optional {startindex: any # start index of returned slice of studies, count: any # size of returned slice of studies, sources: any # filter the results by matching on one or more underlying series sources. Examples of sources are user, box, directory or scp. The list of sources to filter results by must have the form TYPE1:ID1,TYPE2:ID2,...,TYPEN:IDN. For instance, the argument sources=box:1,user:5 shows results either sent from (slice)box with id 1 or uploaded by user with id 5., seriestypes: any # filter the results by matching on one or more underlying series types. The supplied list of series types must be a comma separated list of series type ids. For instance, the argument seriestypes=3,7,22 shows results including series assigned to either of the series types with ids 3, 7 and 22., seriestags: any # filter the results by matching on one or more underlying series tags. The supplied list of series tags must be a comma separated list of series tag ids. For instance, the argument seriestags=6,2,11 shows results including series with either of the series tags with ids 6, 2 and 11.}\n@returns(200) studies\n\n@endpoint POST /metadata/studies/query\n@desc submit a query for studies\n@required {query: map # parameters of study query}\n@returns(200) studies\n\n@endpoint GET /metadata/studies/{id}\n@desc Return the study with the supplied ID\n@required {id: any # ID of study}\n@returns(200) study response\n@errors {404: study not found (invalid ID)}\n\n@endpoint GET /metadata/studies/{id}/images\n@desc Returns all images for the study with the supplied study ID\n@required {id: any # ID of study}\n@optional {sources: any # filter the results by matching on one or more series sources. Examples of sources are user, box, directory or scp. The list of sources to filter results by must have the form TYPE1:ID1,TYPE2:ID2,...,TYPEN:IDN. For instance, the argument sources=box:1,user:5 shows results either sent from (slice)box with id 1 or uploaded by user with id 5., seriestypes: any # filter the results by matching on one or more series types. The supplied list of series types must be a comma separated list of series type ids. For instance, the argument seriestypes=3,7,22 shows series assigned to either of the series types with ids 3, 7 and 22., seriestags: any # filter the results by matching on one or more series tags. The supplied list of series tags must be a comma separated list of series tag ids. For instance, the argument seriestags=6,2,11 shows series with either of the series tags with ids 6, 2 and 11.}\n@returns(200) list of images\n@errors {404: study not found (invalid ID)}\n\n@endpoint GET /metadata/series\n@desc Returns a list of metadata on the series level of the DICOM hierarchy\n@required {studyid: any # reference to study to list series for}\n@optional {startindex: any # start index of returned slice of series, count: any # size of returned slice of series, sources: any # filter the results by matching on one or more series sources. Examples of sources are user, box, directory or scp. The list of sources to filter results by must have the form TYPE1:ID1,TYPE2:ID2,...,TYPEN:IDN. For instance, the argument sources=box:1,user:5 shows results either sent from (slice)box with id 1 or uploaded by user with id 5., seriestypes: any # filter the results by matching on one or more series types. The supplied list of series types must be a comma separated list of series type ids. For instance, the argument seriestypes=3,7,22 shows series assigned to either of the series types with ids 3, 7 and 22., seriestags: any # filter the results by matching on one or more series tags. The supplied list of series tags must be a comma separated list of series tag ids. For instance, the argument seriestags=6,2,11 shows series with either of the series tags with ids 6, 2 and 11.}\n@returns(200) series\n\n@endpoint POST /metadata/series/query\n@desc submit a query for series\n@required {query: map # parameters of series query}\n@returns(200) series\n\n@endpoint GET /metadata/series/{id}\n@desc Return the series with the supplied ID\n@required {id: any # ID of series}\n@returns(200) series response\n@errors {404: series not found (invalid ID)}\n\n@endpoint GET /metadata/series/{id}/source\n@desc Return the source of the series with the supplied ID\n@required {id: any # ID of series}\n@returns(200) source for series\n@errors {404: series not found (invalid ID)}\n\n@endpoint GET /metadata/series/{id}/seriestypes\n@desc get the list of series types for the series with the supplied ID.\n@required {id: any # ID of series}\n@returns(200) the list of series types\n@errors {404: series not found (invalid ID)}\n\n@endpoint DELETE /metadata/series/{id}/seriestypes\n@desc Delete all series types for the series with the supplied ID\n@required {id: any # ID of series}\n@returns(204) series types deleted\n\n@endpoint PUT /metadata/series/{seriesId}/seriestypes/{seriesTypeId}\n@desc Add the series type with the supplied series type ID to the series with the supplied series ID\n@required {seriesId: any # ID of series, seriesTypeId: any # ID of series type to add}\n@returns(204) series type added\n@errors {404: no series or series type found for the supplied ID(s)}\n\n@endpoint DELETE /metadata/series/{seriesId}/seriestypes/{seriesTypeId}\n@desc Delete the series type with the supplied series type ID from the series with the supplied series ID\n@required {seriesId: any # ID of series, seriesTypeId: any # ID of series type to remove}\n@returns(204) series type removed\n\n@endpoint GET /metadata/series/{id}/seriestags\n@desc get the list of series tags for the series with the supplied ID.\n@required {id: any # ID of series}\n@returns(200) the list of series tags\n@errors {404: series not found (invalid ID)}\n\n@endpoint POST /metadata/series/{id}/seriestags\n@desc add a series tag to the series with the supplied ID\n@required {id: any # ID of series, query: map # series tag to add}\n@returns(201) added series tag\n@errors {404: if no series with the supplied ID exists}\n\n@endpoint DELETE /metadata/series/{seriesId}/seriestags/{seriesTagId}\n@desc Delete the series tag with the supplied series tag ID from the series with the supplied series ID\n@required {seriesId: any # ID of series, seriesTagId: any # ID of series tag to remove}\n@returns(204) series tag removed\n\n@endpoint GET /metadata/seriestags\n@desc Returns a list of series tags currently currently in use.\n@returns(200) a list of unique series tags currently used to tag series\n\n@endpoint GET /metadata/images\n@desc Returns a list of metadata on the image level of the DICOM hierarchy\n@required {seriesid: any # reference to series to list images for}\n@optional {startindex: any # start index of returned slice of images, count: any # size of returned slice of images}\n@returns(200) images\n\n@endpoint POST /metadata/images/query\n@desc submit a query for images\n@required {query: map # parameters of images query}\n@returns(200) images\n\n@endpoint GET /metadata/images/{id}\n@desc Return the image with the supplied ID\n@required {id: any # ID of image}\n@returns(200) image response\n@errors {404: image not found (invalid ID)}\n\n@endpoint GET /metadata/flatseries\n@desc Returns a list of flattened metadata on the patient, study and series levels\n@optional {startindex: any # start index of returned slice of flat series, count: any # size of returned slice of flat series, orderby: any # flat series property to order results by, orderascending: any # order result ascendingly if true, descendingly otherwise, filter: any # filter the results by matching substrings of flat series properties against this value, sources: any # filter the results by matching on one or more series sources. Examples of sources are user, box, directory or scp. The list of sources to filter results by must have the form TYPE1:ID1,TYPE2:ID2,...,TYPEN:IDN. For instance, the argument sources=box:1,user:5 shows results either sent from (slice)box with id 1 or uploaded by user with id 5., seriestypes: any # filter the results by matching on one or more series types. The supplied list of series types must be a comma separated list of series type ids. For instance, the argument seriestypes=3,7,22 shows series assigned to either of the series types with ids 3, 7 and 22., seriestags: any # filter the results by matching on one or more series tags. The supplied list of series tags must be a comma separated list of series tag ids. For instance, the argument seriestags=6,2,11 shows series with either of the series tags with ids 6, 2 and 11.}\n@returns(200) flat series\n\n@endpoint GET /metadata/flatseries/{id}\n@desc Return the flat series with the supplied ID\n@required {id: any # ID of flat series}\n@returns(200) flat series response\n@errors {404: flat series not found (invalid ID)}\n\n@endpoint POST /metadata/flatseries/query\n@desc submit a query for flat series\n@required {query: map # parameters of flat series query}\n@returns(200) flat series\n\n@endgroup\n\n@group images\n@endpoint POST /images\n@desc add a DICOM dataset to slicebox\n@required {dataset: any # The dataset file}\n@returns(200) meta data for added dataset on the image level of the DICOM hierarchy. Status code 200 signifies that this image was already present in the slicebox database.\n@returns(201) meta data for added dataset on the image level of the DICOM hierarchy\n\n@endpoint POST /images/jpeg\n@desc add a JPEG image to slicebox. The image data will be wrapped in a DICOM file and added as a new series belonging to the study with the supplied ID\n@required {studyid: any # ID of study to add new series to, jpeg bytes: any # The jpeg image data}\n@optional {description: any # DICOM series description of the resulting secondary capture series}\n@returns(201) meta data for added dataset on the image level of the DICOM hierarchy\n\n@endpoint GET /images/{id}\n@desc fetch dataset corresponding to the supplied image ID\n@required {id: any # ID of image}\n@returns(200) binary data of dataset\n@errors {404: if no image was found for the supplied image ID}\n\n@endpoint DELETE /images/{id}\n@desc Delete the image with the supplied ID\n@required {id: any # ID of image}\n@returns(204) image deleted\n\n@endpoint POST /images/delete\n@desc bulk delete a sequence of images according to the supplied image IDs. This is the same as a sequence of DELETE requests to /images/{id}\n@required {image IDs: [int(int64)] # IDs of images to delete}\n@returns(204) Images deleted\n\n@endpoint GET /images/{id}/attributes\n@desc list all DICOM attributes of the dataset corresponding to the supplied image ID\n@required {id: any # ID of image}\n@returns(200) list of DICOM attributes\n@errors {404: if no image was found for the supplied image ID}\n\n@endpoint GET /images/{id}/imageinformation\n@desc get basic information about the pixel data of an image\n@required {id: any # ID of image}\n@returns(200) basic information about the pixeldata of an image\n@errors {404: if no image was found for the supplied image ID}\n\n@endpoint GET /images/{id}/png\n@desc get a PNG image representation of the image corresponding to the supplied ID\n@required {id: any # ID of image}\n@optional {framenumber: any # frame/slice to show, windowmin: any # intensity window minimum value. If not specified or set to zero, windowing will be selected from relevant DICOM attributes, windowmax: any # intensity window maximum value. If not specified or set to zero, windowing will be selected from relevant DICOM attributes, imageheight: any # height of PNG image. If not specified or set to zero, the image height will equal that of the data}\n@returns(200) image data\n@errors {404: if no image was found for the supplied image ID, 501: if the system is not capable of creating an image representation of the data}\n\n@endpoint PUT /images/{id}/modify\n@desc modify and/or insert image attributes according to the input tagpath-value mappings\n@required {id: any # ID of image to modify, tag path value mappings: [map] # specification of tag paths and corresponding values to insert or modify}\n@returns(201) image attributes successfully modified\n\n@endpoint PUT /images/{id}/anonymize\n@desc delete the selected image and replace it with an anonymized version\n@required {id: any # ID of image to anonymize, tag values: map # specification of values for anonymous DICOM attributes}\n@returns(200) the newly created anonymous image\n@errors {404: image or corresponding dataset not found}\n\n@endpoint POST /images/{id}/anonymized\n@desc get an anonymized version of the image with the supplied ID\n@required {id: any # ID of image for which to get anonymized dataset, tag values: map # specification of values for anonymous DICOM attributes}\n@returns(200) binary data of anonymized dataset\n@errors {404: if no image was found for the supplied image ID}\n\n@endpoint POST /images/export\n@desc create an export set, a group of image IDs of images to export. The export set will contain the selected images. The export set is available for download 12 hours before it is automatically deleted.\n@required {image ids: [int(int64)] # ids of images to export}\n@returns(200) ID of created export set. To be used with the associated GET method for downloading.\n@returns(201) if the supplied list of image ids is empty or no if images could be found\n\n@endpoint GET /images/export\n@desc download the export set with the supplied export set ID as a zip archive\n@required {id: any # ID of export set to download}\n@returns(200) zip archive of images\n\n@endgroup\n\n@group anonymization\n@endpoint POST /anonymization/anonymize\n@desc anonymize the images corresponding to the supplied list of image IDs (each paired with a list of DICOM tag translation). This route corresponds to repeated use of the route /images/{id}/anonymize.\n@required {query: [map] # parameters of anonymization key query}\n@returns(200) the list of newly created anonymous images\n\n@endpoint GET /anonymization/keys\n@desc get a list of anonymization keys, each specifying how vital DICOM attributes have been anonymized for a particular image\n@optional {startindex: any # start index of returned slice of anonymization keys, count: any # size of returned slice of anonymization keys, orderby: any # property to order results by, orderascending: any # order result ascendingly if true, descendingly otherwise, filter: any # filter the results by matching substrings of properties against this value}\n@returns(200) anonymization keys, one per DICOM image\n\n@endpoint GET /anonymization/keys/{id}\n@desc get the anonymization key with the supplied ID\n@required {id: any # ID of anonymization key}\n@returns(200) anonymization key for the supplied ID\n@errors {404: if no anonymization key could be found for the supplied ID}\n\n@endpoint DELETE /anonymization/keys/{id}\n@desc delete an anonymization key that is no longer of interest\n@required {id: any # ID of anonymization key}\n@returns(204) anonymization key deleted\n\n@endpoint GET /anonymization/keys/{id}/keyvalues\n@desc get pointers to the images corresponding to the anonymization key with the supplied ID\n@required {id: any # ID of anonymization key}\n@returns(200) an array of anonymization key-value pairs corresponding to the anonymization key for the supplied ID\n@errors {404: if no anonymization key could be found for the supplied ID}\n\n@endpoint POST /anonymization/keys/query\n@desc submit a query for anonymization keys\n@required {query: map # parameters of anonymization key query}\n@returns(200) anonymization keys\n\n@endpoint GET /anonymization/options\n@desc list all supported anonymization options defining an anonymization profile\n@returns(200) supported anonymization options\n\n@endpoint GET /anonymization/keys/export/csv\n@desc export all anonymization keys as a csv file\n@returns(200) all anonymization keys as a csv file\n\n@endgroup\n\n@group users\n@endpoint POST /users/login\n@desc Obtain a session cookie that can be used to authenticate future API calls from the present IP address and with the present user agent.\n@required {UserPass: map # username and password for user logging in}\n@returns(201) if the supplied credentials are valid. The response headers will contain Set-Cookie.\n@errors {401: if the supplied credentials are invalid.}\n\n@endpoint POST /users/logout\n@desc Logout the current user by responding with a delete cookie header removing the session cookie for this user.\n@returns(201) the user was logged out\n\n@endpoint GET /users/current\n@desc obtain information on the currently logged in user as specified by the supplied session cookie, IP address and user agent.\n@returns(200) user information\n@errors {404: no user found for the supplied session cookie, IP address and user agent, or if any of the required headers are missing.}\n\n@endpoint GET /users\n@desc Returns all users of slicebox\n@optional {startindex: any # start index of returned slice of users, count: any # size of returned slice of users}\n@returns(200) user response\n\n@endpoint POST /users\n@desc Creates a new user. Dupicates are accepted but not added.\n@required {user: map # User to add}\n@returns(201) user response\n\n@endpoint DELETE /users/{id}\n@desc deletes a single user based on the ID supplied\n@required {id: any # ID of user to delete}\n@returns(204) user deleted\n\n@endgroup\n\n@group log\n@endpoint GET /log\n@desc get a list of slicebox log messages\n@optional {startindex: any # start index of returned slice of log messages, count: any # size of returned slice of log messages, subject: any # log subject to filter results by, type: any # log type (DEFAULT, INFO, WARN, ERROR) to filter results by}\n@returns(200) log messages\n\n@endpoint DELETE /log\n@desc delete all log messages\n@returns(204) log messages successfully\n\n@endpoint DELETE /log/{id}\n@desc Delete the log entry with the supplied ID\n@required {id: any # ID of log entry}\n@returns(204) log entry deleted\n\n@endgroup\n\n@group boxes\n@endpoint GET /boxes\n@desc get a list of box connections\n@optional {startindex: any # start index of returned slice of boxes, count: any # size of returned slice of boxes}\n@returns(200) box connections\n\n@endpoint POST /boxes/createconnection\n@desc create a new box connection where the supplied entity holds the remote box name. Used by publicly available boxes.\n@required {remoteBoxConnectionData: map # name of box to connect (and send URL) to}\n@returns(201) remote box of the connection\n\n@endpoint POST /boxes/connect\n@desc connect to another box using a received URL. Used to connect to a public box.\n@required {remoteBox: map # remote box to connect with}\n@returns(201) connected box\n\n@endpoint DELETE /boxes/{id}\n@desc Delete the remote box with the supplied ID\n@required {id: any # ID of box to remove}\n@returns(204) box deleted\n\n@endpoint POST /boxes/{id}/send\n@desc send images corresponding to the supplied image ids to the remote box with the supplied ID\n@required {id: any # ID of box to send images to, sequence of image tag values: map # specification of which images to send and list of DICOM attribute values to use in anonymized datasets}\n@returns(201) images sent\n@errors {404: box not found (invalid ID)}\n\n@endpoint GET /boxes/incoming\n@desc get incoming transactions (finished, currently receiving, waiting or failed)\n@optional {startindex: any # start index of returned slice of transactions, count: any # size of returned slice of transactions}\n@returns(200) incoming transactions, sorted from most to least recently updated\n\n@endpoint DELETE /boxes/incoming/{id}\n@desc delete an incoming transaction. If a currently active transaction is deleted, a new transaction with the remainder of the images is created when receiving the next incoming image.\n@required {id: any # ID of incoming transaction}\n@returns(204) incoming transaction deleted\n\n@endpoint GET /boxes/incoming/{id}/images\n@desc get the received images corresponding to the incoming transaction with the supplied ID\n@required {id: any # ID of incoming transaction}\n@returns(200) images received corresponding to the specified incoming transaction\n@errors {404: incoming transaction not found (invalid ID)}\n\n@endpoint GET /boxes/outgoing\n@desc get outgoing transactions (finished, currently sending, waiting or failed)\n@optional {startindex: any # start index of returned slice of transactions, count: any # size of returned slice of transactions}\n@returns(200) outgoing transactions, finished, sending, waiting or failed\n\n@endpoint DELETE /boxes/outgoing/{id}\n@desc delete an outgoing transaction. This will stop ongoing transactions.\n@required {id: any # ID of outgoing transaction}\n@returns(204) outgoing transaction deleted\n\n@endpoint GET /boxes/outgoing/{id}/images\n@desc get the sent images corresponding to the outgoing transaction with the supplied ID\n@required {id: any # ID of outgoing transaction}\n@returns(200) images sent corresponding to the specified outgoing transaction\n@errors {404: outgoing transaction not found (invalid ID)}\n\n@endgroup\n\n@group transactions\n@endpoint POST /transactions/{token}/image\n@desc add an image (dataset) as part of a transaction. This method is used when sending images using the push method to a public slicebox.\n@required {token: any # authentication token identifying the current box-to-box connection, transactionid: any # the ID of the client's outgoing transaction, sequencenumber: any # the index of this image in the transaction, totalimagecount: any # the total number of images in this transaction, dataset: any # the dataset byte array}\n@returns(204) image data received\n@errors {401: unauthorized, invalid token}\n\n@endpoint GET /transactions/{token}/status\n@desc get the status of the remote incoming transaction with the supplied transaction ID\n@required {token: any # authentication token identifying the current box-to-box connection, transactionid: any # the ID of the client's outgoing transaction}\n@returns(200) string representation of the transaction status (FINISHED, FAILED, WAITING or PROCESSING)\n@errors {401: unauthorized, invalid token, 404: no transaction found for the supplied transaction ID and box token}\n\n@endpoint PUT /transactions/{token}/status\n@desc update the status of the transaction with the supplied ID\n@required {token: any # authentication token identifying the current box-to-box connection, transactionid: any # the ID of the client's outgoing transaction, transaction status: str # the updated status of the transaction}\n@returns(204) status update successfully applied to transaction\n@errors {404: no transaction found for the supplied transaction ID and box token}\n\n@endpoint GET /transactions/{token}/outgoing/poll\n@desc get next outgoing transaction and image (information on the next image that the connected box wishes to send to you), if any. This method is used when sending images using the poll method from a public slicebox.\n@required {token: any # authentication token identifying the current box-to-box connection}\n@returns(200) next outgoing transaction and image information block\n@errors {401: unauthorized, invalid token, 404: there are currently no outgoing transactions to fetch for the box connection with the supplied token}\n\n@endpoint GET /transactions/{token}/outgoing\n@desc fetch an image from the connected box as part of a transaction. This method is used when sending images using the poll method from a public slicebox.\n@required {token: any # authentication token identifying the current box-to-box connection, transactionid: any # the ID of the outgoing transaction, imageid: any # the ID of the outgoing transaction image}\n@returns(200) binary data of dataset\n@errors {401: unauthorized, invalid token, 404: no outgoing trensaction and/or image found for the supplied transaction id and transaction image id}\n\n@endpoint POST /transactions/{token}/outgoing/done\n@desc signal that the supplied outgoing transaction and image was successfully received and can be marked as sent. This method is used when sending images using the poll method from a public slicebox.\n@required {token: any # authentication token identifying the current box-to-box connection, outgoing entry and image information block: map # outgoing transaction and image that has been successfully received}\n@returns(204) done message received\n@errors {401: unauthorized, invalid token}\n\n@endpoint POST /transactions/{token}/outgoing/failed\n@desc signal that the image corresponding to the supplied outgoing transaction and image could not be read or stored properly on the receiving side, and that the transaction should be marked as failed.\n@required {token: any # authentication token identifying the current box-to-box connection, outgoing transaction and image, and error message: map # the outgoing transaction and image information block corresponding to the failed image transfer, along with the associated error message}\n@returns(204) failed message received\n@errors {401: unauthorized, invalid token}\n\n@endgroup\n\n@group directorywatches\n@endpoint GET /directorywatches\n@desc get a list of watch directories. Each watch directory and its sub-directories are watched for incoming DICOM files, which are read and imported into slicebox.\n@optional {startindex: any # start index of returned slice of watched directories, count: any # size of returned slice of watched directories}\n@returns(200) the list of watched directories\n\n@endpoint POST /directorywatches\n@desc add a new directory to watch for incoming DICOM files\n@optional {watchedDirectory: map # directory to setup a watch for. The ID property is irrelevant, the ID of the inserted record is present in the returned data.}\n@returns(201) the directory now being watched\n\n@endpoint DELETE /directorywatches/{id}\n@desc stop watching and remove the directory corresponding to the supplied ID\n@required {id: any # id of directory to stop watching}\n@returns(204) directory watch removed\n\n@endgroup\n\n@group scps\n@endpoint GET /scps\n@desc get a list of DICOM SCPs. Each SCP is a server for receiving DICOM images from e.g. a PACS system.\n@optional {startindex: any # start index of returned slice of SCPs, count: any # size of returned slice of SCPs}\n@returns(200) the list of SCPs\n\n@endpoint POST /scps\n@desc add a new SCP for receiving DICOM images\n@optional {scp: map # SCP information. The ID property is irrelevant, the ID of the inserted record is present in the returned data.}\n@returns(201) the created SCP\n@errors {400: Invalid port number or AE title}\n\n@endpoint DELETE /scps/{id}\n@desc shut down and remove the SCP corresponding to the supplied ID\n@required {id: any # id of SCP to remove}\n@returns(204) SCP removed\n\n@endgroup\n\n@group scus\n@endpoint GET /scus\n@desc get a list of DICOM SCUs. Each SCU is a client for sending DICOM images to an SCP, e.g. a PACS system.\n@optional {startindex: any # start index of returned slice of SCUs, count: any # size of returned slice of SCUs}\n@returns(200) the list of SCUs\n\n@endpoint POST /scus\n@desc add a new SCU for sending DICOM images\n@optional {scu: map # SCU information. The ID property is irrelevant, the ID of the inserted record is present in the returned data.}\n@returns(201) the created SCU\n@errors {400: Invalid port number or AE title}\n\n@endpoint DELETE /scus/{id}\n@desc remove the SCU corresponding to the supplied ID\n@required {id: any # id of SCU to remove}\n@returns(204) SCU removed\n\n@endpoint POST /scus/{id}/send\n@desc send the images with the supplied image IDs to a DICOM SCP using the the SCU with the supplied scu ID\n@required {id: any # id of SCU to use for sending, imageids: [int(int64)] # array of ids of images to send}\n@returns(204) Series sent\n@errors {404: Series not found or SCU not found, 502: Receiving SCP host not available}\n\n@endgroup\n\n@group filtering\n@endpoint GET /filtering/filters\n@desc List defined filters\n@optional {startindex: any # start index of returned slice of filters, count: any # size of returned slice of filters}\n@returns(200) the list of filters\n\n@endpoint POST /filtering/filters\n@desc Inserts or updates a filter. If a filter with same name as supplied filter exists this filter is updated, otherwise a new filter is inserted.\n@required {tagFilter: map # Filter}\n@returns(201) Filter upserted\n\n@endpoint DELETE /filtering/filters/{id}\n@desc remove the filter corresponding to the supplied ID\n@required {id: any # id of filter to remove}\n@returns(204) Filter removed\n\n@endpoint GET /filtering/filters/{id}/tagpaths\n@desc List tagpaths for the selected filter\n@required {id: any # id of filter}\n@returns(200) the list of tagpaths\n\n@endpoint POST /filtering/filters/{id}/tagpaths\n@desc add a tagpath to a filter\n@required {id: any # id of filter to remove, tagpath: map # id of filter to remove}\n@returns(201) TagPath added\n\n@endpoint DELETE /filtering/filters/{id}/tagpaths/{tagpathid}\n@desc remove the tagpath corresponding to the supplied ID\n@required {id: any # id of filter, tagpathid: any # id of TagPath to remove}\n@returns(204) TagPath removed\n\n@endpoint GET /filtering/associations\n@desc Get a list of source to filter associations.\n@optional {startindex: any # start index of returned slice of source  filter associations, count: any # size of returned slice of source  filter associations}\n@returns(200) the list of source  filter associations\n\n@endpoint POST /filtering/associations\n@desc Inserts or updates a source  filter associations. If the specified Source already  has an association this is updated, otherwise a new is inserted.\n@required {sourcetagfilter: map # Source to Filter association}\n@returns(201) Upserted source  filter association\n\n@endpoint DELETE /filtering/associations/{id}\n@desc remove the source  filter association corresponding to the supplied ID\n@required {id: any # id of source  filter association to remove}\n@returns(204) source  filter association removed\n\n@endgroup\n\n@group seriestypes\n@endpoint GET /seriestypes\n@desc get a list of all added series types. By filtering search results for certain series types, it is easier for applications to ensure that they read images of applicable types.\n@optional {startindex: any # start index of returned slice of series types, count: any # size of returned slice of series types}\n@returns(200) the list of series types\n\n@endpoint POST /seriestypes\n@desc add a new series type\n@optional {SeriesType: map # Series type information. The ID property is irrelevant, the ID of the inserted record is present in the returned data.}\n@returns(201) the created series type\n\n@endpoint PUT /seriestypes/{id}\n@desc request an asynchronous update of all series, labelling appropriate series with the series type corresponding to the supplied ID.\n@required {id: any # id of series type to update series labels for}\n@returns(204) update successfully added to queue of series type updates\n\n@endpoint DELETE /seriestypes/{id}\n@desc remove the series type corresponding to the supplied ID\n@required {id: any # id of series type to remove}\n@returns(204) series type removed\n\n@endpoint POST /seriestypes/series/query\n@desc submit a query for seriestypes for a list of series\n@required {query: map # parameters of series query}\n@returns(200) series\n\n@endpoint GET /seriestypes/rules\n@desc get a list of rules for assigning series types to series. A rule connects to a series of attributes with values and a resulting series type. If a series has the required values of the listed attributes, it is assigned to the series type of the rule.\n@required {seriestypeid: any # ID of series type to list rules for}\n@returns(200) the list of series type rules for the series type with the supplied ID\n\n@endpoint POST /seriestypes/rules\n@desc add a new series type rule\n@optional {SeriesTypeRule: map # Series type rule information. The ID property is irrelevant, the ID of the inserted record is present in the returned data.}\n@returns(201) the created series type rule\n\n@endpoint GET /seriestypes/rules/updatestatus\n@desc get the status of the internal process of updating series types for series following a change of series types, rules or attributes.\n@returns(200) a status message, indicating if an update is running\n\n@endpoint DELETE /seriestypes/rules/{id}\n@desc remove the series type rule corresponding to the supplied ID\n@required {id: any # id of series type rule to remove}\n@returns(204) series type rule removed\n\n@endpoint GET /seriestypes/rules/{id}/attributes\n@desc get the list of attributes for the series type rule with the supplied ID.\n@required {id: any # index of series type rule to list rule attributes for}\n@returns(200) the list of series type rule attributes for the series type rule with the supplied ID\n\n@endpoint POST /seriestypes/rules/{id}/attributes\n@desc add a new series type rule attribute\n@required {id: any # ID of rule}\n@optional {SeriesTypeRuleAttribute: map # Series type rule attribute information. The ID property is irrelevant, the ID of the inserted record is present in the returned data.}\n@returns(201) the created series type rule attribute\n\n@endpoint DELETE /seriestypes/rules/{ruleId}/attributes/{attributeId}\n@desc remove the series type rule attribute corresponding to the supplied series type and attribute IDs\n@required {ruleId: any # id of series type rule for which to remove an attribute, attributeId: any # id of attribute to remove}\n@returns(204) series type rule attribute removed\n\n@endgroup\n\n@group forwarding\n@endpoint GET /forwarding/rules\n@desc get a list of all forwarding rules. A forwarding rule specifies the automatic forwarding of images from a source (SCP, BOX, etc.) to a destimation (BOX, SCU, etc.)\n@optional {startindex: any # start index of returned slice of rules, count: any # size of returned slice of rules}\n@returns(200) the list of forwarding rules\n\n@endpoint POST /forwarding/rules\n@desc add a new forwarding rule\n@optional {FowardingRule: map # The forwarding rule to add. The ID property is irrelevant, the ID of the inserted record is present in the returned data.}\n@returns(201) the created forwarding rule\n\n@endpoint DELETE /forwarding/rule/{id}\n@desc remove the forwarding rule corresponding to the supplied ID\n@required {id: any # id of forwarding rule to remove}\n@returns(204) forwarding rule removed\n\n@endgroup\n\n@end\n"}