QueryAndCacheSLUsers

Queries a Skylar One instance for all available Users and saves the data to cache with the specified Skylar One ID

Added in version 1.5.4.

  • Friendly name: Query and Cache Skylar One User info

  • Step class: base_steps_syncpack.steps.QueryAndCacheSLUsers.QueryAndCacheSLUsers

  • Step version: 2.0.1

  • Required parameters: region, prefix_url

Parameters

Name

Type

Required

Default

Description

region

string

yes

ScienceLogicRegion

The unique identifier for each SL1, PowerFlow, and third party software combination

Required inherited parameters

These are defined on GQLRequest but are required here, so a working configuration must set them.

Name

Type

Required

Default

Description

prefix_url

string

yes

–

used with relative_url to create the full URL. Example: http://host.example.com

Other inherited parameters

This step also accepts 39 optional parameter(s) inherited from GQLRequest.

Every step also accepts the platform parameters common to all steps – see Platform parameters.

Dependencies

  • Inherits from: QueryAndCacheSLUsers -> GQLRequest -> HTTPBaseStep -> BaseStep -> Serializable

  • SyncPack modules: base_steps_syncpack.steps.GQLRequest, base_steps_syncpack.util.helpers, base_steps_syncpack.util.request_params

  • External packages: ipaascommon

Behaviour

Extends GQLRequest, so it inherits the whole GraphQL and shared HTTP parameter surface, and the parent’s gql_query = True / method = "POST".

It runs the inherited GraphQL query, then reads the parent’s output back with get_current_saved_data() and reshapes it. For each entry it takes entry["user"], keeps id and user, and merges user["contact"] into the top level. The resulting list is written to the cache under a region-scoped key:

internal-ScienceLogic-users-<region>

Important

This imposes a constraint on the GraphQL configuration: the parent’s output has to be a list, and every entry must have a user key containing id, user and contact. Because GQLRequest changes its output shape based on follow_cursor, edges_only and save_errors, a combination that yields a single dict — or a {"data_out": ...} wrapper — makes this step fail on the first entry rather than reporting a configuration problem.

Outputs

Saves an empty dict ({}), deliberately clearing downstream data. The useful result is the cache write, not the pipeline output — a step placed after this one gets nothing to work with and should read the cache instead, with ReadFromCache.

Notes

  • region is the only parameter this step adds. It identifies one SL1 / Skylar Automation / third-party combination and is what makes the cache key unique, so two workflows using the same value overwrite each other’s cached user list.

  • The step is a cache populator. It is normally scheduled ahead of the workflows that consume the user list, not run inline with them.