Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Bob_Zimmerman
Advisor

Application/Site category weirdness

While learning to ingest more object types, I noticed application-site objects reference their primary-category and additional-categories by name rather than by UUID. Is that intentional?

Everything else references other objects by UUID or even by whole object ('show host' includes whole objects for the host's tags). Even rule settings like the action and track reference objects by UUID, not just strings like "Accept" or "Log".

I'm on R80.40 jumbo 91, so API 1.6.1.

6 Replies
PhoneBoy
Admin
Admin

Good question for @Omer_Kleinstern

0 Kudos
Or_Soffer
Employee
Employee

Hi @Bob_Zimmerman ,

Thanks for reaching us.
Indeed it's also possible to pass UUIDs in the application-site request in the categories fields.

Thanks,
Or

0 Kudos
Bob_Zimmerman
Advisor

For requests to make changes, sure. I'm talking about the data returned when I ask the API to show me objects:

[Expert@LabSC]# mgmt_cli -r true --format json show application-sites limit 1 details-level full
{
  "objects" : [ {
    "uid" : "00fa9e3c-36ef-0f65-e053-08241dc22da2",
    "name" : "#hashtags",
    "type" : "application-site",
    "domain" : {
      "uid" : "8bf4ac51-2df7-40e1-9bce-bedbedbedbed",
      "name" : "APPI Data",
      "domain-type" : "data domain"
    },
    "application-id" : 10075536,
    "primary-category" : "Twitter Clients",
    "description" : "Hashtags are a community-driven convention for adding additional context and metadata to your tweets. They're like tags on Flickr, only added inline to your post. You create a hashtag simply by prefixing a word with a hash symbol: #hashtag.",
    "risk" : "Very Low",
    "user-defined" : false,
    "additional-categories" : [ "Share links", "Twitter Clients", "Very Low Risk" ],
    "comments" : "",
    "color" : "black",
    "icon" : "@app/10075536_2",
    "tags" : [ ],
    "meta-info" : {
      "lock" : "unlocked",
      "validation-state" : "ok",
      "last-modify-time" : {
        "posix" : 1595724647102,
        "iso-8601" : "2020-07-26T00:50+0000"
      },
      "last-modifier" : "System",
      "creation-time" : {
        "posix" : 1595724647102,
        "iso-8601" : "2020-07-26T00:50+0000"
      },
      "creator" : "System"
    },
    "read-only" : false
  } ],
  "from" : 1,
  "to" : 1,
  "total" : 7345
}

The "primary category" field is a name rather than a UUID or object. The "additional-categories" field is a list of names rather than a list of UUIDs or objects.

The categories are available from the API as objects. Every other relationship between two objects I can think of is provided as UUIDs or objects. This is the only one I've seen provided as a name instead.

I'm pretty sure I can handle this when I am ingesting data from the API, but it seems inconsistent enough that I wanted to verify it is expected behavior first.

0 Kudos
Or_Soffer
Employee
Employee

I see, you are right, indeed it seems inconsistent with the rest of the API replies.
We will open a bug for this.
BTW for now you can use the API command "
show application-site-category" to get the category object.

Thanks!

0 Kudos
Bob_Zimmerman
Advisor

Thanks for the confirmation!

Is there anything else you need from me? I can open a ticket through the TAC if that would help. I post here under a personal account, but I would have seen the problem in my day job sooner or later.

0 Kudos
PhoneBoy
Admin
Admin

I would open a TAC case to track if nothing else.

0 Kudos