여기에 게시된 질문(`DataExplorer::ValidationError: Missing parameter` when running Data Explorer queries with [params] via API)과 매우 유사하지만 다른 질문이 있습니다.
Data Explorer의 내 쿼리는 다음과 같습니다:
-- [params]
-- topic_id :topic_id
SELECT * FROM posts WHERE topic_id = :topic_id
Data Explorer에서는 잘 작동합니다. 하지만 API를 통해 실행하려고 하면 다음 오류가 발생합니다:
{"success":false,"errors":["DiscourseDataExplorer::ValidationError: Missing parameter topic_id of type topic_id"]}'
제 Python 요청 코드는 다음과 같습니다:
headers = {
'Content-Type': 'multipart/form-data;',
'Api-Key': API_KEY,
'Api-Username': USERNAME_SYSTEM
}
params = {"topic_id": 398}
response = requests.post(url="[REDACTED]/admin/plugins/explorer/queries/10/run", headers=headers, params=params)
오류 메시지를 통해 "topic_id"를 문자열로 전달할 수 없다는 것을 알 수 있지만, 이를 키로 전달하는 다른 방법을 찾지 못하고 있습니다. 어떤 생각이 있으신가요?
