openapi: 3.0.1 info: title: Cytoscape Service Based App REST API description: |+ This [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification) document defines the Cytoscape Service Based App REST Service API which is used by Cytoscape on the Web for service-based apps. This document and all references to the Cytoscape Service Based App REST API, source code and ancillary documentation are copyrighted: *© 2013-2024, The Regents of the University of California, The Cytoscape Consortium. All rights reserved.* Please abide with the [Terms of Use, Licensing and Sources](https://home.ndexbio.org/disclaimer-license/). Likewise, the [Swagger-UI](https://github.com/swagger-api/swagger-ui) document reader that displays this OpenAPI document is copyrighted by *Smartbear Software*. Its open-source software license is found [here](https://github.com/swagger-api/swagger-ui/blob/master/LICENSE). version: 0.1.0-SNAPSHOT servers: - url: /cytoserviceapp description: Cytoscape Service Based App REST API - url: "{Host}" description: | The host server URL can be overriden. variables: Host: default: /cytoserviceapp paths: /{id}: get: summary: Gets result of task description: |- NOTE: For incomplete/failed jobs only Status, message, progress, and walltime will be returned in JSON operationId: getResult parameters: - name: id in: path required: true schema: type: string responses: "200": description: Success content: application/json: schema: $ref: '#/components/schemas/CytoResult' "400": description: Task not found "500": description: Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' delete: summary: "Deletes task associated with {id} passed in" operationId: deleteRequest parameters: - name: id in: path required: true schema: type: string responses: "204": description: Delete request successfully received "400": description: Not found "500": description: Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /: get: summary: Gets meta data about this service/algorithm description: Provides detailed information about algorithm offered by this service operationId: getMetaData_1 responses: "200": description: Success content: application/json: schema: $ref: '#/components/schemas/Algorithm' "400": description: Task not found "500": description: Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' post: summary: Submits task description: "Payload in JSON format needs to have data along with name of algorithm\ \ to run and any algorithm specific parameters. Information about what algorithms\ \ are availableand what are the custom parameters can obtained by visiting\ \ the 'algorithms'endpoint \n\nThe service should upon post return 202 and\ \ set location to resource to poll for result. Which will\nMatch the URL of\ \ GET request below." operationId: request requestBody: description: Request as json content: application/json: schema: $ref: '#/components/schemas/CytoRequest' required: true responses: "202": description: | The task was successfully submitted to the service. Visit the URL specified in Location field in HEADERS to get status and resultsIn addition, the id(s) of the task(s) are returned as json headers: Location: description: URL containing resource generated by this request style: simple content: application/json: schema: $ref: '#/components/schemas/CytoRequestId' "400": description: Bad Request content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' "500": description: Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /{id}/status: get: summary: Gets status of task description: This lets caller get status without getting the full result back operationId: getRequestStatus parameters: - name: id in: path required: true schema: type: string responses: "200": description: Success content: application/json: schema: $ref: '#/components/schemas/CytoResultStatus' "400": description: Task not found "500": description: Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' /status: get: summary: Gets server status description: "Gets version, load, and diskusage of server" operationId: status responses: "200": description: Server Status content: application/json: schema: $ref: '#/components/schemas/ServerStatus' "500": description: Server Error content: application/json: schema: $ref: '#/components/schemas/ErrorResponse' components: schemas: ErrorResponse: type: object properties: errorCode: type: string description: Error code to help identify issue message: type: string description: Human readable description of error description: type: string description: More detailed description of error stackTrace: type: string description: Stack trace of error threadId: type: string description: Id of thread running process timeStamp: type: string description: UTC Time stamp in YYYY-MM-DD_HH:MM.S Algorithm: type: object properties: name: type: string description: Name of algorithm parameters: uniqueItems: true type: array description: Any custom parameters this algorithm accepts items: $ref: '#/components/schemas/AlgorithmParameter' version: type: string description: Version of algorithm cyWebActions: type: array description: List of action to be performed with result by caller. Elements of list can be one of the allowable values items: type: string description: List of action to be performed with result by caller. Elements of list can be one of the allowable values enum: - addNetworks - addTables - updateLayouts - updateNetwork - updateSelection - updateTables enum: - addNetworks - addTables - updateLayouts - updateNetwork - updateSelection - updateTables description: type: string description: Description of algorithm author: type: string description: Author(s) of this service citation: type: string description: Citation for this service cyWebMenuItem: $ref: '#/components/schemas/CyWebMenuItem' serviceInputDefinition: $ref: '#/components/schemas/ServiceInputDefinition' AlgorithmParameter: type: object properties: displayName: type: string description: Display name for parameter description: type: string description: Parameter description type: type: string description: Type of parameter enum: - text - dropDown - radio - checkBox - nodeColumn - edgeColumn - flag valueList: type: array description: Values to put into 'dropDown' type field items: type: string description: Values to put into 'dropDown' type field defaultValue: type: string description: Default value for parameter validationType: type: string description: Type of validation to perform enum: - number - digits - string validationHelp: type: string description: Text to display if validation fails validationRegex: type: string description: Regular expression that is applied to parametersof 'type' string columnTypeFilter: type: string description: "Only used for nodes/edges column type. If defined, Cytoscape\ \ Web uses it to filter what node/edge columns to display. If omitted,\ \ all columns will be listed" enum: - list - number - wholenumber - list_of_number - list_of_wholenumber - string - long - integer - double - boolean - list_of_string - list_of_long - list_of_integer - list_of_double - list_of_boolean minValue: type: number description: "If set and parameter is of type 'number' or 'digits', values\ \ below this should NOT be allowed" maxValue: type: number description: "If set and parameter is of type 'number' or 'digits', values\ \ above this should NOT be allowed" description: Parameter that can be passed to Algorithm Algorithms: type: object properties: algorithms: type: object additionalProperties: $ref: '#/components/schemas/Algorithm' description: List of algorithms description: Contains list of Algorithms offered by all services on this server CyWebMenuItem: type: object properties: root: type: string description: Top level menu to place this service example: Apps path: type: array description: Service menu path and name items: $ref: '#/components/schemas/CyWebMenuItemPath' description: Defines menu for service CyWebMenuItemPath: type: object properties: name: type: string description: Menu name example: My App gravity: type: integer description: "Sets menu gravity, higher values mean lower on menu" format: int32 example: 10 description: Menu or submenu item InputColumn: type: object properties: name: type: string description: The label text of the dropdown list. It will also be used as the column name in the generated data block. description: type: string description: A short description of the column. Used as a hint in the UI. columnName: type: string description: Name of the column that should be automatically included. No UI control will be generated for this column. Treated like a preselected value for name attribute. dataType: type: string description: "Data type of the attribute. When defined, Cytoscape Web uses\ \ it to filter the dropdown list. If omitted, the dropdown will contain\ \ all columns." enum: - list - number - wholenumber - list_of_number - list_of_wholenumber - string - long - integer - double - boolean - list_of_string - list_of_long - list_of_integer - list_of_double - list_of_boolean allowMultipleSelection: type: boolean description: "When set to true, all selected columns in the dropdown will\ \ be used to serialize the data, otherwise only one column can be selected" defaultColumnName: type: string description: "(Optional) The default selection in the column name dropdown.\ \ If the column specified in field doesn't exist in node or edge table,\ \ no selection will be make." description: List of columns that need to be created. For type of 'nodes' and 'edges' only. InputNetwork: type: object properties: format: type: string description: Denotes format of returned data. 'cx2' returns CX2 format. example: cx2 enum: - cx2 - edgelist model: type: string description: Denotes network content returned. 'network' denotes full network data and 'graph' denotes bare network (ids only) example: network enum: - network - graph description: Defines structure of data requested by service. For type of 'network' only. ServiceInputDefinition: type: object properties: type: type: string scope: type: string inputNetwork: $ref: '#/components/schemas/InputNetwork' inputColumns: type: array description: List of columns that need to be created. For type of 'nodes' and 'edges' only. items: $ref: '#/components/schemas/InputColumn' description: Defines data this algorithm expects to receive CytoResultStatus: type: object properties: id: type: string description: Id of Cytoscape Service Based App Request example: 261fb9b7-75af-4f1a-9caa-e57a4b5fc349 status: type: string description: "Status of task can be (submitted,processing,complete,failed)" example: submitted message: type: string description: null or a message denoting a possible issue progress: type: integer description: int between 0 and 100 denoting progress of task format: int32 wallTime: type: integer description: Walltime in milliseconds task took to run format: int64 startTime: type: integer description: Time in milliseconds since 1969 epoch when task started format: int64 CytoResult: type: object properties: id: type: string description: Id of Cytoscape Service Based App REST Request example: 261fb9b7-75af-4f1a-9caa-e57a4b5fc349 status: type: string description: "Status of task can be (submitted,processing,complete,failed)" example: submitted message: type: string description: null or a message denoting a possible issue progress: type: integer description: int between 0 and 100 denoting progress of task format: int32 wallTime: type: integer description: Walltime in milliseconds task took to run format: int64 startTime: type: integer description: Time in milliseconds since 1969 epoch when task started format: int64 result: $ref: '#/components/schemas/JsonNode' JsonNode: type: object description: data as json fragment CytoRequestId: type: object properties: id: type: string description: Id of Cytoscape Service Based App REST Request example: 261fb9b7-75af-4f1a-9caa-e57a4b5fc349 CytoRequest: type: object properties: algorithm: type: string description: Name of algorithm to run example: updatetablesexample data: $ref: '#/components/schemas/JsonNode' parameters: type: object additionalProperties: type: string description: "Optional parameters in simple map format arg: value" description: "Optional parameters in simple map format arg: value" ServerStatus: type: object properties: status: type: string description: Status of server enum: - ok - error pcDiskFull: type: integer description: Gets how full disk is as a percentage 0 - 100 format: int32 load: type: array description: "List of 3 floats containing 1 minute, 5 minute, 15minute load" items: type: number description: "List of 3 floats containing 1 minute, 5 minute, 15minute\ \ load" format: float queuedTasks: type: integer description: Gets number of currently queued/running tasks format: int32 completedTasks: type: integer description: Gets number of completed tasks since last restart of this service format: int32 canceledTasks: type: integer description: Gets number of canceled tasks since last restart of this service format: int32 version: type: string description: Gets version of this service