Skip to content

Latest commit

 

History

History
842 lines (610 loc) · 31.8 KB

File metadata and controls

842 lines (610 loc) · 31.8 KB

Configuration APIs

The configuration endpoint provides the following APIs to configure the Informatics Gateway.

GET /config/ae

Returns a list of MONAI Deploy SCP Application Entity Titles configured on the Informatics Gateway.

Parameters

N/A

Responses

Response Content Type: JSON - Array of MonaiApplicationEntity.

Code Description
200 AE Titles retrieved successfully.
404 AE Title not found.
409 Entity already exists with the same name or AE Title.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request GET 'http://localhost:5000/config/ae'

Example Response

[
  {
    "name": "brain-tumor",
    "aeTitle": "BrainTumorModel",
    "workflows": ["brain-tumor", "b75cd27a-068a-4f9c-b3da-e5d4ea08c55a"],
    "grouping": "0020,000D",
    "timeout": 5,
    "ignoredSopClasses": ["1.2.840.10008.5.1.4.1.1.1.1"],
    "allowedSopClasses": ["1.2.840.10008.5.1.4.1.1.1.2"],
    "pluginAssemblies": [
        "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginAddWorkflow, Monai.Deploy.InformaticsGateway.Test.Plugins",
        "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginModifyDicomFile, Monai.Deploy.InformaticsGateway.Test.Plugins"
    ]
  },
  {
    "name": "liver-seg",
    "aeTitle": "LIVERSEG",
    "grouping": "0020,000D",
    "timeout": 5,
    "workflows": []
  }
]

GET /config/ae/{name}

Returns the configuration of the specified MONAI SCP AE Title.

Parameters

Name Type Description
name string The name of the AE to be retrieved.

Responses

Response Content Type: JSON - MonaiApplicationEntity.

Code Description
200 Configuration retrieved successfully.
404 Named AE not found.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request GET 'http://localhost:5000/config/ae/brain-tumor'

Example Response

{
  "name": "brain-tumor",
  "aeTitle": "BrainTumorModel",
  "grouping": "0020,000D",
  "timeout": 5,
  "workflows": ["brain-tumor", "b75cd27a-068a-4f9c-b3da-e5d4ea08c55a"]
}

POST /config/ae

Creates a new MONAI SCP Application Entity to accept DICOM instances.

Note

The MONAI SCP AE Title must be unique.

Note

The DICOM tag used for grouping can be either a Study Instance UID (0020,000D) or Series Instance UID (0020,000E). The default is set to a Study Instance UID (0020,000D) if not specified.

Note

timeout is the number of seconds the AE Title will wait between each instance before assembling a payload and publishing a workflow request. We recommend calculating this value based on the network speed and the maximum size of each DICOM instance.

Parameters

See the MonaiApplicationEntity class definition for details.

Responses

Response Content Type: JSON - MonaiApplicationEntity.

Code Description
201 AE Title created successfully.
400 Validation error. The response will be a Problem details object with server error details.
409 Entity already exists with the same name or entity already exists with the same AE Title and port combination.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request POST 'http://localhost:5000/config/ae/' \
    --header 'Content-Type: application/json' \
    --data-raw '{
            "name": "breast-tumor",
            "aeTitle": "BREASTV1",
            "timeout": 5,
            "workflows": [
                "3f6a08a1-0dea-44e9-ab82-1ff1adf43a8e"
            ],
            "pluginAssemblies": [
                "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginAddWorkflow, Monai.Deploy.InformaticsGateway.Test.Plugins",
                "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginModifyDicomFile, Monai.Deploy.InformaticsGateway.Test.Plugins"
            ]
        }
    }'

Example Response

{
  "name": "breast-tumor",
  "aeTitle": "BREASTV1",
  "workflows": ["3f6a08a1-0dea-44e9-ab82-1ff1adf43a8e"],
  "pluginAssemblies": [
      "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginAddWorkflow, Monai.Deploy.InformaticsGateway.Test.Plugins",
      "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginModifyDicomFile, Monai.Deploy.InformaticsGateway.Test.Plugins"
  ]
}

PUT /config/ae

Updates an existing MONAI SCP Application Entity.

Note

The MONAI SCP AE Title cannot be changed.

Note

The DICOM tag used for grouping can be either a Study Instance UID (0020,000D) or Series Instance UID (0020,000E). The default is set to a Study Instance UID (0020,000D) if not specified.

Note

timeout is the number of seconds the AE Title will wait between each instance before assembling a payload and publishing a workflow request. We recommend calculating this value based on the network speed and the maximum size of each DICOM instance.

Parameters

See the MonaiApplicationEntity class definition for details.

Responses

Response Content Type: JSON - MonaiApplicationEntity.

Code Description
200 AE Title updated successfully.
400 Validation error. The response will be a Problem details object with server error details.
404 Named MONAI AE not found.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request PUT 'http://localhost:5000/config/ae/' \
    --header 'Content-Type: application/json' \
    --data-raw '{
            "name": "breast-tumor",
            "timeout": 3,
            "workflows": [
                "3f6a08a1-0dea-44e9-ab82-1ff1adf43a8e"
            ],
            "pluginAssemblies": [
                "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginAddWorkflow, Monai.Deploy.InformaticsGateway.Test.Plugins",
                "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginModifyDicomFile, Monai.Deploy.InformaticsGateway.Test.Plugins"
            ]
        }
    }'

Example Response

{
  "name": "breast-tumor",
  "aeTitle": "BREASTV1",
  "workflows": ["3f6a08a1-0dea-44e9-ab82-1ff1adf43a8e"],
  "pluginAssemblies": [
      "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginAddWorkflow, Monai.Deploy.InformaticsGateway.Test.Plugins",
      "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginModifyDicomFile, Monai.Deploy.InformaticsGateway.Test.Plugins"
  ],
  "timeout": 3
}

DELETE /config/ae/{name}

Deletes the specified MONAI SCP Application Entity.

Parameters

Name Type Description
name string The name of the AE Title to be deleted.

Responses

Response Content Type: JSON - MonaiApplicationEntity.

Code Description
200 AE Title deleted.
404 Named MONAI AE not found.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request DELETE 'http://localhost:5000/config/ae/breast-tumor'

Example Response

{
  "name": "breast-tumor",
  "aeTitle": "BREASTV1",
  "workflows": ["3f6a08a1-0dea-44e9-ab82-1ff1adf43a8e"]
}

GET /config/ae/plug-ins

Returns a list of data input plug-ins that can be used with the SCP Application Entity.

Parameters

N/A

Responses

Response Content Type: JSON - An object containing zero or more key-value pairs, where the key is the name of the plug-in and the value is the fully qualified assembly type name of the plug-in.

Code Description
200 Plug-ins retrieved successfully.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request GET 'http://localhost:5000/config/ae/plug-ins'

Example Response

{
 "testInputDataPluginAddWorkflow": "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginAddWorkflow, Monai.Deploy.InformaticsGateway.Test.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
 "testInputDataPluginResumeWorkflow": "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginResumeWorkflow, Monai.Deploy.InformaticsGateway.Test.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
 "testInputDataPluginModifyDicomFile": "Monai.Deploy.InformaticsGateway.Test.Plugins.TestInputDataPluginModifyDicomFile, Monai.Deploy.InformaticsGateway.Test.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
}

GET /config/source

Returns a list of calling (source) AE Titles configured on the Informatics Gateway.

Parameters

N/A

Responses

Response Content Type: JSON - Array of SourceApplicationEntity.

Code Description
200 AE Titles retrieved successfully.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request GET 'http://localhost:5000/config/source'

Example Response

[
  {
    "name": "USEAST",
    "aeTitle": "PACSUSEAST",
    "hostIp": "10.20.3.4"
  },
  {
    "name": "USWEST",
    "aeTitle": "PACSUSWEST",
    "hostIp": "10.50.3.4"
  }
]

GET /config/source/{name}

Returns configurations for the specified calling (source) AET.

Parameters

Name Type Description
name string The name of an AE Title to be retrieved.

Responses

Response Content Type: JSON - SourceApplicationEntity.

Code Description
200 AE Titles retrieved successfully.
404 Named source not found.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request GET 'http://localhost:5000/config/source/USEAST'

Example Response

{
  "name": "USEAST",
  "aeTitle": "PACSUSEAST",
  "hostIp": "10.20.3.4"
}

GET /config/source/aetitle/{aeTitle}

Returns configurations for the specified calling (source) AET.

Parameters

Name Type Description
name string The aeTitle of an AE Title to be retrieved.

Responses

Response Content Type: JSON - SourceApplicationEntity[].

Code Description
200 AE Titles retrieved successfully.
404 Named source not found.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request GET 'http://localhost:5000/config/source/aetitle/USEAST'

Example Response

[{
  "name": "USEAST",
  "aeTitle": "PACSUSEAST",
  "hostIp": "10.20.3.4"
},
{...}]

POST /config/source

Adds a new calling (source) AE Title to the Informatics Gateway to allow DICOM instances from the specified IP address and AE Title.

Parameters

See the SourceApplicationEntity class definition for details.

Responses

Response Content Type: JSON - SourceApplicationEntity.

Code Description
201 AE Title created successfully.
400 Validation error.
409 Entity already exists with the same name or entity already exists with the same AE Title, host/IP address and port combination.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request POST 'http://localhost:5000/config/source' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "name": "USEAST",
        "hostIp": "10.20.3.4",
        "aeTitle": "PACSUSEAST"
    }'

Example Response

{
  "name": "USEAST",
  "aeTitle": "PACSUSEAST",
  "hostIp": "10.20.3.4"
}

PUT /config/source

Updates an existing calling (source) AE Title.

Parameters

See the SourceApplicationEntity class definition for details.

Responses

Response Content Type: JSON - SourceApplicationEntity.

Code Description
200 AE Title updated successfully.
400 Validation error. The response will be a Problem details object with details of the validation errors .
404 DICOM source cannot be found.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request PUT 'http://localhost:5000/config/source' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "name": "USEAST",
        "hostIp": "10.20.3.4",
        "aeTitle": "PACSUSEAST"
    }'

Example Response

{
  "name": "USEAST",
  "aeTitle": "PACSUSEAST",
  "hostIp": "10.20.3.4"
}

DELETE /config/source/{name}

Deletes the specified calling (Source) AE Title to stop accepting requests from it.

Parameters

Name Type Description
name string The name of the AE Title to be deleted.

Responses

Response Content Type: JSON - SourceApplicationEntity.

Code Description
200 AE Title deleted.
404 Named source not found.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request DELETE 'http://localhost:5000/config/source/USEAST'

Example Response

{
  "name": "USEAST",
  "aeTitle": "PACSUSEAST",
  "hostIp": "10.20.3.4"
}

GET /config/destination

Returns a list of destination AE titles configured on the system.

Parameters

N/A

Responses

Response Content Type: JSON - Array of DestinationApplicationEntity.

Code Description
200 AE Titles retrieved successfully.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request GET 'http://localhost:5000/config/destination'

Example Response

[
  {
    "port": 104,
    "name": "USEAST",
    "aeTitle": "PACSUSEAST",
    "hostIp": "10.20.3.4"
  },
  {
    "port": 104,
    "name": "USWEST",
    "aeTitle": "PACSUSWEST",
    "hostIp": "10.50.3.4"
  }
]

GET /config/destination/{name}

Retrieves the destination AE Title with the specified name.

Parameters

Name Type Description
name string The name of theAE Title to be retrieved.

Responses

Response Content Type: JSON - DestinationApplicationEntity.

Code Description
200 AE Titles retrieved successfully.
404 AE Titles not found.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request GET 'http://localhost:5000/config/destination/USEAST'

Example Response

{
  "port": 104,
  "name": "USEAST",
  "aeTitle": "PACSUSEAST",
  "hostIp": "10.20.3.4"
}

GET /config/destination/cecho/{name}

Performs a DICOM C-Echo request to the named destination on behalf of MONAISCU.

Parameters

Name Type Description
name string The name of the AE Title to be deleted.

Responses

Code Description
200 C-ECHO performed successfully.
404 Named destination not found.
500 Server error. The response will be a Problem details object with server error details.
502 C-ECHO failure. The response will be a Problem details object with server error details.

Example Request

curl --location --request DELETE 'http://localhost:5000/config/destination/cecho/USEAST'

PUT /config/destination

Updates an existing DICOM destination.

Parameters

See the DestinationApplicationEntity class definition for details.

Responses

Response Content Type: JSON - DestinationApplicationEntity.

Code Description
200 DICOM destination updated successfully.
400 Validation error. The response will be a Problem details object with details of the validation errors .
404 DICOM destination cannot be found.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request PUT 'http://localhost:5000/config/destination' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "name": "USEAST",
        "hostIp": "10.20.3.4",
        "port": 104,
        "aeTitle": "PACSUSEAST"
    }'

Example Response

{
  "port": 104,
  "name": "USEAST",
  "aeTitle": "PACSUSEAST",
  "hostIp": "10.20.3.4"
}

POST /config/destination

Adds a new DICOM destination AET for exporting results to.

Parameters

See the DestinationApplicationEntity class definition for details.

Responses

Response Content Type: JSON - DestinationApplicationEntity.

Code Description
201 AE Title created successfully.
400 Validation error.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request POST 'http://localhost:5000/config/destination' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "name": "USEAST",
        "hostIp": "10.20.3.4",
        "port": 104,
        "aeTitle": "PACSUSEAST"
    }'

Example Response

{
  "port": 104,
  "name": "USEAST",
  "aeTitle": "PACSUSEAST",
  "hostIp": "10.20.3.4"
}

DELETE /config/destination/{name}

Deletes a Destination AE Title.

Parameters

Name Type Description
name string The name of the AE Title to be deleted.

Responses

Response Content Type: JSON - DestinationApplicationEntity.

Code Description
200 AE Title deleted.
404 Named destination not found.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request DELETE 'http://localhost:5000/config/destination/USEAST'

Example Response

{
  "port": 104,
  "name": "USEAST",
  "aeTitle": "PACSUSEAST",
  "hostIp": "10.20.3.4"
}

GET /config/destination/plug-ins

Returns a list of data output plug-ins that can be used with the SCP Application Entity.

Parameters

N/A

Responses

Response Content Type: JSON - An object containing zero or more key-value pairs, where the key is the name of the plug-in and the value is the fully qualified assembly type name of the plug-in.

Code Description
200 Plug-ins retrieved successfully.
500 Server error. The response will be a Problem details object with server error details.

Example Request

curl --location --request GET 'http://localhost:5000/config/destination/plug-ins'

Example Response

{
 "testOutputDataPluginAddMessage": "Monai.Deploy.InformaticsGateway.Test.Plugins.TestOutputDataPluginAddMessage, Monai.Deploy.InformaticsGateway.Test.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
 "testOutputDataPluginModifyDicomFile": "Monai.Deploy.InformaticsGateway.Test.Plugins.TestOutputDataPluginModifyDicomFile, Monai.Deploy.InformaticsGateway.Test.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
}