POST
/
v1
/
jobs

The Response section in this topic describes the structure of the response when stream is set to false. For an example of the response when stream is set to true and an explanation of how to interpret the streaming response, refer to Streaming.

Authorizations

x-pd-api-key
string
headerrequired

Headers

x-pd-api-agent-id
string
required

The ID of the data agent. If no data agent ID is available or you want to use the general mode, set it to GENERAL.

x-pd-external-trace-id
string

The external trace ID. The length ranges from 0 to 128 characters.

Body

application/json
sessionId
string
required

The session ID.

question
string
required

The question you want Powerdrill to answer.

stream
boolean
default: false

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.

If not specified, the default value false will be used.

For details about how to understand streaming responses, see "Content description" in Streaming.

datasetId
string

The ID of the dataset to attach to the session. If not specified, the job will run without being associated with any dataset.

datasourceIdList
string[]

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
enum<string>
default: AUTO

The language in which the output is generated. Possible values are:

  • AUTO: adaptive recognition
  • EN: English
  • ES: Spanish
  • AR: Arabic
  • PT: Portuguese
  • ID: Indonesian
  • JA: Japanese
  • RU: Russian
  • HI: Hindi
  • FR: French
  • DE: German
  • VI: Vietnamese
  • TR: Turkish
  • PL: Polish
  • IT: Italian
  • KO: Korean
  • ZH-CN: Simplified Chinese
  • ZH-TW: Traditional Chinese
Available options:
AUTO,
EN,
ES,
AR,
PT,
ID,
JA,
RU,
HI,
FR,
DE,
VI,
TR,
PL,
IT,
KO,
ZH-CN,
ZH-TW
jobMode
enum<string>
default: AUTO

Job mode. Possible values are:

  • AUTO: Powerdrill automatically detects your intent and selects the appropriate job mode from data analysis and information retrieval.
  • DATA_ANALYTICS: Powerdrill focuses specifically on data analysis.
Available options:
AUTO,
DATA_ANALYTICS
answerConfig
object

Response

200 - application/json
code
integer
required

Status code. 0 indicates that the operation is successful. Otherwise, the operation fails. Possible error codes include:

  • 100112: The modelGroup parameter must be set to its default value.
  • 1003: Authentication failed. Please check if the API key is correct.
  • 210020: An error occurred during job execution. Please try again.
  • 210021: Job quota exceeded. Please review your usage limits.
  • 210022: The question is too long. Please shorten it and try again.
  • 210023: The selected data sources are not yet ready. Only data sources in the Synched state are available for use.
  • 210024: The text is too long for the text-to-speech service. The maximum allowed length is 5000 characters.
  • 210025: Too many data sources selected. You can select up to 1,000 data sources.
data
object
required