Skip to main content
Question

Get all factysheets with attributes data using graphql.

  • 4 September 2024
  • 2 replies
  • 33 views

Hi,

 

I am searching for graphql query which retriver all factsheets with attributes data. As we are getting excel file from leanix workspace inventory. I want to retrive all data using graphql. 

 

Thank you in advance. 

Hi @vivek.rabadiya  here is the query for all applications factsheets, but you have to change it accordingly.


query allFactSheetsQuery($filter: FilterInput!) {
  allFactSheets(filter: $filter) {
    totalCount
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
    filterOptions {
      facets {
        facetKey
        facetType
        facetSubType
        total
        possibleOperators
        operator
        globalFacet
        results {
          name
          key
          count
          selected
        }
        dateFilter {
          from
          to
          type
          minDate
          maxDate
        }
        subscriptionFilter {
          type
          role {
            id
            name
          }
        }
        subFilter {
          facetFilters {
            facetKey
            operator
            keys
            dateFilter {
              from
              to
              type
            }
            subscriptionFilter {
              type
              role {
                id
                name
              }
            }
          }
          fullTextSearch
          ids
        }
        relationFieldsFilterOperator
        relationFieldsFilter {
          fieldName
          values {
            key
            selected
          }
        }
      }
    }
  }
}
{
  "filter": {
    "facetFilters": a
      {
        "facetKey": "FactSheetTypes",
        "operator": "OR",
        "keys": Â
          "Application"
        ]
      }
    ]
  }
}


@vivek.rabadiya Or in case you are using Python and the LeanIX Client, it‘s just

Application.all()

or FactSheet.all() for all fact sheets.

All the GraphQL is built and sent under the hood, including authentication, paging, error handling etc.


Reply