Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preferred way to query and filter elements within cmdb_rel_ci #77

Open
HSchmale16 opened this issue Nov 22, 2023 · 0 comments
Open

Preferred way to query and filter elements within cmdb_rel_ci #77

HSchmale16 opened this issue Nov 22, 2023 · 0 comments

Comments

@HSchmale16
Copy link

HSchmale16 commented Nov 22, 2023

I'm trying to find a mapped application service and walk to it using this module. To do that I query one cmdb table, and use the sys_ids to walk there.

However I need to filter by the child.class field to find the actual things. I can see it in the table elements within the ui, but I can't seem to pass that value in.

What would querying by one of these derived attributes look like? So far I've tried just adding a field called child.class to my query.

From the examples my query looks like:

- name: Search for incident using host instead of instance
  servicenow.servicenow.snow_record_find:
    username: ansible_test
    password: my_password
    host: dev99999.mycustom.domain.com
    table: cmdb_rel_ci
    query:
      parent: <some_sys_id>
      child.class: <another_sys_id>

However child.class is ignored in my query, and it returns all the records for the given parent.

Any recommendations on how to proceed would be much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant