iControlREST
888 Topicsquestion of limitation and expiration for rest api token
now I cannot login ltm via rest api , i thought the number of token of my account has reach the maximum .here is an error login myhost fail b'{"code":401,"message":"remoteSender:http://localhost:8100/shared/authn/login, method:POST ","originalRequestBody":"{\\"username\\":\\"user\\",\\"loginProviderName\\":\\"tmos\\",\\"generation\\":0,\\"lastUpdateMicros\\":0}","referer":"ipaddress","restOperationId":124004534,"kind":":resterrorresponse"}' here are my questions: is there any number limitation for number of rest api token a user can apply ? I can see some one say one user can only apply 100 tokens , how to check the existing token by GUI, or cli since I cannot login device by rest api. how to take how long a token will expired ; is there any way to delete token;Solved3.9KViews0likes9Commentspython show running-config
I am trying to get a Python script to output the running config of my F5, to show everything from authentication to pools to ntp settings. With TMSH/SSH it's so easy doing 'show running-config' and then saving that output. Is there anything similar to this that I can do with the Python F5-SDK? I am trying to generate this in a cleaner fashion than 'show running-config' does it as I use this for PCI compliance evidence. Any help would be appreciated. To muddy the waters a bit I am EXTREMELY new to F5 products.Solved2.9KViews0likes10CommentsHow BIG-IP Token/Authentication works ?
I'm unable to find anywhere here/documentation/articles anyone that could explain a little bit better the authentication token when you get the response from the Rest. I'm sending the POST to the Rest, and the Rest is returning the Authentication. Here is an example: token : AD2GKZPXKVTE4WKJEQUZTIPOM3 name : AD2GKZPXKVTE4WKJEQUZTIPOM3 userName : admin authProviderName : tmos user : ... groupReferences : ... timeout : 1200 startTime : 2016-07-22T09:24:11.808-0500 address : 10.10.10.10 partition : [All] generation : 1 lastUpdateMicros : 1469197451807722 expirationMicros : 1469198651808000 kind : shared:authz:tokens:authtokenitemstate selfLink : https://localhost/mgmt/shared/authz/tokens/AD2GKZPXKVTE4WKJEQUZTIPOM3 Does anyone knows what is "lastUpdateMicros", "ExpirationMicros" and what is Timeout actually means ? I'm having several issues in my scripts when I call the Rest and the call just fail. If I try to get a new token the call works. I wonder if could be due the token is expired after is used once. Will the token expire only after 1200 seconds or that is not true ?2.3KViews1like15CommentsGet list of all certificates and their correspondantes keys through the REST API (or cli) in BIG-IP
Hello, Is it possible to get all certificates and their correspondantes keys with an api call, i've tried : curl -k -u admin:admin -H "Content-Type: application/json" -X GET https://big-ip/mgmt/tm/sys/file/ssl-cert but it gives me info about the certs and not their keys. Same with: tmsh list sys file ssl-cert all No information about where to find the key. However, in the GUI I can see in System> Certificate management > Traffic Certificate Management > SSL Certificate List information about the certificates, its key and the CSR. So is there a way to get all of this information through the REST API ?2.3KViews0likes2CommentsHow to efficiently delete a node from LTM?
Hi, I am trying to delete a node from F5 LTM as part of our decommission process. I cannot delete a node until I remove all pool members that refer to it. The only way I know how to get pool members is to get all pools and then, for each pool, get members, and see if the IP address of a member matches. With thousands of pools we have this takes thousands of web requests. It is seriously slow even on local network but if I try to do it to our LB on another continent over 160ms round-trip link, it literally takes 15+minutes. So, is there more efficient way to delete a node? Maybe get a list of all back-references to a node? Or a list of all members of all pools in one shot? Or something else I did not think about? I am not even trying to tackle nodes used in iRules and other non-pool objects at this time (though it would be cool). I did try to delete node first and parse a 400 response but: - response only has one pool out of possibly many. - the name of the pool in response is within an arbitrary text "message" string. This string is already different between 11.4 and 11.5, and, since it is not part of API, can change at any hotfix.2.1KViews0likes9CommentsF5 Python SDK: How to get virtual server availability?
Due to my limited Python and SDK experience I am finding it difficult to easily obtain the availability state of a virtual server. Given a 'virtual' object, what is the best/easiest way to return the value of that VS' 'Availability' state (offline, available, unknown, etc)? I can do the following: my_virtual = mgmt.tm.ltm.virtuals.virtual.load(name='some_virtual') stats = my_virtual.stats.load() Printing the stats.raw shows that there is a nested dictionary entry keyed 'status.availibityState' that appears to hold the value I'm looking for. Forgive my inexperience, but what is the easiest way to get the availability state of a virtual using the SDK? Perhaps a method I'm missing that retrieves the value above, or the value is easily obtained elsewhere. Appreciate any assitance!2KViews0likes27CommentsREST Api and Config sync question.
I am trying to use REST api to make config sync. I have active/standby pair. I can make changes to active unit using REST api. Now I want to make sync to standby unit. Using GUI or TMSH "tmsh run cm config-sync to-group pair-group-name" works fine. In manual page 69 is simple example for ping using run command, but that is not very helpful. I have done testing by curl and all other commands like making virtualserver work fine. I am asking little help with config sync. This is so far best what I have done: curl -sk -u admin:adminpw https://demo.box/mgmt/tm/util/tmsh -H 'Content-Type: application/json' -X POST -d '{"command":"run","utilCmdArgs":"run cm config-sync to-group pair-group-name"}' I think that in url /tm/util..etc I need to change that or something else.1.9KViews0likes7CommentsF5 iControl Rest API to get State and Status of All LTM/GTM pool members including other Partition in single API call
Hi, We are using below API call to Retrieve State and Status of LTM Pool members in a single call https://x.x.x.x/mgmt/tm/ltm/pool/members/stats Above API call gives details of only Common Partition object, is there any way to get the details of Other Partition objects using single call for all pools. Thanks, Regards, Naman1.8KViews0likes3Comments