{
  "swagger": "2.0",
  "info": {
    "description": "A crawler allows you to retrieve a full list of assets contained in a connection, in a single operation. Manage crawlers to retrieve data at a large scale and enrich your inventory more efficiently.",
    "version": "2021-03",
    "title": "Crawler",
    "contact": {}
  },
  "host": "api.eu.cloud.talend.com",
  "schemes": [
    "https"
  ],
  "paths": {
    "/connections/crawlers": {
      "get": {
        "tags": [
          "Crawler"
        ],
        "summary": "Retrieve all the crawlers of a tenant",
        "description": "This endpoint lets you retrieve all the crawlers of a tenant.\nYou can also include the crawlers that have been deleted by activating the dedicated option.\nYou can retrieve the crawler only from a connection by indicating the connection ID.",
        "operationId": "getApiV1Crawlers",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32",
            "description": "not used"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32",
            "description": "not used"
          },
          {
            "name": "talendVersion",
            "in": "query",
            "required": false,
            "type": "string",
            "description": "default version of the API",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "required": false,
            "type": "boolean",
            "description": "if true, it will also returns the crawlers that have been deleted.",
            "default": false
          },
          {
            "name": "connectionId",
            "in": "query",
            "required": false,
            "type": "string",
            "description": "Use this option if you want to retrieve the crawler linked to a connection"
          },
          {
            "name": "talend-version",
            "in": "header",
            "required": false,
            "type": "string",
            "description": "default version of the API",
            "enum": [
              "2021-03"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Status 200",
            "schema": {
              "$ref": "#/definitions/PaginatedResources_CrawlerModel"
            },
            "examples": {
              "application/json": "{\n  \"data\": [\n    {\n      \"id\": \"59451bf0-a81a-11eb-bcbc-0242ac130002\",\n      \"connectionId\": \"d54a8f03-7906-4930-a7cc-4eb90e968f89\",\n      \"name\": \"Crawler1\",\n      \"description\": \"Description du crawler 1\",\n      \"sharings\": [\n        {\n          \"scimType\": \"user\",\n          \"scimId\": \"b8a78dcb-65b4-4823-ad76-88720fc6309e\",\n          \"level\": \"OWNER\"\n        },\n        {\n          \"scimType\": \"group\",\n          \"scimId\": \"877f89dc-709b-4ef1-8d0e-a851f67a065a\",\n          \"level\": \"READER\"\n        },\n        {\n          \"scimType\": \"user\",\n          \"scimId\": \"bd4c7ae4-a1df-4702-845e-11946fa07d85\",\n          \"level\": \"WRITER\"\n        }\n      ],\n      \"status\": {\n        \"runStatus\": \"NotStarted\"\n      },\n      \"createdAt\": \"2021-01-08T15:41:29.263Z\",\n      \"createdBy\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\",\n      \"crawledDatasets\": [\n        \"Table1\",\n        \"Table2\",\n        \"Table3\",\n        \"View1\"\n      ]\n    },\n    {\n      \"id\": \"3a45cb46-a81a-11eb-bcbc-0242ac130002\",\n      \"connectionId\": \"165ea830-e003-11eb-ba80-0242ac130004\",\n      \"name\": \"Crawler2\",\n      \"description\": \"Description du crawler 2\",\n      \"sharings\": [\n        {\n          \"scimType\": \"user\",\n          \"scimId\": \"b8a78dcb-65b4-4823-ad76-88720fc6309e\",\n          \"level\": \"OWNER\"\n        },\n        {\n          \"scimType\": \"group\",\n          \"scimId\": \"877f89dc-709b-4ef1-8d0e-a851f67a065a\",\n          \"level\": \"READER\"\n        },\n        {\n          \"scimType\": \"user\",\n          \"scimId\": \"bd4c7ae4-a1df-4702-845e-11946fa07d85\",\n          \"level\": \"WRITER\"\n        }\n      ],\n      \"status\": {\n        \"runStatus\": \"RetrievingProperties\",\n        \"runStartedAt\": \"2021-01-08T15:41:29.263Z\",\n        \"runBy\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\"        \n      },\n      \"createdAt\": \"2021-01-08T15:41:29.263Z\",\n      \"createdBy\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\",\n      \"crawledDatasets\": [\n        \"Dataset 1\",\n        \"Dataset 2\",\n        \"Dataset 3\",\n        \"Dataset 4\"\n      ]\n    },\n    {\n      \"id\": \"108fb1c2-a81a-11eb-bcbc-0242ac130002\",\n      \"connectionId\": \"1db0db6c-e003-11eb-ba80-0242ac130004\",\n      \"name\": \"Crawler3\",\n      \"description\": \"Description du crawler 3\",\n      \"sharings\": [\n        {\n          \"scimType\": \"user\",\n          \"scimId\": \"b8a78dcb-65b4-4823-ad76-88720fc6309e\",\n          \"level\": \"OWNER\"\n        },\n        {\n          \"scimType\": \"group\",\n          \"scimId\": \"877f89dc-709b-4ef1-8d0e-a851f67a065a\",\n          \"level\": \"READER\"\n        },\n        {\n          \"scimType\": \"user\",\n          \"scimId\": \"bd4c7ae4-a1df-4702-845e-11946fa07d85\",\n          \"level\": \"WRITER\"\n        }\n      ],\n      \"status\": {\n        \"runStatus\": \"PropertiesRetrievalFailed\",\n        \"runStartedAt\": \"2021-01-08T15:41:29.263Z\",\n        \"runBy\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\",\n        \"failure\": \"cannot generate dataset properties\"\n      },\n      \"createdAt\": \"2021-01-08T15:41:29.263Z\",\n      \"createdBy\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\",\n      \"crawledDatasets\": [\n        \"Dataset 1\",\n        \"Dataset 2\",\n        \"Dataset 3\",\n        \"Dataset 4\"\n      ]\n    },\n    {\n      \"id\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\",\n      \"connectionId\": \"2695204e-e003-11eb-ba80-0242ac130004\",\n      \"name\": \"Crawler4\",\n      \"description\": \"Description du crawler 4\",\n      \"sharings\": [\n        {\n          \"scimType\": \"user\",\n          \"scimId\": \"b8a78dcb-65b4-4823-ad76-88720fc6309e\",\n          \"level\": \"OWNER\"\n        },\n        {\n          \"scimType\": \"group\",\n          \"scimId\": \"877f89dc-709b-4ef1-8d0e-a851f67a065a\",\n          \"level\": \"READER\"\n        },\n        {\n          \"scimType\": \"user\",\n          \"scimId\": \"bd4c7ae4-a1df-4702-845e-11946fa07d85\",\n          \"level\": \"WRITER\"\n        }\n      ],\n      \"status\": {\n        \"runStatus\": \"CreatingDatasets\",\n        \"runStartedAt\": \"2021-01-08T15:41:29.263Z\",\n        \"runBy\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\"\n      },\n      \"createdAt\": \"2021-01-08T15:41:29.263Z\",\n      \"createdBy\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\",\n      \"crawledDatasets\": [\n        \"Dataset 1\",\n        \"Dataset 2\",\n        \"Dataset 3\",\n        \"Dataset 4\"\n      ]\n    },\n    {\n      \"id\": \"7c7f7872-a81a-11eb-bcbc-0242ac130002\",\n      \"connectionId\": \"2e46ed68-e003-11eb-ba80-0242ac130004\",\n      \"name\": \"Crawler5\",\n      \"description\": \"Description du crawler 5\",\n      \"sharings\": [\n        {\n          \"scimType\": \"user\",\n          \"scimId\": \"b8a78dcb-65b4-4823-ad76-88720fc6309e\",\n          \"level\": \"OWNER\"\n        },\n        {\n          \"scimType\": \"group\",\n          \"scimId\": \"877f89dc-709b-4ef1-8d0e-a851f67a065a\",\n          \"level\": \"READER\"\n        },\n        {\n          \"scimType\": \"user\",\n          \"scimId\": \"bd4c7ae4-a1df-4702-845e-11946fa07d85\",\n          \"level\": \"WRITER\"\n        }\n      ],\n      \"status\": {\n        \"runStatus\": \"Finished\",\n        \"runStartedAt\": \"2021-01-08T15:41:29.263Z\",\n        \"runBy\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\",\n        \"runFinishedAt\": \"2021-01-08T15:41:29.263Z\"\n      },\n      \"createdAt\": \"2021-01-08T15:41:29.263Z\",\n      \"createdBy\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\",\n      \"crawledDatasets\": [\n        \"Dataset 1\",\n        \"Dataset 2\",\n        \"Dataset 3\",\n        \"Dataset 4\"\n      ]\n    }\n  ],\n  \"offset\": 0,\n  \"limit\": 0,\n  \"total\": 5\n}"
            }
          },
          "401": {
            "description": "Not authenticated",
            "schema": {
              "$ref": "#/definitions/NotAuthenticated"
            }
          },
          "403": {
            "description": "Not authorized",
            "schema": {
              "$ref": "#/definitions/NotAuthorized"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ServerError"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Crawler"
        ],
        "summary": "Create a new crawler",
        "description": "At this time, a crawler can only be created on a JDBC connection.\nYou can only have one active crawler per connection. An active crawler is a crawler that has not been deleted.\nWhen the user runs the crawler, datasets from the tables and views of the JDBC connection will be created.\n\nKnown limitations:\n\n**Max objects limit** : We recommend selecting less than 1000 tables/views. Beyond this limit, you may encounter issues when launching the run endpoint.\n\n**Max datasets limit**: The maximum number of datasets a user can have is 1500. Beyond this limit, you may encounter timeouts when calling the dataset endpoint that list them all for a user. In consequence, when configuring a crawler, it is important to ensure that you will not exceed this limit after the crawler has run.",
        "operationId": "postApiV1Crawlers",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "talendVersion",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "talend-version",
            "in": "header",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/CreateCrawlerRequest"
            },
            "x-examples": {
              "application/json": "{\n  \"connectionId\": \"d54a8f03-7906-4930-a7cc-4eb90e968f89\",\n  \"name\": \"Crawler - JDBC\",\n  \"selectedDatasets\": [\n    \"accounts\",\n    \"orders\",\n    \"items\"\n  ],\n  \"sharings\": [\n    {\n      \"scimType\": \"user\",\n      \"scimId\": \"b8a78dcb-65b4-4823-ad76-88720fc6309e\",\n      \"level\": \"OWNER\"\n    },\n    {\n      \"scimType\": \"group\",\n      \"scimId\": \"877f89dc-709b-4ef1-8d0e-a851f67a065a\",\n      \"level\": \"READER\"\n    },\n    {\n      \"scimType\": \"user\",\n      \"scimId\": \"bd4c7ae4-a1df-4702-845e-11946fa07d85\",\n      \"level\": \"WRITER\"\n    }\n  ]\n}"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Status 201",
            "schema": {
              "$ref": "#/definitions/CreateCrawlerResponse"
            },
            "examples": {
              "application/json": "{\n  \"id\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\"\n}"
            }
          },
          "401": {
            "description": "Not authenticated",
            "schema": {
              "$ref": "#/definitions/NotAuthenticated"
            }
          },
          "403": {
            "description": "Not authorized",
            "schema": {
              "$ref": "#/definitions/NotAuthorized"
            }
          },
          "409": {
            "description": "Already Exist",
            "schema": {
              "$ref": "#/definitions/AlreadyExist"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ServerError"
            }
          }
        }
      }
    },
    "/connections/crawlers/{crawlerId}": {
      "get": {
        "tags": [
          "Crawler"
        ],
        "summary": "Get a crawler by its ID",
        "description": "Retrieve a crawler using its ID.\nThe response payload contains the crawler itself.",
        "operationId": "getApiV1CrawlersCrawlerid",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "talendVersion",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "includeDeleted",
            "in": "query",
            "required": false,
            "type": "boolean",
            "description": "if true, it will also returns the crawlers that have been deleted.",
            "default": false
          },
          {
            "name": "talend-version",
            "in": "header",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Status 200",
            "schema": {
              "$ref": "#/definitions/CrawlerModel"
            },
            "examples": {
              "application/json": "{\n  \"id\": \"59451bf0-a81a-11eb-bcbc-0242ac130002\",\n  \"connectionId\": \"d54a8f03-7906-4930-a7cc-4eb90e968f89\",\n  \"name\": \"Crawler1\",\n  \"description\": \"Description du crawler 1\",\n  \"sharings\": [\n    {\n      \"scimType\": \"user\",\n      \"scimId\": \"b8a78dcb-65b4-4823-ad76-88720fc6309e\",\n      \"level\": \"OWNER\"\n    },\n    {\n      \"scimType\": \"group\",\n      \"scimId\": \"877f89dc-709b-4ef1-8d0e-a851f67a065a\",\n      \"level\": \"READER\"\n    },\n    {\n      \"scimType\": \"user\",\n      \"scimId\": \"bd4c7ae4-a1df-4702-845e-11946fa07d85\",\n      \"level\": \"WRITER\"\n    }\n  ],\n  \"status\": {\n    \"runStatus\": \"NotStarted\",\n    \"nbDatasetsToCrawl\": 0,\n    \"nbDatasetsFinished\": 0,\n    \"nbDatasetsCreated\": 0,\n    \"nbDatasetsFailed\": 0,\n    \"nbSamplesFailed\": 0\n  },\n  \"createdAt\": \"2021-01-08T15:41:29.263Z\",\n  \"createdBy\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\",\n  \"crawledDatasets\": [\n    \"Dataset 1\",\n    \"Dataset 2\",\n    \"Dataset 3\",\n    \"Dataset 4\"\n  ]\n}"
            }
          },
          "401": {
            "description": "Not authenticated",
            "schema": {
              "$ref": "#/definitions/NotAuthenticated"
            }
          },
          "403": {
            "description": "Not authorized",
            "schema": {
              "$ref": "#/definitions/NotAuthorized"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/NotFound"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ServerError"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Crawler"
        ],
        "summary": "Update the tables and views selection of an existing crawler",
        "description": "This endpoint allows you to add and remove some tables or views from the crawler configuration.",
        "operationId": "putApiV1CrawlersCrawlerid",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "talendVersion",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "talend-version",
            "in": "header",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/UpdateCrawlerRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Status 200",
            "schema": {
              "type": "string",
              "description": "The technical talend ID of the crawler that has been updated."
            }
          },
          "401": {
            "description": "Not authenticated",
            "schema": {
              "$ref": "#/definitions/NotAuthenticated"
            }
          },
          "403": {
            "description": "Not authorized",
            "schema": {
              "$ref": "#/definitions/NotAuthorized"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/NotFound"
            }
          },
          "409": {
            "description": "The crawler is running, action not available",
            "schema": {
              "$ref": "#/definitions/AlreadyRunning"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ServerError"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Crawler"
        ],
        "summary": "Delete a crawler",
        "description": "Use this method to delete a crawler.\nBecause you can only have one crawler at a time on a JDBC connection, you may need to delete a crawler in order to create a new one.\nYou can also edit an existing crawler and make some modifications.\nDeleting a crawler doesn't physically remove it unless this crawler has no more related datasets. You can still find it with the endpoint that lists all the crawlers by including the deleted crawlers in the search.",
        "operationId": "deleteApiV1CrawlersCrawlerid",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "talendVersion",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "talend-version",
            "in": "header",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Status 204"
          },
          "401": {
            "description": "Not authenticated",
            "schema": {
              "$ref": "#/definitions/NotAuthenticated"
            }
          },
          "403": {
            "description": "Not authorized",
            "schema": {
              "$ref": "#/definitions/NotAuthorized"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/NotFound"
            }
          },
          "409": {
            "description": "The crawler is running, action not available",
            "schema": {
              "$ref": "#/definitions/AlreadyRunning"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ServerError"
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Crawler"
        ],
        "summary": "Update the name and description of a crawler",
        "description": "This endpoint allows you to update the name and the description of a crawler.",
        "operationId": "patchApiV1CrawlersCrawlerid",
        "consumes": [
          "application/json"
        ],
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "talendVersion",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "talend-version",
            "in": "header",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/PatchCrawlerRequest"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Status 200",
            "schema": {
              "type": "string",
              "description": "The technical talend ID of the crawler that has been updated."
            }
          },
          "401": {
            "description": "Not authenticated",
            "schema": {
              "$ref": "#/definitions/NotAuthenticated"
            }
          },
          "403": {
            "description": "Not authorized",
            "schema": {
              "$ref": "#/definitions/NotAuthorized"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/NotFound"
            }
          },
          "409": {
            "description": "The crawler is running, action not available",
            "schema": {
              "$ref": "#/definitions/AlreadyRunning"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ServerError"
            }
          }
        }
      },
      "parameters": [
        {
          "name": "crawlerId",
          "in": "path",
          "required": true,
          "type": "string"
        }
      ]
    },
    "/connections/crawlers/{crawlerId}/run": {
      "post": {
        "tags": [
          "Crawler"
        ],
        "summary": "Run a crawler",
        "description": "This endpoint allows you to start the crawler.\nWhen calling this endpoint, the crawler will rely on its configuration in order to retrieve all the selected tables and views and turn them into datasets.\nOnce the dataset will be created the crawler will also retrieve their samples.\n\nYou can launch the crawler as many time as you want.\nRunning a crawler once will create the datasets. Running a crawler again will only refresh the sample of the existing datasets.\n\nKnown limitations:\n\n**Max objects limit** : We recommend selecting less than 1000 tables/views. Beyond this limit, you may encounter issues when launching the run endpoint.\n\n**Max datasets limit**: The maximum number of datasets a user can have is 1500. Beyond this limit, you may encounter timeouts when calling the dataset endpoint that list them all for a user. In consequence, when configuring a crawler, it is important to ensure that you will not exceed this limit after the crawler has run.",
        "operationId": "postApiV1CrawlersCrawleridRun",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "talendVersion",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "talend-version",
            "in": "header",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          }
        ],
        "responses": {
          "202": {
            "description": "Status 202"
          },
          "401": {
            "description": "Not authenticated",
            "schema": {
              "$ref": "#/definitions/NotAuthenticated"
            }
          },
          "403": {
            "description": "Not authorized",
            "schema": {
              "$ref": "#/definitions/NotAuthorized"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/NotFound"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ServerError"
            }
          }
        }
      },
      "parameters": [
        {
          "name": "crawlerId",
          "in": "path",
          "required": true,
          "type": "string"
        }
      ]
    },
    "/connections/crawlers/{crawlerId}/end": {
      "post": {
        "tags": [
          "Crawler"
        ],
        "summary": "End a crawler while it is running",
        "description": "This endpoint allows you to stop a crawler while it is running.\nAfter launching a crawler, the run can take up to a few hours to complete, according the number of objects you selected.\nYou may want to stop the run for many reasons, for instance if you notice that the crawler was created on the wrong connection.\n\nStopping a crawler does not mean cancelling the crawler.\nThe datasets that have already been created will not be deleted.\nIf you want to clean them, you can use the faceted search to retrieve the datasets created by a crawler and delete them.",
        "operationId": "postApiV1CrawlersCrawleridEnd",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "talendVersion",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "talend-version",
            "in": "header",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          }
        ],
        "responses": {
          "202": {
            "description": "Status 202"
          },
          "401": {
            "description": "Not authenticated",
            "schema": {
              "$ref": "#/definitions/NotAuthenticated"
            }
          },
          "403": {
            "description": "Not authorized",
            "schema": {
              "$ref": "#/definitions/NotAuthorized"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/NotFound"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ServerError"
            }
          }
        }
      },
      "parameters": [
        {
          "name": "crawlerId",
          "in": "path",
          "required": true,
          "type": "string"
        }
      ]
    },
    "/connections/crawlers/{crawlerId}/datasets": {
      "get": {
        "tags": [
          "Crawler"
        ],
        "summary": "Retrieve all the statuses of the datasets related to a crawler",
        "description": "This endpoint allows you to retrieve the statuses of all the datasets related to a crawler.",
        "operationId": "getApiV1CrawlersCrawleridDatasets",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "talendVersion",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "talend-version",
            "in": "header",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Status 200",
            "schema": {
              "$ref": "#/definitions/PaginatedResources_CrawledDataset"
            },
            "examples": {
              "application/json": "{\n  \"data\": [\n    {\n      \"id\": \"ac2c714e-33bb-4346-add5-acdab5c07d8f\",\n      \"crawlerId\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\",\n      \"datasetId\": \"d54f8f03-7906-4930-a7cc-4eb90e968f89\",\n      \"displayName\": \"Dataset 1\",\n      \"technicalName\": \"Dataset1\",\n      \"metadata\": {},\n      \"exportStatus\": \"NotStarted\",\n      \"lastUpdate\": \"2021-01-08T15:41:29.263Z\"\n    },\n    {\n      \"id\": \"848adbdc-b7b6-11eb-8529-0242ac130003\",\n      \"crawlerId\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\",\n      \"datasetId\": \"e3d7bd9e-b7b6-11eb-8529-0242ac130003\",\n      \"displayName\": \"Dataset 2\",\n      \"technicalName\": \"Dataset2\",\n      \"metadata\": {},\n      \"exportStatus\": \"Creating\",\n      \"lastUpdate\": \"2021-01-08T15:41:29.263Z\"\n    },\n    {\n      \"id\": \"39ebaa42-b7b7-11eb-8529-0242ac130003\",\n      \"crawlerId\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\",\n      \"datasetId\": \"ed80cec6-b7b6-11eb-8529-0242ac130003\",\n      \"displayName\": \"Dataset 3\",\n      \"technicalName\": \"Dataset3\",\n      \"metadata\": {},\n      \"exportStatus\": \"Finished\",\n      \"lastUpdate\": \"2021-01-08T15:41:29.263Z\"\n    },\n    {\n      \"id\": \"4bf7c108-b7b7-11eb-8529-0242ac130003\",\n      \"crawlerId\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\",\n      \"datasetId\": \"6bb92356-b7b7-11eb-8529-0242ac130003\",\n      \"displayName\": \"Dataset 4\",\n      \"technicalName\": \"Dataset4\",\n      \"metadata\": {},\n      \"exportStatus\": \"CreationFailed\",\n      \"failure\": \"Could not export the dataset because of ...\",\n      \"lastUpdate\": \"2021-01-08T15:41:29.263Z\"\n    }\n  ],\n  \"offset\": 0,\n  \"limit\": 100,\n  \"total\": 4\n}"
            }
          },
          "401": {
            "description": "Not authenticated",
            "schema": {
              "$ref": "#/definitions/NotAuthenticated"
            }
          },
          "403": {
            "description": "Not authorized",
            "schema": {
              "$ref": "#/definitions/NotAuthorized"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/NotFound"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ServerError"
            }
          },
          "503": {
            "description": "Service unavailable",
            "schema": {
              "$ref": "#/definitions/NotAuthorized"
            }
          }
        }
      },
      "parameters": [
        {
          "name": "crawlerId",
          "in": "path",
          "required": true,
          "type": "string"
        }
      ]
    },
    "/connections/crawlers/{crawlerId}/errors.log": {
      "get": {
        "tags": [
          "Crawler"
        ],
        "summary": "Get the error log file",
        "description": "This endpoint allows you to retrieve the error log file of a crawler run. Even if your crawler ends successfully, some samples may have not been fetched, so you might want to know the technical reasons by downloading the error logs.",
        "operationId": "getApiV1CrawlersCrawleridErrors.log",
        "produces": [
          "text/plain",
          "application/json"
        ],
        "parameters": [
          {
            "name": "talendVersion",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "talend-version",
            "in": "header",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Status 200",
            "schema": {
              "type": "string"
            },
            "headers": {
              "Content-Disposition": {
                "type": "string"
              }
            }
          },
          "401": {
            "description": "Not authenticated",
            "schema": {
              "$ref": "#/definitions/NotAuthenticated"
            }
          },
          "403": {
            "description": "Not authorized",
            "schema": {
              "$ref": "#/definitions/NotAuthorized"
            }
          }
        }
      },
      "parameters": [
        {
          "name": "crawlerId",
          "in": "path",
          "required": true,
          "type": "string"
        }
      ]
    },
    "/connections/scan/{connectionId}": {
      "get": {
        "tags": [
          "ConnectionScan"
        ],
        "summary": "Retrieve the result of the last scan",
        "description": "This endpoint allows you to retrieve the tables and views held by a connection based on the last connection scan. It can only be done if you have previously scanned the JDBC connection by calling this endpoint with the POST method. Once the scan is done, you can call the GET endpoint in order to get the result. If the connection has changed (for example new tables/views have been added), then you must call a POST scan in order to refresh the state.",
        "operationId": "getApiV1ScanConnectionid",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "talendVersion",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "talend-version",
            "in": "header",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Status 200",
            "schema": {
              "$ref": "#/definitions/ConnectionScan"
            },
            "examples": {
              "application/json": "{\n  \"id\": \"ac6e2117-fbb5-442a-bb02-cefabbf04516\",\n  \"lastScan\": \"2021-01-08T15:41:29.263Z\",\n  \"results\": [\n    {\n      \"displayName\": \"view1\",\n      \"technicalName\": \"view1\",\n      \"metadata\": {\n        \"type\": \"VIEW\"\n      }\n    },\n    {\n      \"displayName\": \"table1\",\n      \"technicalName\": \"table1\",\n      \"metadata\": {\n        \"type\": \"TABLE\"\n      }\n    }\n  ]\n}"
            }
          },
          "401": {
            "description": "Not authenticated",
            "schema": {
              "$ref": "#/definitions/NotAuthenticated"
            }
          },
          "403": {
            "description": "Not authorized",
            "schema": {
              "$ref": "#/definitions/NotAuthorized"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/NotFound"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ServerError"
            }
          }
        }
      },
      "post": {
        "tags": [
          "ConnectionScan"
        ],
        "summary": "Scan a JDBC connection",
        "description": "This endpoint allows you to scan the content of a JDBC connection. The scan will search for all the tables and views that are held by this connection. However, the tables and views found by this scan are not returned in the response payload. In order to get them, you need to call this endpoint with the GET method.",
        "operationId": "postApiV1ScanConnectionid",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "talendVersion",
            "in": "query",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          },
          {
            "name": "talend-version",
            "in": "header",
            "required": false,
            "type": "string",
            "enum": [
              "2021-03"
            ]
          }
        ],
        "responses": {
          "204": {
            "description": "Status 204"
          },
          "401": {
            "description": "Not authenticated",
            "schema": {
              "$ref": "#/definitions/NotAuthenticated"
            }
          },
          "403": {
            "description": "Not authorized",
            "schema": {
              "$ref": "#/definitions/NotAuthorized"
            }
          },
          "404": {
            "description": "Not found",
            "schema": {
              "$ref": "#/definitions/NotFound"
            }
          },
          "500": {
            "description": "Internal Server Error",
            "schema": {
              "$ref": "#/definitions/ServerError"
            }
          }
        }
      },
      "parameters": [
        {
          "name": "connectionId",
          "in": "path",
          "required": true,
          "type": "string"
        }
      ]
    }
  },
  "definitions": {
    "CreateCrawlerRequest": {
      "type": "object",
      "required": [
        "connectionId",
        "name"
      ],
      "properties": {
        "connectionId": {
          "type": "string",
          "description": "The technical talend ID of the connection"
        },
        "name": {
          "type": "string",
          "description": "Name of the crawler"
        },
        "description": {
          "type": "string",
          "description": "Description of the crawler"
        },
        "selectedDatasets": {
          "type": "array",
          "description": "Names of the tables and views that we want to retrieve with the crawler",
          "items": {
            "type": "string"
          }
        },
        "sharings": {
          "type": "array",
          "description": "Sharing policies",
          "items": {
            "$ref": "#/definitions/Sharing"
          }
        }
      },
      "description": "Describe the crawler about to be created with the name, description, tables and views selection, user and group for the sharing policies."
    },
    "Sharing": {
      "type": "object",
      "required": [
        "level",
        "scimId",
        "scimType"
      ],
      "properties": {
        "scimType": {
          "type": "string",
          "description": "indicate USER or GROUP",
          "enum": [
            "USER",
            "GROUP"
          ]
        },
        "scimId": {
          "type": "string",
          "description": "the scim id of the USER or GROUP"
        },
        "level": {
          "type": "string",
          "description": "the level of the sharing",
          "enum": [
            "READER",
            "WRITER",
            "OWNER"
          ]
        }
      },
      "description": "This object indicate the sharing informations."
    },
    "NotAuthenticated": {
      "type": "object",
      "required": [
        "message"
      ],
      "properties": {
        "message": {
          "type": "string"
        },
        "cause": {
          "type": "string"
        }
      },
      "description": "The user has not been authenticated."
    },
    "NotAuthorized": {
      "type": "object",
      "required": [
        "message"
      ],
      "properties": {
        "message": {
          "type": "string"
        },
        "cause": {
          "type": "string"
        }
      },
      "description": "The user has been authenticated but doesn't have the entitlement for this service."
    },
    "AlreadyExist": {
      "type": "object",
      "required": [
        "connectionId"
      ],
      "properties": {
        "connectionId": {
          "type": "string",
          "description": "The technical talend ID of the connection"
        },
        "i18nMsg": {
          "type": "string"
        }
      },
      "description": "A crawler already exists for this connection. You can only have one crawler per connection."
    },
    "ServerError": {
      "type": "object",
      "required": [
        "message"
      ],
      "properties": {
        "message": {
          "type": "string"
        },
        "cause": {
          "type": "string"
        }
      },
      "description": "The server encountered an error during the processing of the request."
    },
    "CreateCrawlerResponse": {
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The technical talend ID of the crawler that has been created"
        }
      },
      "description": "Contains the response following a crawler creation request. The object contains the ID of the crawler created."
    },
    "NotFound": {
      "type": "object",
      "required": [
        "entityId",
        "entityType"
      ],
      "properties": {
        "entityId": {
          "type": "string",
          "description": "The technical talend ID of the entity"
        },
        "entityType": {
          "$ref": "#/definitions/EntityType"
        },
        "i18nMsg": {
          "type": "string"
        }
      },
      "description": "Generic response payload when an object hasn't been found. The entityType gives more information about the object."
    },
    "EntityType": {
      "type": "string",
      "description": "Entity type used for the NotFound data type in order to indicate the type of the object that hasn't been found.",
      "enum": [
        "Connection",
        "ConnectionScan",
        "CrawledDataset",
        "Crawler",
        "Dataset",
        "Datastore",
        "MassSampling",
        "Tenant"
      ]
    },
    "CrawlerModel": {
      "type": "object",
      "description": "This object represents a whole crawler. It has two formats : either complete or light."
    },
    "CrawlerComplete": {
      "type": "object",
      "required": [
        "connectionId",
        "createdAt",
        "createdBy",
        "id",
        "name",
        "status"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The technical talend ID of the crawler"
        },
        "connectionId": {
          "type": "string",
          "description": "The technical talend ID of the connection"
        },
        "name": {
          "type": "string",
          "description": "Name of the crawler"
        },
        "description": {
          "type": "string",
          "description": "Description of the crawler"
        },
        "sharings": {
          "type": "array",
          "description": "Sharing policies",
          "items": {
            "$ref": "#/definitions/Sharing"
          }
        },
        "status": {
          "$ref": "#/definitions/Status"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date when the crawler has been created"
        },
        "createdBy": {
          "type": "string",
          "description": "Technical ID of the talend user."
        },
        "crawledDatasets": {
          "type": "array",
          "description": "Names of the tables and views that we want to retrieve with the crawler.",
          "items": {
            "type": "string"
          }
        },
        "updateAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date when the crawler has been updated"
        },
        "updatedBy": {
          "type": "string",
          "description": "Technical ID of the talend user."
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date when the crawler has been deleted"
        },
        "deletedBy": {
          "type": "string",
          "description": "Technical ID of the talend user."
        }
      },
      "description": "This object represents a crawler in the complete version."
    },
    "Status": {
      "type": "object",
      "required": [
        "nbDatasetsCreated",
        "nbDatasetsFailed",
        "nbDatasetsFinished",
        "nbDatasetsToCrawl",
        "nbSamplesFailed",
        "runStatus"
      ],
      "properties": {
        "runStatus": {
          "$ref": "#/definitions/RunStatus"
        },
        "runStartedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date when the run has started"
        },
        "runBy": {
          "type": "string",
          "description": "Technical ID of the talend user."
        },
        "runFinishedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date when the run has finished"
        },
        "failure": {
          "type": "string"
        },
        "nbDatasetsToCrawl": {
          "type": "integer",
          "format": "int32",
          "description": "Number of datasets to retrieve"
        },
        "nbDatasetsFinished": {
          "type": "integer",
          "format": "int32",
          "description": "Number of datasets already retrieved"
        },
        "nbDatasetsCreated": {
          "type": "integer",
          "format": "int32",
          "description": "Number of datasets tha has been created"
        },
        "nbDatasetsFailed": {
          "type": "integer",
          "format": "int32",
          "description": "Number of datasets that has not been created"
        },
        "nbSamplesFailed": {
          "type": "integer",
          "format": "int32",
          "description": "Number of samples that has not been created"
        }
      },
      "description": "This object contains informations about the crawler status"
    },
    "RunStatus": {
      "type": "string",
      "description": "This object contains the different run status of the crawler.",
      "example": "CreatingDatasets"
    },
    "CrawlerLight": {
      "type": "object",
      "required": [
        "connectionId",
        "id",
        "name",
        "runStatus"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The technical talend ID of the crawler"
        },
        "name": {
          "type": "string",
          "description": "The name of the crawler"
        },
        "connectionId": {
          "type": "string",
          "description": "The technical talend ID of the connection"
        },
        "runStatus": {
          "$ref": "#/definitions/RunStatus"
        },
        "deletedAt": {
          "type": "string",
          "format": "date-time",
          "description": "The date when the crawler has been deleted"
        }
      },
      "description": "This object represents a crawler in the light version (only contain the status)."
    },
    "AlreadyRunning": {
      "type": "object",
      "required": [
        "crawlerId"
      ],
      "properties": {
        "crawlerId": {
          "type": "string",
          "description": "The technical talend ID of the crawler"
        },
        "i18nMsg": {
          "type": "string"
        }
      },
      "description": "This entity indicates that the crawler is already running and provides the crawler ID."
    },
    "PaginatedResources_CrawlerModel": {
      "type": "object",
      "required": [
        "limit",
        "offset",
        "total"
      ],
      "properties": {
        "data": {
          "type": "array",
          "description": "Contains the list of the crawlers",
          "items": {
            "$ref": "#/definitions/CrawlerModel"
          }
        },
        "offset": {
          "type": "integer",
          "format": "int32",
          "description": "Pagination offset"
        },
        "limit": {
          "type": "integer",
          "format": "int32",
          "description": "Pagination limit"
        },
        "total": {
          "type": "integer",
          "format": "int32",
          "description": "Total number of crawlers"
        }
      },
      "description": "This object represents a whole crawler but in a paginated context."
    },
    "UpdateCrawlerRequest": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "New name of the crawler"
        },
        "description": {
          "type": "string",
          "description": "New description of the crawler"
        },
        "selectedDatasets": {
          "type": "array",
          "description": "Names of the tables and views that we want to retrieve with the crawler.",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "Describe the elements to update on the crawler as the name, description and the tables/views selection."
    },
    "PatchCrawlerRequest": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "New name of the crawler"
        },
        "description": {
          "type": "string",
          "description": "New description of the crawler"
        }
      },
      "description": "This object is used when the user wants to update the name and the description of the crawler.\nThose fields will replace the current ones once the update will be applied."
    },
    "PaginatedResources_CrawledDataset": {
      "type": "object",
      "required": [
        "limit",
        "offset",
        "total"
      ],
      "properties": {
        "data": {
          "type": "array",
          "description": "Contains the list of the objects selected in the crawler configuration",
          "items": {
            "$ref": "#/definitions/CrawledDataset"
          }
        },
        "offset": {
          "type": "integer",
          "format": "int32",
          "description": "Pagination offset"
        },
        "limit": {
          "type": "integer",
          "format": "int32",
          "description": "Pagination limit"
        },
        "total": {
          "type": "integer",
          "format": "int32",
          "description": "Total number of crawlers"
        }
      },
      "description": "This objects contains the datasets related to a crawler in a paginated context."
    },
    "CrawledDataset": {
      "type": "object",
      "required": [
        "crawlerId",
        "displayName",
        "exportStatus",
        "id",
        "lastUpdate",
        "metadata",
        "technicalName"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The technical ID of the object selected by the crawler"
        },
        "crawlerId": {
          "type": "string",
          "description": "The technical talend ID of the crawler"
        },
        "datasetId": {
          "type": "string",
          "description": "The technical ID of the dataset generated by the crawler"
        },
        "displayName": {
          "type": "string",
          "description": "Names of the tables and views that we want to retrieve with the crawler"
        },
        "technicalName": {
          "type": "string",
          "description": "Technical names of the tables and views that we want to retrieve with the crawler"
        },
        "metadata": {
          "$ref": "#/definitions/Metadata_infos"
        },
        "exportStatus": {
          "$ref": "#/definitions/ExportStatus"
        },
        "failure": {
          "type": "string",
          "description": "Indicate if we encountered a failure during the crawling for this dataset"
        },
        "lastUpdate": {
          "type": "string",
          "format": "date-time",
          "description": "Date of the last time this dataset has been refreshed"
        }
      },
      "description": "This object represents a datasets related to a crawler."
    },
    "Metadata_infos": {
      "type": "object",
      "description": "This objects contains the metadata of an entity according to the context of the call.\nExemple : indicate if an object is a table or a view."
    },
    "ExportStatus": {
      "type": "string",
      "description": "this object contains the different statuses of a dataset in a crawler context.",
      "enum": [
        "Creating",
        "CreationFailed",
        "Finished",
        "NotStarted",
        "Sampling",
        "SamplingFailed"
      ]
    },
    "ConnectionScan": {
      "type": "object",
      "required": [
        "id",
        "lastScan"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The technical talend ID of the connection"
        },
        "lastScan": {
          "type": "string",
          "format": "date-time",
          "description": "Date of the last time this connection has been scanned"
        },
        "results": {
          "type": "array",
          "description": "Objects of the connection retrieved by the last scan",
          "items": {
            "$ref": "#/definitions/ScannedDataset"
          }
        }
      },
      "description": "This object contains the information about the last scan of the connection. It allows the user to retrieve the objects found by the last scan."
    },
    "ScannedDataset": {
      "type": "object",
      "required": [
        "displayName",
        "metadata",
        "technicalName"
      ],
      "properties": {
        "displayName": {
          "type": "string",
          "description": "Names of the tables and views that we want to retrieve with the crawler"
        },
        "technicalName": {
          "type": "string",
          "description": "Technical names of the tables and views that we want to retrieve with the crawler"
        },
        "metadata": {
          "$ref": "#/definitions/Metadata_infos"
        }
      },
      "description": "This object contains the objects founded by the scan."
    }
  }
}