The Splunk schema extension repository
splunk / acs-cli Goto Github PK
View Code? Open in Web Editor NEWAdmin Config Service CLI
Admin Config Service CLI
I'm not a developer but it seems kinda weird. splunk admin openapi spec hosted at https://admin.splunk.com/service/info/specs/v2/openapi.json has issues (however small?). It's a pity that such a big company doesn't even bother testing it against popular client-gen tools.
As an example, the following code doesn't run with various problems.
import splunkacs
from splunkacs.apis.tags import indexes_api
from splunkacs.model.error import Error
from splunkacs.model.index_response import IndexResponse
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = splunkacs.Configuration(
host = "http://localhost"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearerAuth
configuration = splunkacs.Configuration(
access_token = 'YOUR_BEARER_TOKEN' # syntax error here.
)
# Enter a context with an instance of the API client
with splunkacs.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = indexes_api.IndexesApi(api_client)
# example passing only required values which don't have defaults set
path_params = {
'stack': "stack_example",
}
query_params = {
}
try:
api_response = api_instance.list_indexes(
path_params=path_params,
query_params=query_params,
)
pprint(api_response)
except splunkacs.ApiException as e:
print("Exception when calling IndexesApi->list_indexes: %s\n" % e)
# example passing only optional values
path_params = {
'stack': "stack_example",
}
query_params = {
'count': 30,
'offset': 0,
}
try:
api_response = api_instance.list_indexes(
path_params=path_params,
query_params=query_params,
)
pprint(api_response)
except splunkacs.ApiException as e: # exception thrown here.
print("Exception when calling IndexesApi->list_indexes: %s\n" % e)
Errors include:
TypeError: Configuration.__init__() got an unexpected keyword argument 'access_token'
splunkacs.exceptions.ApiValueError: Invalid content_type returned. Content_type='application/json; charset=UTF-8' was returned when only {'application/json'} are defined for status_code=401
According to the README, I should be able to run winget install acs-cli
and then acs version
.
winget install acs-cli
worked fine, but when I try running acs version
, I get:
'acs' is not recognized as an internal or external command, operable program or batch file.
The documentation linked to on that page doesn't to be any more helpful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.