{
  "openapi": "3.2.0",
  "info": {
    "description": "Capture API provides a RESTful method for ingesting and deleting data from the IKG.",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "title": "Capture REST API",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://eu.api.indykite.com/capture/v1"
    },
    {
      "url": "https://us.api.indykite.com/capture/v1"
    }
  ],
  "security": [
    {
      "APIKey": []
    }
  ],
  "tags": [
    {
      "description": "Capture REST API represents the service interface for data capture.",
      "name": "Capture"
    }
  ],
  "paths": {
    "/nodes/": {
      "post": {
        "description": "Batch upsert nodes",
        "operationId": "UpsertNodes",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/capture.UpsertNodesRequest"
              }
            }
          },
          "description": "Request Body",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/capture.BatchResults"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "errors": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/restapi.DetailedError"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Batch node upsert endpoint",
        "tags": [
          "Capture"
        ]
      }
    },
    "/nodes/delete": {
      "post": {
        "description": "Batch delete nodes",
        "operationId": "DeleteNodes",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/capture.DeleteNodesRequest"
              }
            }
          },
          "description": "Request Body",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/capture.BatchResults"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "errors": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/restapi.DetailedError"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Batch node delete endpoint",
        "tags": [
          "Capture"
        ]
      }
    },
    "/nodes/properties/delete": {
      "post": {
        "description": "Batch delete node properties",
        "operationId": "DeleteNodeProperties",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/capture.DeleteNodePropertiesRequest"
              }
            }
          },
          "description": "Request Body",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/capture.BatchResults"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "errors": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/restapi.DetailedError"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Batch node properties delete endpoint",
        "tags": [
          "Capture"
        ]
      }
    },
    "/nodes/properties/metadata/delete": {
      "post": {
        "description": "Batch delete node properties metadata",
        "operationId": "DeleteNodePropertyMetadata",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/capture.DeleteNodePropertyMetadataRequest"
              }
            }
          },
          "description": "Request Body",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/capture.BatchResults"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "errors": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/restapi.DetailedError"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Batch node properties metadata delete endpoint",
        "tags": [
          "Capture"
        ]
      }
    },
    "/relationships/": {
      "post": {
        "description": "Batch upsert relationship",
        "operationId": "UpsertRelationships",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/capture.UpsertRelationshipsRequest"
              }
            }
          },
          "description": "Request Body",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/capture.BatchResults"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "errors": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/restapi.DetailedError"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Batch relationship upsert endpoint",
        "tags": [
          "Capture"
        ]
      }
    },
    "/relationships/delete": {
      "post": {
        "description": "Batch delete relationships",
        "operationId": "DeleteRelationships",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/capture.DeleteRelationshipsRequest"
              }
            }
          },
          "description": "Request Body",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/capture.BatchResults"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "errors": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/restapi.DetailedError"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Batch relationship delete endpoint",
        "tags": [
          "Capture"
        ]
      }
    },
    "/relationships/properties/delete": {
      "post": {
        "description": "Batch delete relationship properties",
        "operationId": "DeleteRelationshipProperties",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/capture.DeleteRelationshipPropertiesRequest"
              }
            }
          },
          "description": "Request Body",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/capture.BatchResults"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "errors": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Bad request"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/restapi.DetailedError"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "500": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Internal Server Error"
          }
        },
        "summary": "Batch relationship properties delete endpoint",
        "tags": [
          "Capture"
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "capture.BaseProperty": {
        "properties": {
          "external_value": {
            "type": "string"
          },
          "type": {
            "maxLength": 128,
            "type": "string"
          },
          "value": {
            "description": "Value can be either string, integer, float, boolean, or an array of any of those types"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "capture.BatchResults": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/capture.Result"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "capture.DeleteNode": {
        "properties": {
          "external_id": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "location": {
            "maxLength": 32,
            "minLength": 2,
            "type": "string"
          },
          "type": {
            "maxLength": 64,
            "minLength": 2,
            "type": "string"
          }
        },
        "required": [
          "external_id",
          "type"
        ],
        "type": "object"
      },
      "capture.DeleteNodeProperties": {
        "properties": {
          "external_id": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "location": {
            "maxLength": 32,
            "minLength": 2,
            "type": "string"
          },
          "property_types": {
            "items": {
              "type": "string"
            },
            "maxItems": 250,
            "minItems": 1,
            "type": "array"
          },
          "type": {
            "maxLength": 64,
            "minLength": 2,
            "type": "string"
          }
        },
        "required": [
          "external_id",
          "type",
          "property_types"
        ],
        "type": "object"
      },
      "capture.DeleteNodePropertiesRequest": {
        "properties": {
          "nodes": {
            "items": {
              "$ref": "#/components/schemas/capture.DeleteNodeProperties"
            },
            "maxItems": 250,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "nodes"
        ],
        "type": "object"
      },
      "capture.DeleteNodePropertyMetadata": {
        "properties": {
          "external_id": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "location": {
            "maxLength": 32,
            "minLength": 2,
            "type": "string"
          },
          "metadata_fields": {
            "items": {
              "type": "string"
            },
            "maxItems": 250,
            "minItems": 1,
            "type": "array"
          },
          "property_type": {
            "type": "string"
          },
          "type": {
            "maxLength": 64,
            "minLength": 2,
            "type": "string"
          }
        },
        "required": [
          "external_id",
          "type",
          "property_type",
          "metadata_fields"
        ],
        "type": "object"
      },
      "capture.DeleteNodePropertyMetadataRequest": {
        "properties": {
          "nodes": {
            "items": {
              "$ref": "#/components/schemas/capture.DeleteNodePropertyMetadata"
            },
            "maxItems": 250,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "nodes"
        ],
        "type": "object"
      },
      "capture.DeleteNodesRequest": {
        "properties": {
          "nodes": {
            "items": {
              "$ref": "#/components/schemas/capture.DeleteNode"
            },
            "maxItems": 250,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "nodes"
        ],
        "type": "object"
      },
      "capture.DeleteRelationshipProperties": {
        "properties": {
          "properties": {
            "items": {
              "$ref": "#/components/schemas/capture.BaseProperty"
            },
            "type": "array"
          },
          "property_types": {
            "items": {
              "type": "string"
            },
            "maxItems": 250,
            "minItems": 1,
            "type": "array"
          },
          "source": {
            "$ref": "#/components/schemas/capture.Node"
          },
          "target": {
            "$ref": "#/components/schemas/capture.Node"
          },
          "type": {
            "maxLength": 128,
            "type": "string"
          }
        },
        "required": [
          "type",
          "source",
          "target",
          "property_types"
        ],
        "type": "object"
      },
      "capture.DeleteRelationshipPropertiesRequest": {
        "properties": {
          "relationships": {
            "items": {
              "$ref": "#/components/schemas/capture.DeleteRelationshipProperties"
            },
            "maxItems": 250,
            "minItems": 1,
            "type": "array"
          },
          "use_global_db": {
            "description": "UseGlobalDB routes the relationship property deletes to the Global DB of a composite database deployment.",
            "type": "boolean"
          }
        },
        "required": [
          "relationships"
        ],
        "type": "object"
      },
      "capture.DeleteRelationshipsRequest": {
        "properties": {
          "relationships": {
            "items": {
              "$ref": "#/components/schemas/capture.Relationship"
            },
            "maxItems": 250,
            "minItems": 1,
            "type": "array"
          },
          "use_global_db": {
            "description": "UseGlobalDB deletes the relationships from the Global DB of a composite database deployment.",
            "type": "boolean"
          }
        },
        "required": [
          "relationships"
        ],
        "type": "object"
      },
      "capture.Metadata": {
        "properties": {
          "assurance_level": {
            "enum": [
              1,
              2,
              3
            ],
            "format": "int32",
            "type": "integer"
          },
          "custom_metadata": {
            "additionalProperties": true,
            "type": "object"
          },
          "source": {
            "type": "string"
          },
          "verified_time": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "capture.Node": {
        "properties": {
          "external_id": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "location": {
            "maxLength": 32,
            "minLength": 2,
            "type": "string"
          },
          "type": {
            "maxLength": 64,
            "minLength": 2,
            "type": "string"
          }
        },
        "required": [
          "external_id",
          "type"
        ],
        "type": "object"
      },
      "capture.Property": {
        "properties": {
          "external_value": {
            "type": "string"
          },
          "metadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/capture.Metadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "maxLength": 128,
            "type": "string"
          },
          "value": {
            "description": "Value can be either string, integer, float, boolean, or an array of any of those types"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "capture.Relationship": {
        "properties": {
          "properties": {
            "items": {
              "$ref": "#/components/schemas/capture.BaseProperty"
            },
            "type": "array"
          },
          "source": {
            "$ref": "#/components/schemas/capture.Node"
          },
          "target": {
            "$ref": "#/components/schemas/capture.Node"
          },
          "type": {
            "maxLength": 128,
            "type": "string"
          }
        },
        "required": [
          "type",
          "source",
          "target"
        ],
        "type": "object"
      },
      "capture.Result": {
        "properties": {
          "id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "capture.UpsertNode": {
        "properties": {
          "external_id": {
            "maxLength": 256,
            "minLength": 1,
            "type": "string"
          },
          "is_identity": {
            "type": "boolean"
          },
          "labels": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "location": {
            "maxLength": 32,
            "minLength": 2,
            "type": "string"
          },
          "properties": {
            "items": {
              "$ref": "#/components/schemas/capture.Property"
            },
            "type": "array"
          },
          "type": {
            "maxLength": 64,
            "minLength": 2,
            "type": "string"
          }
        },
        "required": [
          "external_id",
          "type"
        ],
        "type": "object"
      },
      "capture.UpsertNodesRequest": {
        "properties": {
          "nodes": {
            "items": {
              "$ref": "#/components/schemas/capture.UpsertNode"
            },
            "maxItems": 250,
            "minItems": 1,
            "type": "array"
          }
        },
        "required": [
          "nodes"
        ],
        "type": "object"
      },
      "capture.UpsertRelationshipsRequest": {
        "properties": {
          "relationships": {
            "items": {
              "$ref": "#/components/schemas/capture.Relationship"
            },
            "maxItems": 250,
            "minItems": 1,
            "type": "array"
          },
          "use_global_db": {
            "description": "UseGlobalDB routes the relationships to the Global DB of a composite database deployment.",
            "type": "boolean"
          }
        },
        "required": [
          "relationships"
        ],
        "type": "object"
      },
      "restapi.DetailedError": {
        "properties": {
          "errors": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "message": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "restapi.ErrorResponse": {
        "properties": {
          "message": {
            "examples": [
              "Internal Server Error"
            ],
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "APIKey": {
        "description": "The value of the App Agent credential header must be passed as is, without any prefix.",
        "in": "header",
        "name": "X-IK-ClientKey",
        "type": "apiKey"
      }
    }
  }
}