{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/talend/json-schema/talend-create-crawler-request-schema.json",
  "title": "CreateCrawlerRequest",
  "description": "Describe the crawler about to be created with the name, description, tables and views selection, user and group for the sharing policies.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/talend-crawler-api-openapi.yml#/components/schemas/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": "#/$defs/Sharing"
      }
    }
  },
  "$defs": {
    "Sharing": {
      "type": "object",
      "required": [
        "level",
        "scimId",
        "scimType"
      ],
      "description": "This object indicate the sharing informations.",
      "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"
          ]
        }
      }
    }
  }
}