{
  "openapi": "3.0.1",
  "info": {
    "title": "Team Open API",
    "description": "",
    "version": "1.0.0"
  },
  "tags": [
    {
      "name": "Session"
    },
    {
      "name": "Dataset"
    },
    {
      "name": "Data source"
    },
    {
      "name": "File"
    },
    {
      "name": "Job"
    }
  ],
  "paths": {
    "/v1/team/sessions": {
      "post": {
        "summary": "Create session",
        "deprecated": false,
        "description": "Creates a session. \nA session refers to the continuous interaction between the user and Powerdrill within a conversation. Your team can have up to 150 sessions simultaneously. If the limit is reached, you can remove unnecessary sessions to make space for new ones.",
        "tags": [
          "Session"
        ],
        "parameters": [
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "The session name, which can be up to 128 characters in length. If it exceeds this limit, it will be truncated."
                  },
                  "languageType": {
                    "type": "string",
                    "description": "The language in which the output is generated. Possible values are:\n- `AUTO`: adaptive recognition\n- `EN`: English\n- `ES`: Spanish\n- `AR`: Arabic\n- `PT`: Portuguese\n- `ID`: Indonesian\n- `JA`: Japanese\n- `RU`: Russian\n- `HI`: Hindi\n- `FR`: French\n- `DE`: German\n- `VI`: Vietnamese\n- `TR`: Turkish\n- `PL`: Polish\n- `IT`: Italian\n- `KO`: Korean\n- `ZH-CN`: Simplified Chinese\n- `ZH-TW`: Traditional Chinese",
                    "enum": [
                      "AUTO",
                      "EN",
                      "ES",
                      "AR",
                      "PT",
                      "ID",
                      "JA",
                      "RU",
                      "HI",
                      "FR",
                      "DE",
                      "VI",
                      "TR",
                      "PL",
                      "IT",
                      "KO",
                      "ZH-CN",
                      "ZH-TW"
                    ],
                    "default": "AUTO"
                  },
                  "jobMode": {
                    "type": "string",
                    "description": "Job mode. Possible values are:\n- `AUTO`: Powerdrill automatically detects your intent and selects the appropriate job mode from data analysis and information retrieval.\n- `DATA_ANALYTICS`: Powerdrill focuses specifically on data analysis.",
                    "enum": [
                      "AUTO",
                      "DATA_ANALYTICS"
                    ],
                    "default": "AUTO"
                  },
                  "maxMessagesInContext": {
                    "type": "integer",
                    "description": "The maximum number of messages retained per session, with a value range of 0 to 10. The default is 10.\n\nYou can set it to 0 if you don't want your answer is to contain any context of job history.",
                    "default": 10
                  },
                  "agentId": {
                    "type": "string",
                    "description": "The ID of the agent. You don't need to specify it or set it to **DATA_ANALYSIS_AGENT**.",
                    "default": "DATA_ANALYSIS_AGENT"
                  },
                  "userId": {
                    "type": "string",
                    "description": "Your user ID. \n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click Users in the top navigation bar, and find your user ID in the list of users."
                  }
                },
                "required": [
                  "title",
                  "userId"
                ]
              },
              "example": {
                "title": "My session",
                "languageType": "AUTO",
                "jobMode": "AUTO",
                "maxMessagesInContext": 10,
                "userId": "tmm-egejgowqg=g=egen"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "description": "The returned data object.",
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The session ID."
                        }
                      },
                      "required": [
                        "id"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "Success example",
                    "value": {
                      "code": 0,
                      "data": {
                        "id": "session-dasfasdgasdgfasdgasdg"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      },
      "get": {
        "summary": "List sessions",
        "deprecated": false,
        "description": "Lists sessions in your team.",
        "tags": [
          "Session"
        ],
        "parameters": [
          {
            "name": "pageNumber",
            "in": "query",
            "description": "The number of pages to display. If not specified, the default value `1` will be used.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The number of items on a single page. If not specified, the default value `10` will be used.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10
            }
          },
          {
            "name": "userId",
            "in": "query",
            "description": "Your user ID. \n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "title",
            "in": "query",
            "description": "The search keyword. Sessions with names containing this keyword will be listed. If omitted, all sessions created by you will be listed.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "description": "The total number of pages."
                        },
                        "pageNumber": {
                          "type": "integer",
                          "description": "The number of pages returned."
                        },
                        "pageSize": {
                          "type": "integer",
                          "description": "The number of items displayed per page."
                        },
                        "records": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The session ID."
                              },
                              "title": {
                                "type": "string",
                                "description": "The session name."
                              },
                              "languageType": {
                                "type": "string",
                                "description": "The language in which the output is generated. Possible values are:\n- `AUTO`: adaptive recognition\n- `EN`: English\n- `ES`: Spanish\n- `AR`: Arabic\n- `PT`: Portuguese\n- `ID`: Indonesian\n- `JA`: Japanese\n- `RU`: Russian\n- `HI`: Hindi\n- `FR`: French\n- `DE`: German\n- `VI`: Vietnamese\n- `TR`: Turkish\n- `PL`: Polish\n- `IT`: Italian\n- `KO`: Korean\n- `ZH-CN`: Simplified Chinese\n- `ZH-TW`: Traditional Chinese",
                                "enum": [
                                  "AUTO",
                                  "EN",
                                  "ES",
                                  "AR",
                                  "PT",
                                  "ID",
                                  "JA",
                                  "RU",
                                  "HI",
                                  "FR",
                                  "DE",
                                  "VI",
                                  "TR",
                                  "PL",
                                  "IT",
                                  "KO",
                                  "ZH-CN",
                                  "ZH-TW"
                                ]
                              },
                              "jobMode": {
                                "type": "string",
                                "description": "Job mode. Possible values are:\n- `AUTO`: Powerdrill automatically detects your intent and selects the appropriate job mode from data analysis and information retrieval.\n- `DATA_ANALYTICS`: Powerdrill focuses specifically on data analysis.",
                                "enum": [
                                  "AUTO",
                                  "DATA_ANALYTICS"
                                ]
                              },
                              "maxMessagesInContext": {
                                "type": "integer",
                                "description": "The maximum number of messages retained per session, with a value range of 0 to 10. The default is 10.",
                                "minimum": 0,
                                "maximum": 10
                              },
                              "agentId": {
                                "type": "string",
                                "description": "The ID of the agent to use. You can leave it blank or set it to **DATA_ANALYSIS_AGENT**."
                              }
                            },
                            "description": "The information about each record.",
                            "required": [
                              "title",
                              "languageType",
                              "maxMessagesInContext",
                              "jobMode",
                              "id",
                              "agentId"
                            ]
                          },
                          "description": "The list of records contained in the session."
                        }
                      },
                      "required": [
                        "total",
                        "pageNumber",
                        "pageSize",
                        "records"
                      ],
                      "description": "The returned data object."
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "Success example",
                    "value": {
                      "code": 0,
                      "data": {
                        "total": 8,
                        "pageSize": 10,
                        "pageNumber": 1,
                        "records": [
                          {
                            "id": "04b69928-532d-408a-8716-8f5e70fcacc6",
                            "title": "Finding Your Inner Spark",
                            "languageType": "AUTO",
                            "jobMode": "AUTO",
                            "maxMessagesInContext": 10,
                            "agentId": "DATA_ANALYSIS_AGENT",
                            "userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
                          },
                          {
                            "id": "7e9941af-ad1b-4834-a421-4b37b54aae19",
                            "title": "session_trade_analyze_001",
                            "languageType": "EN",
                            "jobMode": "AUTO",
                            "maxMessagesInContext": 1,
                            "agentId": "DATA_ANALYSIS_AGENT",
                            "userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
                          },
                          {
                            "id": "a137ecc8-9554-42c3-b042-2458dd2aeb36",
                            "title": "My first session",
                            "languageType": "AUTO",
                            "jobMode": "AUTO",
                            "maxMessagesInContext": 10,
                            "agentId": "DATA_ANALYSIS_AGENT",
                            "userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
                          },
                          {
                            "id": "4440ab38-3df0-465b-a66c-bf6acb0f1bc2",
                            "title": "New Title",
                            "languageType": "EN",
                            "jobMode": "AUTO",
                            "maxMessagesInContext": 10,
                            "agentId": "DATA_ANALYSIS_AGENT",
                            "userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
                          },
                          {
                            "id": "3eb5e294-11eb-4bf0-8854-7177c415d15c",
                            "title": "trade_analyze_001",
                            "languageType": "ZH-CN",
                            "jobMode": "AUTO",
                            "maxMessagesInContext": 10,
                            "agentId": "DATA_ANALYSIS_AGENT",
                            "userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
                          },
                          {
                            "id": "ccca6d34-894f-4f6f-a8b5-c9df93126309",
                            "title": "lhtest-old",
                            "languageType": "ZH-CN",
                            "jobMode": "AUTO",
                            "maxMessagesInContext": 5,
                            "agentId": "DATA_ANALYSIS_AGENT",
                            "userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
                          },
                          {
                            "id": "c28a1f47-da68-4456-bb0b-e85bf5a0e98e",
                            "title": "lhtest-newest",
                            "languageType": "ZH-TW",
                            "jobMode": "AUTO",
                            "maxMessagesInContext": 6,
                            "agentId": "DATA_ANALYSIS_AGENT",
                            "userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
                          },
                          {
                            "id": "fbde9b45-69cd-408e-97d1-f874236aadac",
                            "title": "General-session",
                            "languageType": "ZH-CN",
                            "jobMode": "AUTO",
                            "maxMessagesInContext": 10,
                            "agentId": "DATA_ANALYSIS_AGENT",
                            "userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      }
    },
    "/v1/team/sessions/{sessionId}": {
      "post": {
        "summary": "Modify session",
        "deprecated": false,
        "description": "Modifies the configuration of the specified session.",
        "tags": [
          "Session"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "description": "The ID of the session to modify.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "description": "Your user ID. \n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "The new session name.\n\nSpecify at least one parameter: `title`, `languageType`, `jobMode`, or `maxMessagesInContext`."
                  },
                  "languageType": {
                    "type": "string",
                    "description": "The new language in which the output is generated. Possible values are:\n- `AUTO`: adaptive recognition\n- `EN`: English\n- `ES`: Spanish\n- `AR`: Arabic\n- `PT`: Portuguese\n- `ID`: Indonesian\n- `JA`: Japanese\n- `RU`: Russian\n- `HI`: Hindi\n- `FR`: French\n- `DE`: German\n- `VI`: Vietnamese\n- `TR`: Turkish\n- `PL`: Polish\n- `IT`: Italian\n- `KO`: Korean\n- `ZH-CN`: Simplified Chinese\n- `ZH-TW`: Traditional Chinese\n\nSpecify at least one parameter: `title`, `languageType`, `jobMode`, or `maxMessagesInContext`.",
                    "enum": [
                      "AUTO",
                      "EN",
                      "ES",
                      "AR",
                      "PT",
                      "ID",
                      "JA",
                      "RU",
                      "HI",
                      "FR",
                      "DE",
                      "VI",
                      "TR",
                      "PL",
                      "IT",
                      "KO",
                      "ZH-CN",
                      "ZH-TW"
                    ],
                    "default": "AUTO"
                  },
                  "jobMode": {
                    "type": "string",
                    "description": "The new job mode. Possible values are:\n- `AUTO`: Powerdrill automatically detects your intent and selects the appropriate job mode from data analysis and information retrieval.\n- `DATA_ANALYTICS`: Powerdrill focuses specifically on data analysis.\n\nSpecify at least one parameter: `title`, `languageType`, `jobMode`, or `maxMessagesInContext`.",
                    "enum": [
                      "AUTO",
                      "DATA_ANALYTICS"
                    ],
                    "default": "AUTO"
                  },
                  "maxMessagesInContext": {
                    "type": "integer",
                    "description": "The new maximum number of messages retained per session, with a value range of 0 to 10. The default is 10.\n\nSpecify at least one parameter: `title`, `languageType`, `jobMode`, or `maxMessagesInContext`.",
                    "default": 10
                  }
                }
              },
              "example": {
                "title": "annual_review",
                "languageType": "AUTO",
                "jobMode": "AUTO",
                "maxMessagesInContext": 7
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {},
                      "description": "Null is returned when the operation is successful."
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      },
      "delete": {
        "summary": "Delete session",
        "deprecated": false,
        "description": "Deletes a session. Once deleted, both the session and its job history will be permanently removed and cannot be recovered.",
        "tags": [
          "Session"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "description": "The session ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "description": "Your user ID. \n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {},
                      "description": "Null is returned when the operation is successful."
                    }
                  },
                  "required": [
                    "code"
                  ]
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      },
      "get": {
        "summary": "Get session",
        "deprecated": false,
        "description": "Obtains information about the specified session.",
        "tags": [
          "Session"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "description": "The session ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "description": "Your user ID. \n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "$ref": "#/components/schemas/SessionModelDTO",
                      "description": "The returned data object."
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "Success example",
                    "value": {
                      "code": 0,
                      "data": {
                        "id": "gegecgthgod3hgt",
                        "title": "Analyze performance",
                        "languageType": "AUTO",
                        "jobMode": "AUTO",
                        "maxMessagesInContext": 10,
                        "agentId": "DATA_ANALYSIS_AGENT",
                        "userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      }
    },
    "/v1/team/sessions/{sessionId}/history": {
      "get": {
        "summary": "Get job history in session",
        "deprecated": false,
        "description": "Obtains the job history contained in the specified session.",
        "tags": [
          "Session"
        ],
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "description": "The session ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "The number of pages to display. If not specified, the default value `1` will be used.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The number of items on a single page. If not specified, the default value `10` will be used.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "description": "Your user ID. \n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "description": "The total number of pages displayed."
                        },
                        "pageNumber": {
                          "type": "integer",
                          "description": "The number of pages returned."
                        },
                        "pageSize": {
                          "type": "integer",
                          "description": "The number of items displayed per page."
                        },
                        "records": {
                          "type": "array",
                          "items": {
                            "description": "The information about each record.",
                            "type": "object",
                            "properties": {
                              "question": {
                                "description": "The user's question.",
                                "type": "object",
                                "properties": {
                                  "blocks": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "enum": [
                                            "MESSAGE",
                                            "CODE",
                                            "TABLE",
                                            "IMAGE",
                                            "SOURCES",
                                            "QUESTIONS"
                                          ],
                                          "description": "The block type."
                                        },
                                        "content": {
                                          "type": "string",
                                          "description": "The block content."
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "content"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "blocks"
                                ]
                              },
                              "answer": {
                                "description": "The answer to the question.",
                                "type": "object",
                                "properties": {
                                  "blocks": {
                                    "type": "array",
                                    "items": {
                                      "$ref": "#/components/schemas/BlockDTO"
                                    }
                                  }
                                },
                                "required": [
                                  "blocks"
                                ]
                              },
                              "jobId": {
                                "type": "string",
                                "description": "The job ID."
                              }
                            },
                            "required": [
                              "question",
                              "answer",
                              "jobId"
                            ]
                          },
                          "description": "The list of returned records."
                        }
                      },
                      "required": [
                        "total",
                        "pageNumber",
                        "pageSize",
                        "records"
                      ],
                      "description": "The returned data object."
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "Success example",
                    "value": {
                      "code": 0,
                      "data": {
                        "total": 0,
                        "pageNumber": 1,
                        "pageSize": 10,
                        "records": [
                          {
                            "jobId": "job-1dsfasddfasgddsaffds",
                            "question": {
                              "blocks": [
                                {
                                  "type": "MESSAGE",
                                  "content": "Check for negative values across all sales columns"
                                }
                              ]
                            },
                            "answer": {
                              "blocks": [
                                {
                                  "type": "MESSAGE",
                                  "content": "- Check for negative values across all sales columns.\n- Filter the DataFrame to retain only rows with no negative sales values.",
                                  "groupId": "ba582fc9-bb36-4c5d-a8e8-d35bda6389cd",
                                  "groupName": "Identify the channels with negative sales values by examining each day's sales data. Filter out the rows where any sales value is negative.",
                                  "stage": "Analyze"
                                },
                                {
                                  "type": "CODE",
                                  "content": "```python\n\nimport pandas as pd\n\ndef invoke(input_0: pd.DataFrame) -> pd.DataFrame:\n    '''\n    input_0: pd.DataFrame  SalesByChannelByDay_Summary_Demo.Sheet1_0_table_1.csv\n    '''\n    # Identify columns that represent sales data (all except the first column)\n    sales_columns = input_0.columns[1:]\n    \n    # Filter rows where any sales value is negative\n    filtered_df = input_0[~(input_0[sales_columns] < 0).any(axis=1)]\n    \n    # Assign the result to the output variable\n    output = filtered_df\n    \n    return output\n\n```",
                                  "groupId": "ba582fc9-bb36-4c5d-a8e8-d35bda6389cd",
                                  "groupName": "Identify the channels with negative sales values by examining each day's sales data. Filter out the rows where any sales value is negative.",
                                  "stage": "Analyze"
                                },
                                {
                                  "type": "TABLE",
                                  "content": "https://s3.amazonaws.com/powerdrilltest/tmp_datasource_cache/code_result/clvl4cad2001q01l1m522hxlu/baf7d6d1-fb81-4fdb-bcdd-32923d214c7b.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241018T104617Z&X-Amz-SignedHeaders=host&X-Amz-Expires=599&X-Amz-Credential=AKIARLSQLXURHEIDN4OZ%2F20241018%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=9bcb5af552793f162e35f41d62fb9306cf90888924bfbdce81ea687265fddf83",
                                  "groupId": "ba582fc9-bb36-4c5d-a8e8-d35bda6389cd",
                                  "groupName": "Identify the channels with negative sales values by examining each day's sales data. Filter out the rows where any sales value is negative.",
                                  "stage": "Analyze"
                                },
                                {
                                  "type": "MESSAGE",
                                  "content": "- Sum the sales across all days for each channel.\n- Create a new DataFrame with the channel names and their corresponding total sales.",
                                  "groupId": "47183fd1-307b-4408-9986-e9238d952ec1",
                                  "groupName": "Calculate the overall sales trend for the identified channels with negative sales values. This involves summing up the sales across all days for each channel and analyzing the trend.",
                                  "stage": "Analyze"
                                },
                                {
                                  "type": "CODE",
                                  "content": "```python\n\nimport pandas as pd\n\ndef invoke(negative_sales_channels: pd.DataFrame) -> pd.DataFrame:\n    '''\n    negative_sales_channels: pd.DataFrame  negative_sales_channels.csv\n    '''\n    # Sum the sales across all days for each channel\n    total_sales = negative_sales_channels.iloc[:, 1:].sum(axis=1)\n    \n    # Create a new DataFrame with the channel names and their corresponding total sales\n    output = pd.DataFrame({\n        'Channel': negative_sales_channels.iloc[:, 0],\n        'Total Sales': total_sales\n    })\n    \n    return output\n\n```",
                                  "groupId": "47183fd1-307b-4408-9986-e9238d952ec1",
                                  "groupName": "Calculate the overall sales trend for the identified channels with negative sales values. This involves summing up the sales across all days for each channel and analyzing the trend.",
                                  "stage": "Analyze"
                                },
                                {
                                  "type": "TABLE",
                                  "content": "https://s3.amazonaws.com/powerdrilltest/tmp_datasource_cache/code_result/clvl4cad2001q01l1m522hxlu/10cffac2-8bf3-45f4-86e6-1ed8457329f2.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241018T104617Z&X-Amz-SignedHeaders=host&X-Amz-Expires=600&X-Amz-Credential=AKIARLSQLXURHEIDN4OZ%2F20241018%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=c6f5b522d2ddceea730304b86a45d5f5165f05f9fda3c1d275d11e9022c1e7ac",
                                  "groupId": "47183fd1-307b-4408-9986-e9238d952ec1",
                                  "groupName": "Calculate the overall sales trend for the identified channels with negative sales values. This involves summing up the sales across all days for each channel and analyzing the trend.",
                                  "stage": "Analyze"
                                },
                                {
                                  "type": "MESSAGE",
                                  "content": "- Replace any negative sales values with zero in the data.\n- Sum the sales across all days for each channel.\n- Create a new data structure with the summed sales values.",
                                  "groupId": "6b93c2b1-8908-4c2b-afb2-2a81f2d24739",
                                  "groupName": "Calculate the overall sales trend for the same channels but excluding the negative sales values. This involves setting negative values to zero or removing them and then summing up the sales across all days for each channel.",
                                  "stage": "Analyze"
                                },
                                {
                                  "type": "CODE",
                                  "content": "```python\n\nimport pandas as pd\n\ndef invoke(negative_sales_channels: pd.DataFrame) -> pd.DataFrame:\n    '''\n    negative_sales_channels: pd.DataFrame  negative_sales_channels.csv\n    '''\n    # Replace negative values with zero\n    negative_sales_channels.iloc[:, 1:] = negative_sales_channels.iloc[:, 1:].clip(lower=0)\n    \n    # Sum the sales across all days for each channel\n    sales_sum = negative_sales_channels.iloc[:, 1:].sum(axis=1)\n    \n    # Create a new DataFrame with the summed sales values\n    output = pd.DataFrame({\n        'Channel': negative_sales_channels.iloc[:, 0],\n        'Total Sales': sales_sum\n    })\n    \n    return output\n\n```",
                                  "groupId": "6b93c2b1-8908-4c2b-afb2-2a81f2d24739",
                                  "groupName": "Calculate the overall sales trend for the same channels but excluding the negative sales values. This involves setting negative values to zero or removing them and then summing up the sales across all days for each channel.",
                                  "stage": "Analyze"
                                },
                                {
                                  "type": "TABLE",
                                  "content": "https://s3.amazonaws.com/powerdrilltest/tmp_datasource_cache/code_result/clvl4cad2001q01l1m522hxlu/f4c99616-dd7c-48b1-8a35-d3141d732c36.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241018T104617Z&X-Amz-SignedHeaders=host&X-Amz-Expires=600&X-Amz-Credential=AKIARLSQLXURHEIDN4OZ%2F20241018%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=d21a8d939ab09547bc201754ba253ca6c0d1da5361752f2228237e3ff59be256",
                                  "groupId": "6b93c2b1-8908-4c2b-afb2-2a81f2d24739",
                                  "groupName": "Calculate the overall sales trend for the same channels but excluding the negative sales values. This involves setting negative values to zero or removing them and then summing up the sales across all days for each channel.",
                                  "stage": "Analyze"
                                },
                                {
                                  "type": "MESSAGE",
                                  "content": "- Merge the two datasets on the 'Channel' column to align sales data for comparison.\n- Calculate the difference in 'Total Sales' between the datasets for each channel.\n- Store the results, including channel name and calculated difference, in a new dataset.",
                                  "groupId": "3488f538-f7fc-4c0e-a265-b66e3a38d41e",
                                  "groupName": "Compare the sales trends with and without negative sales values to determine the impact of negative sales on the overall sales trend for the affected channels.",
                                  "stage": "Analyze"
                                },
                                {
                                  "type": "CODE",
                                  "content": "```python\n\nimport pandas as pd\n\ndef invoke(sales_trend_with_negatives: pd.DataFrame, sales_trend_without_negatives: pd.DataFrame) -> pd.DataFrame:\n    # Merge the two DataFrames on the 'Channel' column\n    merged_df = pd.merge(sales_trend_with_negatives, sales_trend_without_negatives, on='Channel', suffixes=('_with_negatives', '_without_negatives'))\n    \n    # Calculate the difference in 'Total Sales' between the two DataFrames\n    merged_df['Sales Difference'] = merged_df['Total Sales_without_negatives'] - merged_df['Total Sales_with_negatives']\n    \n    # Create a new DataFrame to store the results\n    output = merged_df[['Channel', 'Sales Difference']]\n    \n    return output\n\n```",
                                  "groupId": "3488f538-f7fc-4c0e-a265-b66e3a38d41e",
                                  "groupName": "Compare the sales trends with and without negative sales values to determine the impact of negative sales on the overall sales trend for the affected channels.",
                                  "stage": "Analyze"
                                },
                                {
                                  "type": "TABLE",
                                  "content": "https://s3.amazonaws.com/powerdrilltest/tmp_datasource_cache/code_result/clvl4cad2001q01l1m522hxlu/aaf4f2f7-e2db-4f2e-98ae-0bdd18f42333.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241018T104617Z&X-Amz-SignedHeaders=host&X-Amz-Expires=600&X-Amz-Credential=AKIARLSQLXURHEIDN4OZ%2F20241018%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=19fcfe97c70bf40292b920ecbf0299c101e1de11e49b54fb8f62934b6e874f52",
                                  "groupId": "3488f538-f7fc-4c0e-a265-b66e3a38d41e",
                                  "groupName": "Compare the sales trends with and without negative sales values to determine the impact of negative sales on the overall sales trend for the affected channels.",
                                  "stage": "Analyze"
                                },
                                {
                                  "type": "MESSAGE",
                                  "content": "\n\n`Analyzing Conclusions` \n\n### The impact of negative sales values on overall sales trends\n\n#### Sales variance analysis\n\n",
                                  "groupId": "fd1a62e6-48cf-4ac1-8bac-025665444710",
                                  "groupName": "Conclusions",
                                  "stage": "Respond"
                                },
                                {
                                  "type": "TABLE",
                                  "content": "https://s3.amazonaws.com/powerdrilltest/tmp_datasource_cache/code_result/clvl4cad2001q01l1m522hxlu/aaf4f2f7-e2db-4f2e-98ae-0bdd18f42333.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241018T104617Z&X-Amz-SignedHeaders=host&X-Amz-Expires=600&X-Amz-Credential=AKIARLSQLXURHEIDN4OZ%2F20241018%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=19fcfe97c70bf40292b920ecbf0299c101e1de11e49b54fb8f62934b6e874f52",
                                  "groupId": "fd1a62e6-48cf-4ac1-8bac-025665444710",
                                  "groupName": "Conclusions",
                                  "stage": "Respond"
                                },
                                {
                                  "type": "MESSAGE",
                                  "content": "\n\n- **Sales variance**：In all channels (including EC, JD, Tmall, WeChat, retail, corporate stores, outlets, and total), the sales difference is 0.0. This indicates that regardless of the presence of negative sales values, the sales trend has not changed.\n\n#### Conclusion and Insights\n- **The impact of negative sales values**：Based on the provided data, negative sales values have no impact on the overall sales trend of the affected channels, as the sales variance for all channels is 0.0.\n- **Data consistency**：The sales discrepancies across all channels are consistent, indicating that there are no anomalies or deviations caused by negative sales values during data processing or analysis.",
                                  "groupId": "fd1a62e6-48cf-4ac1-8bac-025665444710",
                                  "groupName": "Conclusions",
                                  "stage": "Respond"
                                },
                                {
                                  "type": "SOURCES",
                                  "content": [
                                    {
                                      "source": "SalesByChannelByDay_Summary_Demo.xlsx",
                                      "datasourceId": "cm2ej4wmo000001fcdkwbdrml",
                                      "datasetId": "cm2ej4vx900hp01l1o378zr9o",
                                      "fileType": "xlsx",
                                      "externalId": ""
                                    }
                                  ],
                                  "groupId": "",
                                  "groupName": "",
                                  "stage": "Respond"
                                },
                                {
                                  "type": "QUESTIONS",
                                  "content": [
                                    "Analyze the specific channels with negative sales values on different dates and discuss whether the sales strategies of these channels might lead to negative values.",
                                    "Study the long-term impact of negative sales values on overall sales trends and assess whether adjustments to data analysis methods are needed to more accurately reflect the actual situation.",
                                    "Investigate the source of negative sales values, whether they are related to returns, discounts, or other factors, and propose possible solutions to reduce the occurrence of negative values."
                                  ],
                                  "groupId": "-1",
                                  "stage": "Respond"
                                }
                              ]
                            }
                          }
                        ]
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      }
    },
    "/v1/team/datasets": {
      "post": {
        "summary": "Create dataset",
        "deprecated": false,
        "description": "Creates a dataset. \nA dataset is a collection of data sources organized for specific purposes. You can create multiple datasets to group and store data sources based on different needs.",
        "tags": [
          "Dataset"
        ],
        "parameters": [
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The dataset name."
                  },
                  "description": {
                    "type": "string",
                    "description": "The dataset description."
                  },
                  "userId": {
                    "type": "string",
                    "description": "Your user ID. \n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users."
                  }
                },
                "required": [
                  "name",
                  "userId"
                ]
              },
              "example": {
                "name": "My dataset",
                "description": "my default dataset",
                "userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The dataset ID."
                        }
                      },
                      "required": [
                        "id"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "Success example",
                    "value": {
                      "code": 0,
                      "data": {
                        "id": "dataset-adsdfasafdsfasdgasd"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      },
      "get": {
        "summary": "List datasets",
        "deprecated": false,
        "description": "Lists datasets in your team or of the specified name.",
        "tags": [
          "Dataset"
        ],
        "parameters": [
          {
            "name": "pageNumber",
            "in": "query",
            "description": "The number of pages to display. If not specified, the default value `1` will be used.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The number of items on a single page. If not specified, the default value `10` will be used.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "The keyword for search. Any dataset with its name or description that matches the keyword will be returned.\n\nIt not specified, all datasets will be returned.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "pageNumber": {
                          "type": "integer",
                          "description": "The number of pages returned."
                        },
                        "pageSize": {
                          "type": "integer",
                          "description": "The number of items displayed per page."
                        },
                        "total": {
                          "type": "integer",
                          "description": "The total number of pages."
                        },
                        "records": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/DatasetDTO"
                          },
                          "description": "The list of datasets."
                        }
                      },
                      "required": [
                        "pageNumber",
                        "pageSize",
                        "total",
                        "records"
                      ],
                      "description": "The returned data object."
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "Success example",
                    "value": {
                      "code": 0,
                      "data": {
                        "pageNumber": 1,
                        "pageSize": 10,
                        "total": 1,
                        "records": [
                          {
                            "id": "dataset-dasfadsgadsgas",
                            "name": "mysql",
                            "description": "mysql databases"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      }
    },
    "/v1/team/datasets/{datasetId}": {
      "delete": {
        "summary": "Delete dataset",
        "deprecated": false,
        "description": "Deletes the specified dataset. Once deleted, all data sources within the dataset will also be permanently removed and cannot be recovered.",
        "tags": [
          "Dataset"
        ],
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "description": "The dataset ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "description": "Your user ID. \n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {},
                      "description": "Null is returned when the operation is successful."
                    }
                  },
                  "required": [
                    "code"
                  ]
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      },
      "post": {
        "summary": "Modify dataset",
        "deprecated": false,
        "description": "Modifies information about the specified dataset.",
        "tags": [
          "Dataset"
        ],
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "description": "The dataset ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "description": "Your user ID. \n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The new name of the dataset.\n\n`name` and `description` cannot be both blank."
                  },
                  "description": {
                    "type": "string",
                    "description": "The new description of the dataset. \n\n`name` and `description` cannot be both blank."
                  }
                }
              },
              "example": {
                "name": "sales_data",
                "description": "sales data of all regions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {},
                      "description": "Null is returned when the operation is successful."
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      }
    },
    "/v1/team/datasets/{datasetId}/status": {
      "get": {
        "summary": "Get dataset status",
        "deprecated": false,
        "description": "Datasets are stateless. This endpoint allows you to check the current statuses of data sources in the specified dataset to determine if the dataset is ready for running your jobs. \n\nA dataset is fully synchronized only when both `invalidCount` and `synchingCount` in the response are `0`. Otherwise, the data sources that are not synchronized cannot be accessed.",
        "tags": [
          "Dataset"
        ],
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "description": "The dataset ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "synchedCount": {
                          "type": "integer",
                          "description": "The number of data sources that are synchronized."
                        },
                        "invalidCount": {
                          "type": "integer",
                          "description": "The number of data sources failed to be synchronized."
                        },
                        "synchingCount": {
                          "type": "integer",
                          "description": "The number of data sources waiting to be synchronized or being synchronized."
                        }
                      },
                      "description": "The returned data object. Your dataset is fully synchronized only when both `invalidCount` and `synchingCount` are `0`. Otherwise, starting a conversation immediately cannot fetching data from data sourcs that are not synchronized.",
                      "required": [
                        "synchedCount",
                        "invalidCount",
                        "synchingCount"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "Success example",
                    "value": {
                      "code": 0,
                      "data": {
                        "synchedCount": 5,
                        "invalidCount": 0,
                        "synchingCount": 0
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      }
    },
    "/v1/team/datasets/{datasetId}/overview": {
      "get": {
        "summary": "Get dataset overview",
        "deprecated": false,
        "description": "Obtains the basic information about the dataset, including the keywords, description, and pre-generated questions.",
        "tags": [
          "Dataset"
        ],
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "description": "The ID of the dataset you want to view.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "$ref": "#/components/schemas/%E8%BF%94%E5%9B%9E%E6%A8%A1%E5%9E%8B",
                      "required": [
                        "code"
                      ]
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The dataset ID, which uniquely identifies the dataset."
                        },
                        "name": {
                          "type": "string",
                          "description": "The dataset name."
                        },
                        "description": {
                          "type": "string",
                          "description": "The dataset description."
                        },
                        "summary": {
                          "type": "string",
                          "description": "Summary about data sources in the dataset."
                        },
                        "explorationQuestions": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Pre-generated questions for you to explore the dataset."
                        },
                        "keywords": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Keywords that provide insight into the dataset's content."
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "description",
                        "summary",
                        "explorationQuestions",
                        "keywords"
                      ]
                    }
                  },
                  "required": [
                    "code",
                    "data"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "success example",
                    "value": {
                      "code": {
                        "code": 0
                      },
                      "data": {
                        "id": "dset-cm5axptyyxxx298",
                        "name": "sales_indicators_2024",
                        "description": "A dataset comprising 373 travel bookings with 15 attributes, offering insights into booking patterns, pricing strategies, and more",
                        "summary": "This dataset contains 373 travel bookings with 15 attributes, enabling analysis of booking trends, pricing strategies, and travel agency dynamics.",
                        "explorationQuestions": [
                          "How does the booking price trend over time based on the BookingTimestamp?",
                          "How does the average booking price change with respect to the TravelDate?",
                          "Are there any significant outliers in the booking prices, and what might be causing them?",
                          "How does the average price vary between one-way and round-trip bookings?"
                        ],
                        "keywords": [
                          "Travel Bookings",
                          "Booking Trends",
                          "Travel Agencies"
                        ]
                      }
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": []
      }
    },
    "/v1/team/datasets/{datasetId}/datasources": {
      "post": {
        "summary": "Create data source",
        "deprecated": false,
        "description": "Creates a data source in the specified dataset. \n",
        "tags": [
          "Data source"
        ],
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "description": "The dataset ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "description": "Your user ID.\n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the data source. If not provided, it will default to the value of `fileName`."
                  },
                  "fileName": {
                    "type": "string",
                    "description": "The file name, preferably including the file extension."
                  },
                  "type": {
                    "type": "string",
                    "description": "The type of the data source. Set it to **FILE**.",
                    "title": "FILE"
                  },
                  "url": {
                    "type": "string",
                    "description": "The URL of the file for public access. \n\nOnly files with the following extensions are supported: **.csv**, **.tsv**, **.md**, **.mdx**, **.json**, **.txt**, **.pdf**, **.pptx**, **.ppt**, **.doc**, **.docx**, **.xls**, or **.xlsx**.\n\nYou must specify either `url` or `fileKey`, but not both."
                  },
                  "fileKey": {
                    "type": "string",
                    "description": "The object storage path to your locally uploaded file.\n\nOnly files with the following extensions are supported: **.csv**, **.tsv**, **.md**, **.mdx**, **.json**, **.txt**, **.pdf**, **.pptx**, **.ppt**, **.doc**, **.docx**, **.xls**, or **.xlsx**.\n\nEach time you upload a file through the [Upload file](/api-reference/upload-file) endpoint, its `fileKey` is returned. For more details, see [How to Upload Local Files](/developer-guides/upload-file).\n\nYou must specify either `url` or `fileKey`, but not both."
                  },
                  "userId": {
                    "type": "string",
                    "description": "Your user ID. \n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users."
                  }
                },
                "required": [
                  "fileName",
                  "type",
                  "userId"
                ]
              },
              "example": {
                "name": "test.csv",
                "fileName": "test.csv",
                "type": "FILE",
                "url": "https://s3.amazonaws.com/powerdrilltest/user/clvl4cad2001q01l1m522hxlu/upload/f9773f1e-cd68-489a-8121-d566ca9218b1.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20240924T143419Z&X-Amz-SignedHeaders=host&X-Amz-Expires=599&X-Amz-Credential=AKIARLSQLXURHEIDN4OZ%2F20240924%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=9ca0c58d508926a5811818041d557ffb53c64025dae94c0855280d457c7089a2",
                "userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "$ref": "#/components/schemas/DatasourceDTO",
                      "description": "The returned data object."
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "Success example",
                    "value": {
                      "code": 0,
                      "data": {
                        "id": "datasource-cadsgfsdagasgadsg",
                        "datasetId": "dataset-dagasdgasgasg",
                        "name": "test.csv",
                        "fileName": "test.csv",
                        "type": "FILE",
                        "status": "pending"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      },
      "get": {
        "summary": "List data sources",
        "deprecated": false,
        "description": "Lists data sources contained in the specified dataset.",
        "tags": [
          "Data source"
        ],
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "description": "The dataset ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "description": "The number of pages to display. If not specified, the default value `1` will be used.",
            "required": false,
            "example": 0,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "The number of items on a single page. If not specified, the default value `10` will be used.",
            "required": false,
            "example": 0,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "The status of data sources to list. Possible values are:\n- `invalid`: Awaiting processing.\n- `synching`: Currently processing.\n- `synched`: Successfully synchronized.\nIf not specified, data sources in any status will be returned.\nMultiple statuses can be specified in a comma-separated list, and data sources matching any will be displayed.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string",
              "enum": [
                "synching",
                "invalid",
                "synched"
              ]
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "description": "The total number of pages."
                        },
                        "pageSize": {
                          "type": "integer",
                          "description": "The number of items displayed per page."
                        },
                        "pageNumber": {
                          "type": "integer",
                          "description": "The number of pages displayed."
                        },
                        "records": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The data source ID, which uniquely identifies the data source."
                              },
                              "datasetId": {
                                "type": "string",
                                "description": "The dataset ID."
                              },
                              "name": {
                                "type": "string",
                                "description": "The data source name."
                              },
                              "fileName": {
                                "type": "string",
                                "description": "The file name."
                              },
                              "type": {
                                "type": "string",
                                "description": "The type of the data source, which is fixed to **FILE**.",
                                "enum": [
                                  "FILE"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "description": "The processing status of the data source. Possible values are:\n- `invalid`: Awaiting processing.\n- `synching`: Currently processing.\n- `synched`: Successfully synchronized.",
                                "enum": [
                                  "synching",
                                  "synched",
                                  "invalid"
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "datasetId",
                              "name",
                              "fileName",
                              "type",
                              "status"
                            ]
                          }
                        }
                      },
                      "required": [
                        "total",
                        "pageSize",
                        "pageNumber",
                        "records"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "Success example",
                    "value": {
                      "code": 0,
                      "data": {
                        "total": 1,
                        "pageSize": 10,
                        "pageNumber": 1,
                        "records": [
                          {
                            "id": "datasource-cadsgfsdagasgadsg",
                            "datasetId": "dataset-dagasdgasgasg",
                            "name": "test.csv",
                            "fileName": "test.csv",
                            "type": "FILE",
                            "status": "pending"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      }
    },
    "/v1/team/datasets/{datasetId}/datasources/{datasourceId}": {
      "delete": {
        "summary": "Delete data source",
        "deprecated": false,
        "description": "Deletes the specified data source from the specified dataset. Once deleted, the data source cannot be recovered.\n\nYou can only delete data sources that you have created.",
        "tags": [
          "Data source"
        ],
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "description": "The ID of the dataset that contains the data source.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "datasourceId",
            "in": "path",
            "description": "The data source ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "query",
            "description": "Your user ID. \n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {},
                      "description": "Null returned when the operation is successful.",
                      "nullable": true
                    }
                  },
                  "required": [
                    "code"
                  ]
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      },
      "get": {
        "summary": "Get data source",
        "deprecated": false,
        "description": "Obtains information about the specified data source.",
        "tags": [
          "Data source"
        ],
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "description": "The ID of the dataset that contains the data source.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "datasourceId",
            "in": "path",
            "description": "The data source ID. ",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The data source ID, which uniquely identifies the data source."
                        },
                        "datasetId": {
                          "type": "string",
                          "description": "The dataset ID."
                        },
                        "name": {
                          "type": "string",
                          "description": "The data source name."
                        },
                        "fileName": {
                          "type": "string",
                          "description": "The file name."
                        },
                        "type": {
                          "type": "string",
                          "description": "The type of the data source, which is fixed to **FILE**.",
                          "enum": [
                            "FILE"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "description": "The processing status of the data source. Possible values are:\n- `invalid`: Awaiting processing.\n- `synching`: Currently processing.\n- `synched`: Successfully synchronized.",
                          "enum": [
                            "synching",
                            "synched",
                            "invalid"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "datasetId",
                        "name",
                        "fileName",
                        "type",
                        "status"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "Success example",
                    "value": {
                      "code": 0,
                      "data": {
                        "id": "datasource-cadsgfsdagasgadsg",
                        "datasetId": "dataset-dagasdgasgasg",
                        "name": "test.csv",
                        "fileName": "test.csv",
                        "type": "FILE",
                        "status": "pending"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      }
    },
    "/v1/team/datasources": {
      "post": {
        "summary": "Create data source without specifying a dataset",
        "deprecated": false,
        "description": "Creates a data source without specifying a dataset. Powerdrill will automatically create a dataset for it.",
        "tags": [
          "Data source"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "description": "Your user ID.\n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DataSourceConfig",
                "required": []
              },
              "example": {
                "name": "test.csv",
                "fileName": "test.csv",
                "type": "FILE",
                "url": "https://s3.amazonaws.com/powerdrilltest/user/clvl4cad2001q01l1m522hxlu/upload/f9773f1e-cd68-489a-8121-d566ca9218b1.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20240924T143419Z&X-Amz-SignedHeaders=host&X-Amz-Expires=599&X-Amz-Credential=AKIARLSQLXURHEIDN4OZ%2F20240924%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Signature=9ca0c58d508926a5811818041d557ffb53c64025dae94c0855280d457c7089a2",
                "fileKey": "/tmp/sdgsagdsgsadgasdg",
                "userId": "tmm-cm5m7khoz52zh07n4m7x1ut60"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "description": "The returned data object.",
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "The data source ID, which uniquely identifies the data source."
                        },
                        "datasetId": {
                          "type": "string",
                          "description": "The dataset ID."
                        },
                        "name": {
                          "type": "string",
                          "description": "The data source name."
                        },
                        "fileName": {
                          "type": "string",
                          "description": "The file name."
                        },
                        "type": {
                          "type": "string",
                          "description": "The type of the data source, which is fixed to **FILE**.",
                          "enum": [
                            "FILE"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "description": "The processing status of the data source. Possible values are:\n- `invalid`: Awaiting processing.\n- `synching`: Currently processing.\n- `synched`: Successfully synchronized.",
                          "enum": [
                            "synching",
                            "synched",
                            "invalid"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "datasetId",
                        "name",
                        "fileName",
                        "type",
                        "status"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "Success example:",
                    "value": {
                      "code": 0,
                      "data": {
                        "id": "datasource-cadsgfsdagasgadsg",
                        "datasetId": "dataset-dagasdgasgasg",
                        "name": "test.csv",
                        "fileName": "test.csv",
                        "type": "FILE",
                        "status": "pending"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      }
    },
    "/v1/team/datasets/{datasetId}/datasources/{datasourceId}/presign": {
      "post": {
        "summary": "Presign data source ",
        "deprecated": false,
        "description": "Generates a presigned URL to access the specified data source.",
        "tags": [
          "Data source"
        ],
        "parameters": [
          {
            "name": "datasetId",
            "in": "path",
            "description": "The ID of the dataset that contains the target data source.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "datasourceId",
            "in": "path",
            "description": "The data source ID.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expireIn": {
                    "type": "integer",
                    "description": "The duration after which the presigned URL will expire. The value is expressed in seconds. The minimum value is `1` and is default to `600`.",
                    "default": 600,
                    "minimum": 60
                  }
                }
              },
              "example": {
                "expireIn": 600
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "presignedUrl": {
                          "type": "string",
                          "description": "The presigned URL to access the data source."
                        },
                        "expireAt": {
                          "type": "string",
                          "format": "date-time",
                          "description": "The expiration date and time of the presigned URL."
                        }
                      },
                      "required": [
                        "presignedUrl",
                        "expireAt"
                      ],
                      "description": "The returned data object."
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "Success example",
                    "value": {
                      "code": 0,
                      "data": {
                        "presignedUrl": "string",
                        "expireAt": "2024-11-13T14:15:22.123Z"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      }
    },
    "/v1/team/file/upload-datasource": {
      "post": {
        "summary": "Upload local file",
        "deprecated": false,
        "description": "Uploads a local file in one of the following formats:  **.csv**, **.tsv**, **.md**, **.mdx**, **.json**, **.txt**, **.pdf**, **.pptx**, **.ppt**, **.doc**, **.docx**, **.xls**, or **.xlsx**.\n\nYou can use this endpoint to upload your local file and then use the `fileKey` you obtained to create a data source through the [Create data source](/api-reference/create-data-source) endpoint. For a detailed guide on how to upload a local file to create a data source, refer to [How to Upload Local Files](/developer-guides/upload-file).",
        "tags": [
          "File"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "description": "Your user ID.\n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "description": "The media type of the resource.",
            "required": true,
            "example": "multipart/form-data",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "format": "binary",
                    "type": "string",
                    "description": "The full path to the file.\n\nOnly files with the following extensions are supported: **.csv**, **.tsv**, **.md**, **.mdx**, **.json**, **.txt**, **.pdf**, **.pptx**, **.ppt**, **.doc**, **.docx**, **.xls**, or **.xlsx**.",
                    "example": ""
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "fileKey": {
                          "type": "string",
                          "description": "The object storage path to the file."
                        }
                      },
                      "required": [
                        "fileKey"
                      ],
                      "description": "The returned data object."
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "Success example:",
                    "value": {
                      "code": 0,
                      "data": {
                        "fileKey": "/tmp/sdgsagdsgsadgasdg"
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      }
    },
    "/v1/team/jobs": {
      "post": {
        "summary": "Create job",
        "deprecated": false,
        "description": "Converses with your data. Ask any question you have about your data and get insights instantly.  \n\nOn Powerdrill, a **job** refers to a task that Powerdrill performs to generate a response based on your request (e.g., a prompt or other workflows). Powerdrill Enterprise supports two types of jobs: **general jobs** and **data agent jobs**. Currently, only general jobs are available, so make sure the **x-pd-api-agent-id** header is set to **GENERAL**.  \n\n- For an in-depth explanation of **jobs**, see [What Is Job?](/enterprise/what-is-job).  \n\n- To quickly create and execute a job, see [Quick Start](/api-reference/quick-start-for-general).\n\n",
        "tags": [
          "Job"
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "query",
            "description": "Your user ID.\n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-pd-external-trace-id",
            "in": "header",
            "description": "The external trace ID. The length ranges from 0 to 128 characters.",
            "required": false,
            "example": "",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "sessionId": {
                    "type": "string",
                    "description": "The session ID."
                  },
                  "stream": {
                    "type": "boolean",
                    "description": "Whether to use stream mode. If set to `true`, Powerdrill will send real-time updates to the client, delivering continuous data as it becomes available. If set to `false`, Powerdrill will return the full response only once the entire answer is ready.\n\nIf not specified, the default value `false` will be used.\n\nFor details about how to understand streaming responses, see \"Content description\" in [Streaming](/api-reference/streaming#content-description).",
                    "default": false
                  },
                  "question": {
                    "type": "string",
                    "description": "The question you want Powerdrill to answer."
                  },
                  "datasetId": {
                    "type": "string",
                    "description": "The ID of the dataset to attach to the session. If not specified, the job will run without being associated with any dataset."
                  },
                  "datasourceIdList": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Specifies the IDs of the data sources to use in the conversation, rather than the entire dataset. You can specify up to 1,000 data sources."
                  },
                  "languageType": {
                    "type": "string",
                    "description": "The language in which the output is generated. Possible values are:\n- `AUTO`: adaptive recognition\n- `EN`: English\n- `ES`: Spanish\n- `AR`: Arabic\n- `PT`: Portuguese\n- `ID`: Indonesian\n- `JA`: Japanese\n- `RU`: Russian\n- `HI`: Hindi\n- `FR`: French\n- `DE`: German\n- `VI`: Vietnamese\n- `TR`: Turkish\n- `PL`: Polish\n- `IT`: Italian\n- `KO`: Korean\n- `ZH-CN`: Simplified Chinese\n- `ZH-TW`: Traditional Chinese",
                    "enum": [
                      "AUTO",
                      "EN",
                      "ES",
                      "AR",
                      "PT",
                      "ID",
                      "JA",
                      "RU",
                      "HI",
                      "FR",
                      "DE",
                      "VI",
                      "TR",
                      "PL",
                      "IT",
                      "KO",
                      "ZH-CN",
                      "ZH-TW"
                    ],
                    "default": "AUTO"
                  },
                  "jobMode": {
                    "type": "string",
                    "description": "Job mode. Possible values are:\n- `AUTO`: Powerdrill automatically detects your intent and selects the appropriate job mode from data analysis and information retrieval.\n- `DATA_ANALYTICS`: Powerdrill focuses specifically on data analysis.",
                    "enum": [
                      "AUTO",
                      "DATA_ANALYTICS"
                    ],
                    "default": "AUTO"
                  },
                  "answerConfig": {
                    "$ref": "#/components/schemas/answerConfig"
                  }
                },
                "required": [
                  "question",
                  "sessionId"
                ]
              },
              "example": {
                "datasetId": "cm1gjmg8e0057r3x22v1fdu8m",
                "datasourceIdList": [
                  "cm1gjmmoo0001h0x24uk1xgu9"
                ],
                "languageType": "EN",
                "question": "Hello World",
                "sessionId": "5534f591-1520-4e74-b753-b87615b2c57a",
                "stream": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n\n- **100112:** The `modelGroup` parameter must be set to its default value.\n- **1003:** Authentication failed. Please check if the API key is correct.\n- **210020:** An error occurred during job execution. Please try again.\n- **210021:** Job quota exceeded. Please review your usage limits.\n- **210022:** The question is too long. Please shorten it and try again.\n- **210023:** The selected data sources are not yet ready. Only data sources in the **Synched** state are available for use.\n- **210024:** The text is too long for the text-to-speech service. The maximum allowed length is 5000 characters.\n- **210025:** Too many data sources selected. You can select up to 1,000 data sources."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "jobId": {
                          "type": "string",
                          "description": "The job ID."
                        },
                        "blocks": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BlockDTO"
                          }
                        }
                      },
                      "required": [
                        "jobId",
                        "blocks"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "code"
                  ]
                },
                "examples": {
                  "1": {
                    "summary": "Stream=false",
                    "value": {
                      "code": 0,
                      "data": {
                        "jobId": "job-cm3ikdeuj02zk01l1yeuirt77",
                        "blocks": [
                          {
                            "type": "CODE",
                            "content": "```python\n\nimport pandas as pd\n\ndef invoke(input_0: pd.DataFrame) -> pd.DataFrame:\n    '''\n    input_0: pd.DataFrame  makeovermonday-a-century-of-global-deaths-from-disasters_decadal-deaths-disasters-type.csv\n    '''\n    # Group by 'Year' and sum the deaths for each type of disaster\n    aggregated_data = input_0.groupby('Year').sum().reset_index()\n    \n    # Select only the columns related to deaths\n    death_columns = [\n        'Deaths - Drought (decadal)', 'Deaths - Flood (decadal)', \n        'Deaths - Earthquake (decadal)', 'Deaths - Extreme weather (decadal)', \n        'Deaths - Extreme temperature (decadal)', 'Deaths - Volcanic activity (decadal)', \n        'Deaths - Wildfire (decadal)', 'Deaths - Glacial lake outburst flood (decadal)', \n        'Deaths - Dry mass movement (decadal)', 'Deaths - Wet mass movement (decadal)', \n        'Deaths - Fog (decadal)'\n    ]\n    \n    # Create a new DataFrame with the aggregated results\n    output = aggregated_data[['Year'] + death_columns]\n    \n    # Rename columns to be more descriptive\n    output.columns = ['Decade'] + [col.replace('Deaths - ', '').replace(' (decadal)', '') for col in death_columns]\n    \n    return output\n\n```",
                            "groupId": "33063572-6e88-4912-8e2d-4166bcc8caee",
                            "groupName": "Analyze the dataset to observe the trend of deaths caused by different types of natural disasters over the past century. This involves aggregating the data by decade and calculating the total number of deaths for each type of disaster to identify any changes in trends.",
                            "stage": "Analyze"
                          },
                          {
                            "type": "TABLE",
                            "content": {
                              "url": "https://static.powerdrill.ai/tmp_datasource_cache/code_result/cm37bchx106e301l1v9yf67yc/e24b6a5f-fdb8-48ca-ae35-dc91ac8e8ef7.csv",
                              "name": "trend_data.csv",
                              "expiredAt": "2024-11-21T09:56:34.290544Z"
                            },
                            "groupId": "33063572-6e88-4912-8e2d-4166bcc8caee",
                            "groupName": "Analyze the dataset to observe the trend of deaths caused by different types of natural disasters over the past century. This involves aggregating the data by decade and calculating the total number of deaths for each type of disaster to identify any changes in trends.",
                            "stage": "Analyze"
                          },
                          {
                            "type": "IMAGE",
                            "content": {
                              "url": "https://static.powerdrill.ai/tmp_datasource_cache/code_result/cm37bchx106e301l1v9yf67yc/81b75a33-a223-4954-9680-9f397872c8ad.png",
                              "name": "Trend of Deaths from Natural Disasters Over the Century",
                              "expiredAt": "2024-11-21T09:56:34.290544Z"
                            },
                            "groupId": "7501680b-5879-441b-bd96-f58b1029ae17",
                            "groupName": "Visualize the trend data to show how the number of deaths from different types of natural disasters has changed over the past century. Use line charts to represent the trends for each disaster type, which will help in understanding the impact of measures and technological advancements on reducing deaths.",
                            "stage": "Analyze"
                          },
                          {
                            "type": "MESSAGE",
                            "content": "\n\n`Analyzing Conclusions` \n\n### 自然灾害死亡人数变化趋势分析\n\n#### 数据分析\n\n",
                            "groupId": "b842aca7-6fd5-4190-85fa-97085e473877",
                            "groupName": "Conclusions",
                            "stage": "Respond"
                          },
                          {
                            "type": "TABLE",
                            "content": {
                              "url": "https://static.powerdrill.ai/tmp_datasource_cache/code_result/cm37bchx106e301l1v9yf67yc/e24b6a5f-fdb8-48ca-ae35-dc91ac8e8ef7.csv",
                              "name": "trend_data.csv",
                              "expiredAt": "2024-11-21T09:56:34.290544Z"
                            },
                            "groupId": "b842aca7-6fd5-4190-85fa-97085e473877",
                            "groupName": "Conclusions",
                            "stage": "Respond"
                          },
                          {
                            "type": "MESSAGE",
                            "content": "\n\n- **Droughts and Floods**: In the early 20th century, droughts and floods caused extremely high death tolls, particularly during the 1920s and 1930s.\n- **Earthquakes and Extreme Weather**: Earthquakes and extreme weather also led to significant death tolls throughout the century, especially in the 1970s and 1990s.\n- **Extreme Temperatures and Volcanic Activity**: These disasters had relatively lower death tolls, but in certain decades, such as the 2000s, deaths caused by extreme temperatures increased.\n\n#### Trend Visualization\n\n",
                            "groupId": "b842aca7-6fd5-4190-85fa-97085e473877",
                            "groupName": "Conclusions",
                            "stage": "Respond"
                          },
                          {
                            "type": "IMAGE",
                            "content": {
                              "url": "https://static.powerdrill.ai/tmp_datasource_cache/code_result/cm37bchx106e301l1v9yf67yc/81b75a33-a223-4954-9680-9f397872c8ad.png",
                              "name": "Trend of Deaths from Natural Disasters Over the Century",
                              "expiredAt": "2024-11-21T09:56:34.290544Z"
                            },
                            "groupId": "b842aca7-6fd5-4190-85fa-97085e473877",
                            "groupName": "Conclusions",
                            "stage": "Respond"
                          },
                          {
                            "type": "MESSAGE",
                            "content": "\n\n- **Overall Trend**: The chart shows that although certain decades experienced spikes in death tolls caused by natural disasters, the overall trend is declining.\n- **Impact of Technology and Measures**: Over time, advancements in technology and the implementation of disaster prevention measures are likely key factors in reducing death tolls.\n\n#### Conclusions and Insights\n- **Technological Advancements**: Modern technological progress, such as improved early warning systems and better construction techniques, may have reduced the fatalities caused by earthquakes and extreme weather.\n- **Disaster Prevention Measures**: The enhancement of disaster prevention measures and emergency response capabilities on a global scale has likely contributed to the decreased fatality rates of natural disasters.",
                            "groupId": "b842aca7-6fd5-4190-85fa-97085e473877",
                            "groupName": "Conclusions",
                            "stage": "Respond"
                          },
                          {
                            "type": "SOURCES",
                            "content": [
                              {
                                "source": "makeovermonday-a-century-of-global-deaths-from-disasters_decadal-deaths-disasters-type.csv",
                                "datasourceId": "clxin6l9200oo01l1457bolx3",
                                "datasetId": "clxin6l8400ok01l1ff2m0s25",
                                "fileType": "csv"
                              }
                            ],
                            "groupId": "",
                            "groupName": "",
                            "stage": "Respond"
                          },
                          {
                            "type": "QUESTIONS",
                            "content": [
                              "Analyze the trends in death tolls from different types of natural disasters over the past century and explore which disaster types have shown the most significant reduction in fatalities.",
                              "Study the technological advancements and measures in responding to natural disasters across different regions globally, and analyze how these differences have influenced changes in death tolls in each region.",
                              "Explore how future technological advancements and policy measures could further reduce fatalities caused by natural disasters, and assess their feasibility and potential impacts."
                            ],
                            "groupId": "-1",
                            "stage": "Respond"
                          }
                        ]
                      }
                    }
                  }
                }
              }
            },
            "headers": {
              "x-pd-trace-id": {
                "example": "",
                "required": true,
                "description": "The trace ID of Powerdrill.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                },
                "examples": {
                  "1": {
                    "summary": "400",
                    "value": {
                      "code": 210021,
                      "msg": "Job quota exceeded"
                    }
                  }
                }
              }
            },
            "headers": {}
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                },
                "examples": {
                  "1": {
                    "summary": "403",
                    "value": {
                      "code": 1003,
                      "msg": "insufficient.authentication"
                    }
                  }
                }
              }
            },
            "headers": {}
          },
          "500": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                },
                "examples": {
                  "1": {
                    "summary": "500",
                    "value": {
                      "code": 210020,
                      "msg": "Something went wrong during job execution. Please try again."
                    }
                  }
                }
              }
            },
            "headers": {}
          }
        },
        "security": [
          {
            "apikey-header-x-pd-api-key": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "DatasourceDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The data source ID, which uniquely identifies the data source."
          },
          "datasetId": {
            "type": "string",
            "description": "The dataset ID."
          },
          "name": {
            "type": "string",
            "description": "The data source name."
          },
          "fileName": {
            "type": "string",
            "description": "The file name."
          },
          "type": {
            "type": "string",
            "description": "The type of the data source, which is fixed to **FILE**.",
            "enum": [
              "FILE"
            ]
          },
          "status": {
            "type": "string",
            "description": "The processing status of the data source. Possible values are:\n- `invalid`: Awaiting processing.\n- `synching`: Currently processing.\n- `synched`: Successfully synchronized.",
            "enum": [
              "synching",
              "synched",
              "invalid"
            ]
          },
          "userId": {
            "type": "string",
            "description": "Your user ID. \n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users."
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "datasetId",
          "status",
          "fileName",
          "userId"
        ]
      },
      "SessionModelDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The session ID."
          },
          "title": {
            "type": "string",
            "description": "The session name."
          },
          "languageType": {
            "type": "string",
            "description": "The language in which the output is generated. Possible values are:\n- `AUTO`: adaptive recognition\n- `EN`: English\n- `ES`: Spanish\n- `AR`: Arabic\n- `PT`: Portuguese\n- `ID`: Indonesian\n- `JA`: Japanese\n- `RU`: Russian\n- `HI`: Hindi\n- `FR`: French\n- `DE`: German\n- `VI`: Vietnamese\n- `TR`: Turkish\n- `PL`: Polish\n- `IT`: Italian\n- `KO`: Korean\n- `ZH-CN`: Simplified Chinese\n- `ZH-TW`: Traditional Chinese",
            "enum": [
              "AUTO",
              "EN",
              "ES",
              "AR",
              "PT",
              "ID",
              "JA",
              "RU",
              "HI",
              "FR",
              "DE",
              "VI",
              "TR",
              "PL",
              "IT",
              "KO",
              "ZH-CN",
              "ZH-TW"
            ],
            "default": "AUTO"
          },
          "jobMode": {
            "type": "string",
            "description": "Job mode. Possible values are:\n- `AUTO`: Powerdrill automatically detects your intent and selects the appropriate job mode from data analysis and information retrieval.\n- `DATA_ANALYTICS`: Powerdrill focuses specifically on data analysis.",
            "enum": [
              "AUTO",
              "DATA_ANALYTICS"
            ],
            "default": "AUTO"
          },
          "maxMessagesInContext": {
            "type": "integer",
            "description": "The maximum number of messages retained per session, with a value range of 0 to 10. The default is 10.\n\nYou can set it to 0 if you don't want your answer is to contain any context of job history.",
            "default": 10
          },
          "agentId": {
            "type": "string",
            "description": "The ID of the agent in use, which is fixed to  **DATA_ANALYSIS_AGENT**."
          },
          "userId": {
            "type": "string",
            "description": "Your user ID. \n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users."
          }
        },
        "required": [
          "id",
          "title",
          "languageType",
          "maxMessagesInContext",
          "jobMode",
          "userId"
        ]
      },
      "DatasetDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The dataset ID, which uniquely identifies the dataset."
          },
          "name": {
            "type": "string",
            "description": "The dataset name."
          },
          "description": {
            "type": "string",
            "description": "The dataset description."
          }
        },
        "required": [
          "id",
          "name",
          "description"
        ]
      },
      "返回模型": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Status code. **0** indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include: \n- 100: Bad request. \n- 201: Request frequency limit.\n- 9999: Internal error. \n- 100001: Invalid operation. "
          }
        },
        "required": [
          "code"
        ]
      },
      "answerConfig": {
        "type": "object",
        "properties": {
          "modelGroup": {
            "type": "string",
            "description": "The model used for generating responses, for example, **default**.\n\n",
            "enum": [
              "default"
            ]
          },
          "temperature": {
            "type": "number",
            "description": "Specifies the level of randomness in the AI model's responses, ranging from **0** (safer choices) to **1** (more exploratory choices). The default value is **0**."
          }
        },
        "required": [
          "modelGroup"
        ]
      },
      "BlockDTO": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "MESSAGE",
              "CODE",
              "TABLE",
              "IMAGE",
              "SOURCES",
              "QUESTIONS"
            ],
            "description": "The block type."
          },
          "content": {
            "type": "string",
            "description": "The block content."
          },
          "groupId": {
            "type": "string",
            "description": "The ID of the group containing the block."
          },
          "groupName": {
            "type": "string",
            "description": "The name of the group containing the block."
          },
          "stage": {
            "type": "string",
            "enum": [
              "Analyze",
              "Respond"
            ],
            "description": "The stage of the block."
          }
        },
        "required": [
          "type",
          "content",
          "groupId",
          "groupName",
          "stage"
        ]
      },
      "DataSourceConfig": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the data source. If not provided, it will default to the value of `fileName`."
          },
          "fileName": {
            "type": "string",
            "description": "The file name, preferably including the file extension."
          },
          "type": {
            "type": "string",
            "description": "The type of the data source. Set it to **FILE**.",
            "title": "FILE"
          },
          "url": {
            "type": "string",
            "description": "The URL of the file for public access. \n\nOnly files with the following extensions are supported: **.csv**, **.tsv**, **.md**, **.mdx**, **.json**, **.txt**, **.pdf**, **.pptx**, **.ppt**, **.doc**, **.docx**, **.xls**, or **.xlsx**.\n\nYou must specify either `url` or `fileKey`, but not both."
          },
          "fileKey": {
            "type": "string",
            "description": "The object storage path to your locally uploaded file.\n\nOnly files with the following extensions are supported: **.csv**, **.tsv**, **.md**, **.mdx**, **.json**, **.txt**, **.pdf**, **.pptx**, **.ppt**, **.doc**, **.docx**, **.xls**, or **.xlsx**.\n\nEach time you upload a file through the [Upload file](/api-reference/upload-file) endpoint, its `fileKey` is returned. For more details, see [How to Upload Local Files](/developer-guides/upload-file).\n\nYou must specify either `url` or `fileKey`, but not both."
          },
          "userId": {
            "type": "string",
            "description": "Your user ID. \n\nHow to obtain your user ID: Sign in to Powerdrill Enterprise, click **Users** in the top navigation bar, and find your user ID in the list of users."
          }
        },
        "required": [
          "fileName",
          "type",
          "userId"
        ]
      }
    },
    "securitySchemes": {
      "apikey-header-x-pd-api-key": {
        "type": "apiKey",
        "in": "header",
        "name": "x-pd-api-key"
      }
    }
  },
  "servers": [
    {
      "url": "https://ai.data.cloud/api",
      "description": "体验环境"
    }
  ]
}
