Forum archive
TKLBAM API?
Hi,
I can replicate allot of stuff in the hub with AWS' API but where will I go if I need info for backups?
I know they are buckets but they are somehow tied to TKL's account in AWS.
Hints?
PS the reason I need to do this is to streamline my business and associated support. The current wen interface would fail for me if scaled to 100's of servers
Hi Chris,
The official API for the Hub is Hubtools, but TKLBAM-wise doesn't let you do much more than list backups. I understand you may need more then that. If you could elaborate a bit more regarding your usage scenario maybe we can figure out how to improve the Hubtools API or the Hub or maybe TKLBAM.
Right now I'm guessing your best bet would be to write a wrapper around TKLBAM, interfacing with it in command line mode - which would work from any programming language but require you to parse inputs/outputs, or better yet by writing the wrapper in Python and interfacing directly with the Python code:
Note if you are interfacing with more than one Hub account you'll need to set the TKLBAM_REGISTRY environment to a different path for each account.
Under the hood, TKLBAM communicates with the Hub using a pretty simple REST API if you want to roll your own in another language. The code is in /usr/lib/tklbam/hub.py and should be pretty straightforward to port to another language.
Another route would be to directly access the TKLBAM registry, get the stuff you want out of it (e.g., bucket address, s3 access keys, etc.) and just use the AWS API. Explore /var/lib/tklbam/ and registry.py in the codebase.
Cheers