runzero.api.imports.assets

enables management of runZero custom integrations.

These operations are privileged and require an account token directly or an OAuth key that can generate one.

Module Contents

Classes

CustomAssets

Management of Custom Asset Data for your own custom integrations.

class runzero.api.imports.assets.CustomAssets(client: runzero.client.Client)[source]

Management of Custom Asset Data for your own custom integrations.

Custom data integrations are descriptive registered associations between integrations of data and assets imported which are associated with those integrations.

The data sent to the server has basic checks performed and is loaded as an import task when it can find the next available worker to do so. Therefore, the result is a class:runzero.Task which you can check the status of.

See related runzero.account.CustomIntegrations to work with the custom asset data integrations registered to the account.

Parameters:

client (runzero.client.Client) – A handle to the runzero.Client which manages interactions with the runZero server.

Constructor method

upload_assets(org_id: uuid.UUID, site_id: uuid.UUID, custom_integration_id: uuid.UUID, assets: List[runzero.types.ImportAsset], task_info: runzero.types.ImportTask | None = None) runzero.types.Task[source]

Upload your custom assets to the runZero platform.

See the ImportAsset object for a description of the data that can be imported.

Assets are merged according to the merge logic in the release of the platform. This involves fields other than the custom_properties dictionary.

If the runZero asset ID is known externally, it may be specified on any single ImportAsset object to override all merge rules and force that object’s data onto the runZero asset with that ID.

Parameters:
  • org_id (uuid.UUID) – Organization ID to import these assets into

  • site_id (uuid.UUID) – ID of the Site to import these asstes into

  • custom_integration_id (uuid.UUID) – custom integration id for the provided Import Assets

  • assets (List[runzero.types.ImportAsset]) – A collection of ImportAssets to upload

  • task_info (Optional[runzero.types.ImportTask]) – Descriptive information associated with the import task to be created. If omitted, a task name is generated for you

Returns:

Task: The runZero task associated with processing the asset upload

Raises:

ServerError, ClientError, AuthError

Return type:

runzero.types.Task