Forum Discussion

Zdenda's avatar
Zdenda
Icon for Cirrus rankCirrus
Mar 23, 2018

ASM signature ID in Rest API vs GUI

Hi, using REST API on 12.1.2 version. I understand each policy and signature is referenced by unique ID. I want to operate with signatures, but just noticed the signature ID in GUI (set of numbers) is different than ID in REST API (kind of hash). How can I convert signature ID I got from GUI to signature ID in API Rest?

 

Thanks, Zdenek

 

3 Replies

  • Tikka_Nagi_1315's avatar
    Tikka_Nagi_1315
    Historic F5 Account

    Zdenek,

    The purpose of the id in the rest api is to be able to reference that signature as an endpoint. For example, you could use selfLink (which has the id) to update "performStaging" parameter in a subsequent REST call.

     {
        "enabled": true,
        "id": "hXfCtmLZxvZZYi-xE5GHZQ",
        "kind": "tm:asm:policies:signatures:signaturestate",
        "lastUpdateMicros": 0,
        "performStaging": true,
        "selfLink": "https://localhost/mgmt/tm/asm/policies/7a8eq2Ll3DS51nX0DAJaUg/signatures/hXfCtmLZxvZZYi-xE5GHZQ?ver=12.1.3",
        "signatureReference": {
        "link": "https://localhost/mgmt/tm/asm/signatures/O-3q2O4fHlYdD97B0UIG3A?ver=12.1.3"
    

    }

    Why do you need to correlate the GUI Signature ID to the hash in REST api?

    Thanks, Tikka

    • Zdenda's avatar
      Zdenda
      Icon for Cirrus rankCirrus

      Hi, thanks for the answer. It would be nice to use ?$filter=signatureReference contains abcd123 in the query, but that does not work in v12, maybe in v13 is something like that possible? I sorted it out using python, a bit more rest calls, but it works.

       

      The purpose is to enable centralized management of multiple signatures through our orchestrator :)

       

    • Zdenda's avatar
      Zdenda
      Icon for Cirrus rankCirrus

      Update, it looks it is possible to use "contains" in ?$filter. Some a bit more advanced (for me) filtering stuff here