Skip to main content

Assetic Integration API

Project description

Description

assetic is an SDK wrapper for the Assetic REST APIs

Installation (recommended)

To install assetic run:

pip install assetic

Manual Installation

Can be manually but dependencies will also require installing Can optionally use a zip file available from Assetic if pip cannot be used

Quick Start

Once you have installed everything, include the following in your python script: import assetic

#create an instance and authenticate

asseticsdk = assetic.asseticSDK()

From there you can use the APIs:

assetapi = assetic.AssetApi()
assetapi.getassets()

Also refer to the Assetic Knowledge Base if you have a login: https://assetic.zendesk.com

Reporting issues

Log issues via Assetic Support

Changelog

Release 2023.1.1.1 * GIS XML configuration reader updated to support reading the "skip_defaults_on_update" element from asset layers.

Release 2023.1.1.0 * Assessment Task API now how ShowAll option to get all tasks regardless of assignment (permissions dependent) and new external id, created and modified date fields * Assessment form Result ID now in form result representation * Component PUT API now supports reval_date_built * Data Exchange API now includes output document with generated ID column

Release 2022.22.1.0 * Assessment Form create by prompt will Use internal API endpoint GET /maintenanceapi/assessmentforms and PUT /api/FormApi to create assessment form that exceeds size limit (to be used 'as-is' since these API's are unsupported) * New API PUT /api/v2/assessmentformresult/{id} to update an assessment form result * New reval_date_built field in component representation

Release 2022.20.1.0 * Added the '_request_timeout' attribute to the APIClient class to allow specifying of a custom timeout (seconds) for HTTP requests made to the Assetic REST API endpoints.

Release 2022.18.1.0 * New API endpoint GET /api/v2/assessmentformresult/{id} to retrieve assessment form result data by GUID * Bulk Export process enhanced to handle background workers that fail and are in 'Error' status

Release 2022.17.1.0 * Change request header when getting OData metadata for bulk update process

Release 2022.15.1.2 * Adjusted the Maintenance Type/Subtype and Security Group field lookups for bulk update to match the asset representaton

Release 2022.15.1.1 * Correct maintenance type/subtype field lookups for GIS Tools for bulk update and add Security Group support * Allow GIS reader to skip incomplete layer settings and better handling of boolean settings

Release 2022.15.1.0 * CRM tools to include supporting information from work task * New property SupportingInformation added to Work Task representation * Added support for linking documents to Assessment Form Results using the Bulk Upload Prompter tool

Release 2022.2.1.4 * Allow GIS integration to skip empty components to support variable number of components

Release 2022.2.1.3 * Improve error handling in GIS custom calculations * Add configuration to GIS update to skip field with default (hardcoded) values

Release 2022.2.1.2 * CRM tools option to use WO Actual finish Date for CRM Close date

Release 2022.2.1.1 * CRM tools handle error response from OData request * Bulk Export handle document error

Release 2021.25.1.1 * Work Request Description now supports 250 characters * External Identifier field added as a core field to functional Location

Release 2021.20.2.2 * Add support for managing api key in password vault rather than ini file

Release 2021.20.2.1 * Include Functional Location configuration validations in XML configuration validator * Handle python installs not implementing tkinter * Remove unused requests import

Release 2021.20.2.0 * Add UI to create assetic.ini file * Add handler in base class for Work Request creation error * Bulk Export process enhanced to handle expired documents and allow configuration to alway export via Bulk Exports (rather than immediate option where less than 10,000 records) * Functional Location autoid flag now available in GET functionallocations

Release 2021.5.1.5 * GIS XML configuration extended to support domain lookups * GIS XML configuration cater for empty definitions by skipping empty

Release 2021.5.1.4 * Improve messaging for gis layer tools * Improve layer processing for functional location

Release 2021.5.1.3 * Improve logging where package initiated multiple times in same session and output unhandled exceptions to stderr as well as log file * Improve log messaging around testing for functional location

Release 2021.5.1.2 * Fix issue with CRM integration initiation

Release 2021.5.1.1 * Improvements to XML Validation * Moved ESRI/QGIS references in generalised methods to their specific packages

Release 2021.5.1.0 * Improved XML validation * Fixed bug causing string/integer comparisons to fail when bulk-uploading spatial data in a GIS integration * Logging improvements

Release 2021.4.1.3 * Introduced functionality to parse and provide information about XML configuration used in GIS integration * Moved ESRI bulk update asset out of base package and into assetic-esri

Release 2021.4.1.2 * Wrapped ArcPy import in try-except to prevent import-error on machines withouth arcpy library

Release 2021.4.1.1 * Include option to force bulk export process even if no records changed

Release 2021.4.1.0 * New work order and work request API's for location based search * Document API response includes Asset Category if parent is an asset * Bulk Export Sync process now tests for changed data before exporting

Release 2020.20.2..4 * SDK now equipped to deal with GIS table asset ID column datatypes of non-string values

Release 2020.20.2.3 * Fixed relative imports for Python2

Release 2020.20.2.2 * Improved log messages for GIS client misconfiguration issues * Support for centralisation of ESRI code to python-sdk

Release 2020.20.2.1 * Improved logging in shared GIS integration files

Release 2020.20.2.0 * Asset spatial search now includes a filter option * Document Metadata now includes a 'InExpired' property * Supporting Information for work order and work request now includes a SystemDateAdded which is the timestamp the record was created in Assetic * Background worker API now returns the timestamp for when the task was started and completed * Utilise new system date as filter in CRM integration * Resolve issue Authority CRM integration resolution code configuration was being overwritten

Release 2020.6.1.9 * Fixed minor issue where log message was not appropriately retrieving name of QGIS layer

Release 2020.6.1.8 * Have moved common features that service GIS implementations from their respective integration libraries in to a shared toolkit so as to consolidate functionality

Release 2020.6.1.7 * Bulk Upload tool couldn't find ini file in some instances, and didn't support associating documents with work order * Improve enum support when deserialising response back to model

Release 2020.6.1.6 * Add support for creating Assessment Forms with parent/child combobox relationships defined * Assessment Form create by prompt will use TextBox if no widget type defined

Release 2020.6.1.5 * Helper tool for browser launch wasn't firing in some instances * Asset tools get_component_id now filters by combination of type and name

Release 2020.6.1.4 * CRM integration missed some supporting information comments where the createdDate applied by Mobility was prior to the last processed date

Release 2020.6.1.3 * Improve iteration of components and dimensions when creating assets and either a component or dimension is invalid

Release 2020.6.1.2 * Asset Creation tool now manages partial asset creation where the asset is created but the component, or a dimension or functional location association fails

Release 2020.6.1.0 * Work Order POST now accepts user generate GUID for Id * Asset search asset_get_0 accepts new 'in' parameter to filter a field by a list of values

Release 2019.23.1.4 * Cater for document description in document bulk upload prompter tool * In CRM integration verify document exists prior to attempted upload

Release 2019.23.1.3 * Include pandas package in requirements file to ensure it is installed

Release 2019.23.1.2 * Introduce tools to support Bulk Update of assets via Data Exchange

Release 2019.23.1.0 * New endpoints for associating and disassociating asset to functional location * New endpoint for creating a resource

Release 2019.21.1.0 * New endpoints for asset associations * Component API's for POST and GET now include Financial Class and Subclass, PUT is not supported due to potential valuation flow-on effects

Release 2019.20.1.0 * New Functional Location endpoints for POST and PUT * CRM integration fix issue with alternate method to get CRM

Release 2019.19.3.0 * New Functional Location GET endpoints and configuration endpoint. * Fix issue with bulk export process not implementing delete option * CRM integration tool enhancements to improve efficiency

Release 2019.13.2.4 * For export sync process add a list of Assetic memo fields so that the fields can be created as varchar(4000) when building the table

Release 2019.13.2.3 * For export sync process add new profile options to support replacing characters in the generated database column names. Allows special characters such as (,),-,/ to be replaced. Also allow a truncation to be applied to text data if it will exceed the target field length, with an optional suffix to indicate truncation

Release 2019.13.2.2 * For export sync to database process add 'ODBC Driver 17 for SQL Server to list of default drivers to check

Release 2019.13.2.1 * CRM integration datetime offset calculation needed padding to 2 characters for hours and minutes

Release 2019.13.2.0 * The model representation names have changed to remove the namespace prefix. This change is in line with the Open API (Swagger) definition published for the models. As an example the model assetic.models .Assetic3IntegrationRepresentationsWorkRequest is now assetic.models .WorkRequest. The original model names are currently still supported but a deprecation warning will be issued each time the old model name is invoked. In a future release support for the deprecated model names will be removed

*   The resource representation API now correctly returns the resource
    status as a user friendly string.

Release 2019.9.1.1 * Where the asseticSDK was unable to obtain the configuration to use the error message was unable to be written because the logger was not fully initialised at that point.

Release 2019.9.1.0 * New resource API's for GET and PUT resource

*	Return correct model definition where response is a list or 201 response

Release 2019.5.1.2 * Fix encoding issue with Bulk Export process on python 27 where field is not a string

Release 2019.5.1.1 * New work request endpoint for PUT to update work request WorkRequestApi.work_request_put

*   CRM integration sets location description to address, strip unicode characters from comment if Informix database

Release 2019.3.2.2 * CRM integration no longer assumes a status is set for NEW work requests

Release 2019.3.2.1 * Assessment form create will leave value as NULL if not defined rather than setting to same value as the label. If the control type is not correctly defined it will no longer default to text but instead abort

*   Strip apostrophe from Informix CRM insert and allow resource display name of 100 characters

Release 2019.3.2.0 * Documents now has additional 'Description' field for metadata

*   Fixes to SMTP emailing on logging error

*   Improvements to asset creation and update process

*   Include polygon centroid when creating/updating polygon

*   Include response message from HP CM in the event of an error

Release 2019.1.1.0 * Introduce process to export search profiles to CSV

*   CRM integration now using work request status ID rather than label, fix target date note, pass full CRM object when checking existing notes

Release 2018.26.1.1 * New DimensionsApi supports filtered search of dimensions

*   New search API for Work Request (work_request_get_0) and new fields for inspector and inspection date

*   Assessment form builder from csv - ensure control order is followed

*   CRM integration expand notes object, support target date

*   Fix issue with dbsync where search value is null and target database value not null

*   Extend bulk import prompter for documents to support addition record types beyond just assets, such as functional location, work order, work request

Release 2018.24.2.1 * CRM integration ensure resource display name is not more than 50 characters

*   Ensure uncaught exceptions are directed to logging and disable duplicated https debug logging direct to stdout

Release 2018.24.2.0 * Introduce a Delete option in SQL Server sync process

*   Correct file name and external ID issues with Document Bulk update

Release 2018.21.1.2 * Assetic3IntegrationRepresentationsComponentDimensionRepresentation 'nm_sub_total' renamed as 'network_measure_sub_total' and 'nm_sub_total_unit' as 'network_measure_sub_total_unit'

Release 2018.21.1.1 * Fix issue with dbsync tool to ensure no duplicates returned if less than 10000 records

Release 2018.21.1.0 * Assetic3IntegrationRepresentationsComponentDimensionRepresentation has new keys 'nm_sub_total' and 'nm_sub_total_unit'

*   Fix issue with dbsync tool where empty sync fields not included on table creation

*   CRM Integration - provide additional configuration and implementation options

*   Rename variable async now that it is a reserved keyword in Python 3.7

Release 2018.20.1.0 * New API MaintenanceConfigurationApi.maintenance_configuration_get_managed_resources returns a list of resources in a 'work group' where the integration user is configured as a 'management user' of the 'work group'

*   EnvironmentName now included in response from AuthApi.auth_get

*   LastModifiedOn and LastModifiedBy now returned by ComponentApi.component_get_dimension

*   CRM Integration - provide additional configuration and implementation options

*   Asset Tools - order columns when exporting new/modified assets and components etc to flat csv file, include changes to dimensions in search

Release 2018.17.1.1 * Asset Tools - new tool for exporting new/modified assets and components etc to flat csv file

*   CRM Integration - Cater for new Work Request Cancel status and OData date filter correction

Release 2018.16.1.1 * CRM Integration - correct asset identification issue

Release 2018.16.1.0 * last_modified date now available in component search

*   Able to include asset attributes that are not defined for the resultant asset, so long as attribute is valid

Release 2018.15.2.2 * Correct issue with CRM integration resolving asset location

Release 2018.15.2.1 * Finalise transition of Work Order APIs from old model to new model. Old model is not accessible in Assetic and is therefore not supported. Module WorkOrderIntegrationApiApi is renamed WorkOrderIntegrationApi

*	Model for Assetic3IntegrationRepresentationsAssetSpatialLocationRepresentation now includes 'data' property which should be used rather than 'spatial_data' which was erroneously named


*	Introduce new CRM integration tool CRMTools that supports CRM integration, 'adapter' for Authority CRM included


*	New property AssetSecurityGroup for Assetic3IntegrationRepresentationsComplexAssetRepresentation

Release 2018.11.1.2 * For the Bulk Export to SQL Server

* Add new option to set a custom field name using a list of dictionaries

* Add an option to insert empty values as NULL rather than blank string

*	Add new asset tool assetic.FullAssetExport() to export a csv file of asset with components and dimensions and location as a single record

Release 2018.11.1.1 * Representations with date properties had a default date, default is now None

*	Add new asset tool to AssetTools.get_list_of_complete_assets get complete asset for a set of assets

Release 2018.11.1.0 * assetic.WorkOrderConfigurationsApi changed to assetic.MaintenanceConfigurationApi

*	assetic.ConfigurationsApi changed to assetic.SystemConfigurationApi

*	Introduce an OData query tool to assist with querying Assetic OData endpoints

*	FormResultCount property added to Assetic3IntegrationRepresentationsAsmtTaskFormRepresentation

*	Id property added to Assetic3IntegrationRepresentationsAssessmentFormAssessmentFormDetailRepresentation

*	Check SQL Server ODBC driver defined for Bulk Export exists, if undefined or not exists use one of the installed SQL Server drivers

Release 2018.7.3.0 * New API endpoints for new work order module

    *	assetic.WorkOrderIntegrationApiApi has multiple endpoints to GET, PUT, POST work orders

    *	assetic.WorkOrderConfigurationsApi has multiple endpoints for work order configuration

    *	assetic.ConfigurationsApi has the endpoint GET unit_type

*	New API endpoints for Service Criteria, assetic.ServiceCriteriaApi

    *	ServiceCriteriaApi.service_criteria_get to get a filtered list of service criteria scores

    *	ServiceCriteriaApi.service_criteria_get to get a specific service criteria score

*	Deprecated asseticSDK.client_for_docs in favour of using assetic.DocumentAPI.document_get_document_file_with_http_info

*	Configuration is no longer a singleton.  AsseticSDK now sets configuration default values instead so that it may be
    instantiated without needing to specify client config.

*	TRIM (HP Content Manager) Document integration now supports document tag

Release 2018.2.1.0 * New API endpoints GET /api/v2/assets/{id}/location and PUT GET /api/v2/assets/{id}/location. PUT creates and updates the spatial definition and address. GET retrieves spatial definition and address

*	For Bulk Export processes add export to file option, and export immediate if search as <10000 rows. Export immediate means the data is downloaded immediately without using the background worker process

Release 2017.15.4.2 * For Bulk Export process create tmp and target tables with key field as varchar(100) not null and PrimaryKey constraint

*	Allow SMTP settings in ini file for username and password to be omitted if port=25

Release 2017.15.4.1 * For Bulk Export process, drop tmp table after merge and remove spurious characters from Asset Street Number prior to merge

Release 2017.15.4.0 * New API enpoints for Asset Configuration:

    *	GET /api/v2/assetfinancialclass Get a collection of financial class and financial sub-class

    *	GET /api/v2/assetcategory/criticality Get a collection of asset criticality for all asset categories

    *	GET /api/v2/assetcategory/{id}/criticality Get a collection of asset criticality for asset category id

*	New process for Bulk Document and Data Exchange uploads via a prompting script

Release 2017.14.2.0 * New API endpoints for Asset Configuration:

    *	GET /api/v2/workgroup Get a collection of work group
    *	GET /api/v2/assetcategory Get a collection of asset category

*	New Bulk Upload tool BulkProcesses.bulk_upload_prompter to simplify bulk upload tasks

Release 2017.13.1.1 * Minor changes to Assessment Form creation to cater for unexpected configurations in CSV file

Release 2017.13.1.0 * New asset configuration endpoints:

    *	GET /api/v2/assettype Get a collection of asset type and asset sub-type

    *	GET /api/v2/assetclass Get a collection of asset class and asset sub-class

*	Endpoint user_get_user_image removed as it was deprecated

*	'Accepts' header list includes 'application/xml+hal' at the expense of 'application/xml'

*	New process for Assessment Form creation where user is prompted for form details

Release 2017.11.1.2 * Fix issue when using column check to test for table existence introduced in 2017.11.1.1

Release 2017.11.1.1 * Allow username/password connection to DB_Tools and SyncToLocalProcesses classes. Improve error trapping in SyncToLocalProcesses and DB_Tools to assist with debugging issues

Release 2017.11.1.0 * New AssessmentHelper class to enable creation of assessment form from a csv definition file

*	New AssessmentTools class to simplify and manage interface with assessment APIs

*	Add generic mail message builder and sender in APIHelper class

*	Build against Assetic version 2017.11.1.0

*	ReferenceDate property added to asset component representation

*	Assessment Form POST, UPDATE and DELETE, along with Form Clone POST no longer flagged as
    "Disabled". These API's have been re-enabled and are supported by this SDK.

Release 2017.9.1.0 * Document API support for Assessments documents

*	Include SDK version number in user_agent header

Release 2017.3.11.2 * New log to email option. asseticsdk.setup_log_to_email(). Use to send logger events directly to email. Requires SMTP ,port 465=SSL, port 587=TLS, port 25 no auth. In ini file there is optional new sections titled [smtpserver] and [smtpauth]. See example below:

    [smtpserver]

    host=smtp.myserver.com

    port = 587

    [smtpauth]

    username=user@mysite.com

    password=****
*	When initialising asseticSDK, allow check for assetic.ini file in folder %APPDATA%/Assetic
    If the ini file is not specified the order of checking for 'assetic.ini' is current working folder,
    then %APPDATA%/Assetic, and then environment variables

*	Support for document integration with HP Content Manager (TRIM/HP Records Manager) via
    optional Document Adapter.  Also support for document integration with local file system
    Additional content management adapter to be developed in future versions.

Release 2017.3.11.1 * New document metadata APIs for GET, POST and PUT of document metadata

Release 2017.3.8.2 * Add support for proxy server definition. In ini file there is an optional new section titled [proxy] and a new setting within titled 'server'. See example below:

    [proxy]

    server=http://152.187.65.1:3128
    *       Add support for older versions of Python 2 that lack SNI support.  Refer to the following article:			http://urllib3.readthedocs.io/en/latest/user-guide.html#ssl-py2 to upgrade urllib3.
    The Assetic SDK will implement urllib3.contrib.pyopenssl if installed.

Release 2017.3.8.1 * Build for new version 2017.3.8 * New API endpoints GET & POST /api/v2/workrequest/{id}/supportinginfo * Ensure special characters are handled by export sync process "SyncToLocalProcesses" in python 2.7

Release 2017.3.1.6 * Include new column "spacedelimiter" in database table "assetic_sync_manager" This allows the export sync process "SyncToLocalProcesses" to remove the whitepaces in field names and replace with a user defined character such as an underscore. The "SearchProfileRepresentation" has an additional property "spacedelimiter" which can be set to the character(s) to replace spaces. Effective only if "useinternalnames" is False and "replacespaces" is True * Replace pypyodbc with pyodbc due to character length limitations found with pypyodbc * Cater for "" being used rather than the expected None when initiating assetic.AsseticSDK logfilename parameter

Release 2017.3.1.5 * Test build and deployment

Release 2017.3.1.4 * New Data Exchange API POST /api/v2/dataexchangejobnoprofile allows a data exchange job to be created without specifying profile Need to specify Module & Category instead

Release 2017.3.1.3 * Introduce new api helper class with methods for launching Assetic browser tabs in various contexts such as asset or workorder

Release 2017.3.1.2 * Introduce new tool AssetTools.get_complete_asset

Release 2017.3.1.1 * Cater for special characters in asset ID Record error messgaes back to Excel file for bulk upload tool

Release 2017.3.1.0 * Correct issue with asset tool not picking up not-null fields in update

Release 2017.3.0.0 * New API's for Components, including dimensions New API for Asset Spatial GET Complex Asset API now named Asset API. Original name supported via alias

Release 2016.12.1.3 * Updated Bulk Import business logic for key-photos asset id retrieval and sync preview

Release 2016.12.1.2 * Include new column "replacespaces" in database table "assetic_sync_manager" This allows the export sync process "SyncToLocalProcesses" to remove the whitepaces in field names to make database querying easier. The "SearchProfileRepresentation" has an additional property "replacespaces" which can be set to True if spaces are to be removed. Effective only if "useinternalnames" is False

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

assetic-2023.1.1.1-py2.py3-none-any.whl (732.3 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page