Authentication with API Key
|
curl |
---|---|
IntroductionWelcome to Asset Manager REST API. Our REST API is designed for customers who want the entire experience of Asset Manager via API: Configuration of Asset Manager box, Initializing Indexing, Monitoring and Accessing Results to enhance their Security/Cyber Situational Experience. Everything that you can perform via Asset Manager CLI or Web-based GUI, can also be accomplished using this API. The REST API uses JSON, XML and in some cases XJSON over HTTP. It supports HTTP verbs such as GET, POST, PUT, and DELETE. |
API Endpoint
Replace
|
Authentication with API KeyEach API request must include a valid API key in the header, or use basic auth. User can generate an API key for himself or for other user as long as he has permissions to do so. Default superuser (admin) has permissions to generate key for any user. User himself has permissions to generate an API key. One can generate and enable API Key using the following method: Generating keyCLI The key is issued per user using the Asset Manager command-line interface command: user key new <username> API The key can be generated via API command: GET /api/rest/management/user/{username}/apikey?create=true Enabling keyCLI: The key can be enabled by executing the command: user key enable username
API: GET /api/rest/management/user/{username}/apikey?enable=true
|
Example of getting an API key for a specific user:
Replace:
Please save the key in a safe location so that you can use this key for subsequent API calls.
Example of enabling an API key for a specific user: curl https://username:password@Asset Manager_CC_IP/api/rest/management/user/username/apikey?enable=true
Replace:
Each API request can now include the key in the header by setting Authorization to <API KEY> and its Basic value set to Bearer
|