VMware Cloud Community
Sathishs2u
Contributor
Contributor

Does log insight has CLI or API to upload content pack?

Hi,

Does log insight has CLI or API to upload content pack?

Thanks,

Sathish

Labels (1)
Reply
0 Kudos
1 Reply
admin
Immortal
Immortal

There's a Tech-Preview API present, and Log Insight ships with a tiny API client command line tool which handles authentication for you. So yes, though unsupported and likely to change. But you're welcome to try it out.

Example: Retrive all content packs as a JSON structure. The URL fragment "contentpacks" is added to the /api/v1/ base for you, no need to specify it: /usr/lib/loginsight/application/lib/python/apiclient.py -a https://localhost:9543 -u admin -p get contentpacks

The 4 relevant methods are:

  • Retrieve all: GET /api/v1/contentpacks
  • Add new one: POST /api/v1/contentpacks (with VLCP file as the JSON body)
  • Retrieve one, by namespaceid: GET /api/v1/contentpacks/namespaceid
  • Delete one, by namespaceid: GET /api/v1/contentpacks/namespaceid

Proper documentation should be coming along shortly.

Reply
0 Kudos