-
Notifications
You must be signed in to change notification settings - Fork 942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: Cannot create index_pattern via API #910
Comments
Hello @sevenval-admins, thanks for this! I think these are flaws in the documentation that will need to be improved upon. Just to clarify, do you have OpenSearch Dashboards running on top of OpenSearch? By default the port
Just some things to highlight:
I think this link: https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/DEVELOPER_GUIDE.md#api-endpoints leaves too much for interpretation. We should create an issue as well to make this more descriptive. Thanks again for pointing this out! Let me know if you get the results you are seeking and if you can answer some of the follow-ups, that would be super appreciative. I can do to the making of issues/fixing. |
Hi @kavilla thanks a lot for your reply. My OpenSearch Dashboard runs on port 5601. However, the query you suggested does not work.
and I can see the created index_pattern in the UI under my custom test-tentant2 Tenant. This old issue was really helpful to me. |
What was the error message you are seeing. The way you provided is another way to create an index pattern but that is hitting OpenSearch instead of going through to OpenSearch Dashboards. As the issue you link, it could be related to the tenants if so then it would be a problem with the security plugin. Let me know! Appreciate the help! |
Hi, no error was displayed, it just didn´t create an index pattern. |
@sevenval-admins It sounds like you were able to resolve the issue. @kavilla did you want to create a new documentation issue? Other than that, I think we can close this one. |
please notice that |
Hi,
I am trying to create index_pattern via API, but I do for sure something wrong.
If I give
curl -s -k -u admin:pw -XPOST "https://my-opensearch.local:9200/api/opensearch-dashboards/index_patterns/" -H "kbn-xsrf: true" -H "Content-Type: application/json; charset=utf-8" -H "securitytenant: test-tenant2" -d '{"attributes": {"title": "test-opensearch-*","timeFieldName": "@timestamp"} }'| jq -r
then I get a success message but I cant find the index_pattern nowhere:
On the other hand if I give
curl -s -k -u admin:pw -XPOST "https://my-opensearch.local:9200/api/saved_objects/index_patterns/" -H "kbn-xsrf: true" -H "Content-Type: application/json; charset=utf-8" -H "securitytenant: test-tenant2" -d '{"attributes": {"title": "test-opensearch-*","timeFieldName": "@timestamp"} }'| jq -r
then I get the following message:
I tried with the method you described hier too, but no success.
Could you please provide a complete example on how to create index_patterns with API?
Thanks a lot
Davide
The text was updated successfully, but these errors were encountered: