Forum Discussion
REST API: Determine what type of profile each profile is in the list for a virtual server
I'm using the REST API to do some automation. I'm currently on OS version 12.1. When I use the REST API to retrieve a list of profiles on a virtual server, I can successfully retrieve the list, but there doesn't seem to be any way to determine what kind of profile each one is. Not all my profiles use a standard naming scheme, so I can't rely on the suffix to determine what it is. What do I do to retrieve the type of profile? (SSL, web acceleration, compression etc.).
- Example URL for retrieving the profile list:
https://f5lab01.domain.com/mgmt/tm/ltm/virtual/~Common~Test.app~Test_vs/profiles
-
Example Output:
kind : tm:ltm:virtual:profiles:profilesstate name : Test_client-ssl partition : Common subPath : Test.app fullPath : /Common/Test.app/Test_client-ssl generation : 541 selfLink : context : clientside
kind : tm:ltm:virtual:profiles:profilesstate name : Test_http partition : Common subPath : Test.app fullPath : /Common/Test.app/Test_http generation : 541 selfLink : context : all
kind : tm:ltm:virtual:profiles:profilesstate name : Test_oneconnect partition : Common subPath : Test.app fullPath : /Common/Test.app/Test_oneconnect generation : 541 selfLink : context : all
2 Replies
I know this isn't probably an easy fix you were looking for. But you could go around accessing all profile types (or at least the ones you use) from this endpoint . So you could go iterating trough every endpoint on that list, loading some kind of dictionary with FullPath of each profile and then you could easily access all the properties for a given profile using FullPath property from your endpoint.
Let me know if this helps, or you need some more details about this.
- tatmotiv
Cirrostratus
Try polling
In the stats response, the profile type of each profile will be listed.https://localhost/mgmt/tm/ltm/virtual/~Common~Test.app~Test_vs/profiles/statsHTH
Martin
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com