- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
![SplunkTrust SplunkTrust](/html/@E48BE65924041B382F8C3220FF058B38/rank_icons/splunk-trust-16.png)
That document is about creation of auth token. Once created, you can follow Use authentication tokens to embed the token in Terraform or any other program. In the example you give, instead of "-u {username:password}", use
-H "Authorization: <type> <token>"
(I haven't used <type> in my queries, so read the document:-)
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry if i was not clear. we are looking into automating the creation and updating of our Splunk dashboards that requires API keys in order for Terraform to create dashboards. Was links that been shared was the correct one to follow? Below are some API keys we able to create, however not sure whether its good or not. Need your expert advise on this. Thanks in advance.
curl -X POST -k -u {username:password} -H "Content-Type: application/json" \
"https://xxxxxxxxxxxxxxxx/http" \
--data-raw '{"name":"{hec-token-name}","index":"{index_name}","indexes":"{list_of_indexes}"}'
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
![SplunkTrust SplunkTrust](/html/@E48BE65924041B382F8C3220FF058B38/rank_icons/splunk-trust-16.png)
That document is about creation of auth token. Once created, you can follow Use authentication tokens to embed the token in Terraform or any other program. In the example you give, instead of "-u {username:password}", use
-H "Authorization: <type> <token>"
(I haven't used <type> in my queries, so read the document:-)
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. Yes the documents really helpful and we are exploring and testing it now. did not resolve it yet but we are in the right direction. Thanks.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
![SplunkTrust SplunkTrust](/html/@E48BE65924041B382F8C3220FF058B38/rank_icons/splunk-trust-16.png)
Not sue what the question is. Do you mean how to generate an API key like this one: Create authentication tokens?
![](/skins/images/FE4825B2128CA5F641629E007E333890/responsive_peak/images/icon_anonymous_message.png)