Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Juan_Salas
Participant

class names available for use with the "show-generic-objects" API command

Hello,

How can I browse/search the class-names available for use with the show-generic-objects API call?

For example:

I have been able to find the "Track" object guessing:

> show generic-objects class-name com.checkpoint.objects.Track

objects:
- uid: "29e53e3d-23bf-48fe-b6b1-d59bd88036f9"
  name: "None"
  type: "Track"
  domain:
    uid: "a0bbbc99-adef-4ef8-bb6d-defdefdefdef"
    name: "Check Point Data"
    domain-type: "data domain"
- uid: "598ead32-aa42-4615-90ed-f51a5928d41d"
  name: "Log"
  type: "Track"
  domain:
    uid: "a0bbbc99-adef-4ef8-bb6d-defdefdefdef"
    name: "Check Point Data"
    domain-type: "data domain"
- uid: "d395a3bb-c96c-4781-8017-b9cd0418e982"
  name: "Detailed Log"
  type: "Track"
  domain:
    uid: "a0bbbc99-adef-4ef8-bb6d-defdefdefdef"
    name: "Check Point Data"
    domain-type: "data domain"
- uid: "78566494-7e96-4513-ada9-ded83f4ee9ea"
  name: "Extended Log"
  type: "Track"
  domain:
    uid: "a0bbbc99-adef-4ef8-bb6d-defdefdefdef"
    name: "Check Point Data"
    domain-type: "data domain"
from: 1
to: 4
total: 4

but I am unable to find the RulebaseAction object type, or

> show generic-objects class-name com.checkpoint.objects.RulebaseAction

objects: []
total: 0

Could you please help?

I am unable to find this information here or in the docs.

Thank you very much.

2 Replies
Juan_Salas
Participant

I have found a possible way to find an unknown class name for use with "show-generic-objects"

First, look at the type of the object, using the show-object uid uid command:

> show-object uid 6c488338-8eec-4103-ad21-cd461ac2c472

object:
  uid: "6c488338-8eec-4103-ad21-cd461ac2c472"
  name: "Accept"
  type: "RulebaseAction"
  domain:
    uid: "a0bbbc99-adef-4ef8-bb6d-defdefdefdef"
    name: "Check Point Data"
    domain-type: "data domain"

Once you have the type, in this case "RulebaseAction", query the database directly for a possible match, grep lowercase and uniq to remove duplicates:

[Expert@cp8020-mgm:0]# psql_client cpm postgres -c "select objclass from dleobjectderef_data where objclass like 'com.checkpoint.objects.%'" | grep -i rulebaseaction | uniq
 com.checkpoint.objects.rulebase_classes.dummy.CpmiSslInspectionRulebaseAction
 com.checkpoint.objects.rulebase.RulebaseAction   <<<<<<< I was looking for this

Very useful info to search and query almost any object in the database using the rest API show-generic-objects

Thanks

Peter_Domotor
Employee
Employee

Thanks for the post as it really helped me to find what I was looking for. One improvement if I may is to get rid of the ugly grep and keep the full statement as clear SQL:

psql_client cpm postgres -c "select distinct objclass from dleobjectderef_data where objclass ilike '%rulebaseaction%'"

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events