Package: assetic
Descriptionasseticis an SDK wrapper for the Assetic REST APIsInstallation (recommended)To install assetic run:pip install asseticManual InstallationCan be manually but dependencies will also require installing
Can optionally use a zip file available from Assetic if pip cannot be usedQuick StartOnce you have installed everything, include the following in your python script:import assetic#create an instance and authenticateasseticsdk = 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.comReporting issuesLog issues via Assetic SupportChangelogRelease 2024.9.1.1Add new Contractor Respresentation information to Resource RepresentationsBulk Upload of documents now allows the categorisations to be set in the Excel fileRelease 2023.16.1.5Added support for search profiles without a primary key to Bulk Export Sync processRelease 2023.16.1.4Added additional support and fixes for GIS integrations multiple work groups functionalityRelease 2023.16.1.3Added boolean parameter for creation of Functional Location when checking for it’s existence during asset associationRelease 2023.16.1.2Add support for GIS integration to create components and or dimensions against existing assetsRelease 2023.16.1.1Work Order Service Activity representation has 2 additional fields, ContractId and ReceiptIdAsset core representation has 2 additional fields AssetPrimaryServiceAreaName and AssetSecondaryServiceAreaNameUser representation has additional list field of RolesRelease 2023.9.1.1Asset tools update_complex_asset now adds a new default asset workgroup to the multiple workgroup listRelease 2023.9.1.0Added ‘work_groups’ property to Complex Asset representation for multiple work groups functionalityAdded ‘work_order_work_group’ property to Work Order representation for multiple work groups functionalityRelease 2023.1.1.3Fixed an issue when reading GIS asset layer configurations where optional layer settings not provided
were incorrectly set to enabledAdded parameter to base bulk update rows function to allow the GIS layer name to be passed inRelease 2023.1.1.2Added label fixes for asset core fields automapping when performing GIS bulk updates using the Data ExchangeFixed sorting order applied to widgets in the Assessment Form create by prompt toolAdjusted the GIS initialisation process to allow for modifications to integration config files to be
picked up without the need to restart the GIS software.Release 2023.1.1.1GIS XML configuration reader updated to support reading the “skip_defaults_on_update” element from asset layers.Release 2023.1.1.0Assessment Task API now how ShowAll option to get all tasks regardless of assignment (permissions dependent)
and new external id, created and modified date fieldsAssessment form Result ID now in form result representationComponent PUT API now supports reval_date_builtData Exchange API now includes output document with generated ID columnRelease 2022.22.1.0Assessment 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 resultNew reval_date_built field in component representationRelease 2022.20.1.0Added 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.0New API endpoint GET /api/v2/assessmentformresult/{id} to retrieve assessment form result data by GUIDBulk Export process enhanced to handle background workers that fail and are in ‘Error’ statusRelease 2022.17.1.0Change request header when getting OData metadata for bulk update processRelease 2022.15.1.2Adjusted the Maintenance Type/Subtype and Security Group field lookups for bulk update
to match the asset representatonRelease 2022.15.1.1Correct maintenance type/subtype field lookups for GIS Tools for bulk update and add Security Group supportAllow GIS reader to skip incomplete layer settings and better handling of boolean settingsRelease 2022.15.1.0CRM tools to include supporting information from work taskNew property SupportingInformation added to Work Task representationAdded support for linking documents to Assessment Form Results using the Bulk Upload Prompter toolRelease 2022.2.1.4Allow GIS integration to skip empty components to support variable number of componentsRelease 2022.2.1.3Improve error handling in GIS custom calculationsAdd configuration to GIS update to skip field with default (hardcoded) valuesRelease 2022.2.1.2CRM tools option to use WO Actual finish Date for CRM Close dateRelease 2022.2.1.1CRM tools handle error response from OData requestBulk Export handle document errorRelease 2021.25.1.1Work Request Description now supports 250 charactersExternal Identifier field added as a core field to functional LocationRelease 2021.20.2.2Add support for managing api key in password vault rather than ini fileRelease 2021.20.2.1Include Functional Location configuration validations in XML configuration validatorHandle python installs not implementing tkinterRemove unused requests importRelease 2021.20.2.0Add UI to create assetic.ini fileAdd handler in base class for Work Request creation errorBulk 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 functionallocationsRelease 2021.5.1.5GIS XML configuration extended to support domain lookupsGIS XML configuration cater for empty definitions by skipping emptyRelease 2021.5.1.4Improve messaging for gis layer toolsImprove layer processing for functional locationRelease 2021.5.1.3Improve logging where package initiated multiple times in same
session and output unhandled exceptions to stderr as well as log fileImprove log messaging around testing for functional locationRelease 2021.5.1.2Fix issue with CRM integration initiationRelease 2021.5.1.1Improvements to XML ValidationMoved ESRI/QGIS references in generalised methods to their specific packagesRelease 2021.5.1.0Improved XML validationFixed bug causing string/integer comparisons to fail when bulk-uploading
spatial data in a GIS integrationLogging improvementsRelease 2021.4.1.3Introduced functionality to parse and provide information about XML configuration
used in GIS integrationMoved ESRI bulk update asset out of base package and into assetic-esriRelease 2021.4.1.2Wrapped ArcPy import in try-except to prevent import-error on machines
withouth arcpy libraryRelease 2021.4.1.1Include option to force bulk export process even if no records changedRelease 2021.4.1.0New work order and work request API’s for location based searchDocument API response includes Asset Category if parent is an assetBulk Export Sync process now tests for changed data before exportingRelease 2020.20.2..4SDK now equipped to deal with GIS table asset ID column datatypes of non-string
valuesRelease 2020.20.2.3Fixed relative imports for Python2Release 2020.20.2.2Improved log messages for GIS client misconfiguration issuesSupport for centralisation of ESRI code to python-sdkRelease 2020.20.2.1Improved logging in shared GIS integration filesRelease 2020.20.2.0Asset spatial search now includes a filter optionDocument Metadata now includes a ‘InExpired’ propertySupporting Information for work order and work request now includes a
SystemDateAdded which is the timestamp the record was created in AsseticBackground worker API now returns the timestamp for when the task was
started and completedUtilise new system date as filter in CRM integrationResolve issue Authority CRM integration resolution code configuration
was being overwrittenRelease 2020.6.1.9Fixed minor issue where log message was not appropriately retrieving name of QGIS
layerRelease 2020.6.1.8Have moved common features that service GIS implementations from their respective
integration libraries in to a shared toolkit so as to consolidate functionalityRelease 2020.6.1.7Bulk Upload tool couldn’t find ini file in some instances, and didn’t
support associating documents with work orderImprove enum support when deserialising response back to modelRelease 2020.6.1.6Add support for creating Assessment Forms with parent/child combobox
relationships definedAssessment Form create by prompt will use TextBox if no widget type
definedRelease 2020.6.1.5Helper tool for browser launch wasn’t firing in some instancesAsset tools get_component_id now filters by combination of type and nameRelease 2020.6.1.4CRM integration missed some supporting information comments where the
createdDate applied by Mobility was prior to the last processed dateRelease 2020.6.1.3Improve iteration of components and dimensions when creating assets
and either a component or dimension is invalidRelease 2020.6.1.2Asset Creation tool now manages partial asset creation where the asset
is created but the component, or a dimension or functional location
association failsRelease 2020.6.1.0Work Order POST now accepts user generate GUID for IdAsset search asset_get_0 accepts new ‘in’ parameter to filter a
field by a list of valuesRelease 2019.23.1.4Cater for document description in document bulk upload prompter toolIn CRM integration verify document exists prior to attempted uploadRelease 2019.23.1.3Include pandas package in requirements file to ensure it is installedRelease 2019.23.1.2Introduce tools to support Bulk Update of assets via Data ExchangeRelease 2019.23.1.0New endpoints for associating and disassociating asset to functional locationNew endpoint for creating a resourceRelease 2019.21.1.0New endpoints for asset associationsComponent API’s for POST and GET now include Financial Class and Subclass, PUT is not supported due to potential valuation flow-on effectsRelease 2019.20.1.0New Functional Location endpoints for POST and PUTCRM integration fix issue with alternate method to get CRMRelease 2019.19.3.0New Functional Location GET endpoints and configuration endpoint.Fix issue with bulk export process not implementing delete optionCRM integration tool enhancements to improve efficiencyRelease 2019.13.2.4For export sync process add a list of Assetic memo fields so that
the fields can be created as varchar(4000) when building the tableRelease 2019.13.2.3For 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 truncationRelease 2019.13.2.2For export sync to database process add ‘ODBC Driver 17 for SQL Server to list of default drivers to checkRelease 2019.13.2.1CRM integration datetime offset calculation needed padding to 2 characters for hours and minutesRelease 2019.13.2.0The 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 removedThe resource representation API now correctly returns the resource
status as a user friendly string.Release 2019.9.1.1Where 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.0New resource API’s for GET and PUT resourceReturn correct model definition where response is a list or 201 responseRelease 2019.5.1.2Fix encoding issue with Bulk Export process on python 27 where field is not a stringRelease 2019.5.1.1New work request endpoint for PUT to update work request WorkRequestApi.work_request_putCRM integration sets location description to address, strip unicode characters from comment if Informix databaseRelease 2019.3.2.2CRM integration no longer assumes a status is set for NEW work requestsRelease 2019.3.2.1Assessment 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 abortStrip apostrophe from Informix CRM insert and allow resource display name of 100 charactersRelease 2019.3.2.0Documents now has additional ‘Description’ field for metadataFixes to SMTP emailing on logging errorImprovements to asset creation and update processInclude polygon centroid when creating/updating polygonInclude response message from HP CM in the event of an errorRelease 2019.1.1.0Introduce process to export search profiles to CSVCRM integration now using work request status ID rather than label, fix target date note, pass full CRM object when checking existing notesRelease 2018.26.1.1New DimensionsApi supports filtered search of dimensionsNew search API for Work Request (work_request_get_0) and new fields for inspector and inspection dateAssessment form builder from csv - ensure control order is followedCRM integration expand notes object, support target dateFix issue with dbsync where search value is null and target database value not nullExtend bulk import prompter for documents to support addition record types beyond just assets, such as functional location, work order, work requestRelease 2018.24.2.1CRM integration ensure resource display name is not more than 50 charactersEnsure uncaught exceptions are directed to logging and disable duplicated https debug logging direct to stdoutRelease 2018.24.2.0Introduce a Delete option in SQL Server sync processCorrect file name and external ID issues with Document Bulk updateRelease 2018.21.1.2Assetic3IntegrationRepresentationsComponentDimensionRepresentation ‘nm_sub_total’ renamed as ‘network_measure_sub_total’ and ‘nm_sub_total_unit’ as ‘network_measure_sub_total_unit’Release 2018.21.1.1Fix issue with dbsync tool to ensure no duplicates returned if less than 10000 recordsRelease 2018.21.1.0Assetic3IntegrationRepresentationsComponentDimensionRepresentation has new keys ‘nm_sub_total’ and ‘nm_sub_total_unit’Fix issue with dbsync tool where empty sync fields not included on table creationCRM Integration - provide additional configuration and implementation optionsRename variable async now that it is a reserved keyword in Python 3.7Release 2018.20.1.0New 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_getLastModifiedOn and LastModifiedBy now returned by ComponentApi.component_get_dimensionCRM Integration - provide additional configuration and implementation optionsAsset Tools - order columns when exporting new/modified assets and components etc to flat csv file, include changes to dimensions in searchRelease 2018.17.1.1Asset Tools - new tool for exporting new/modified assets and components etc to flat csv fileCRM Integration - Cater for new Work Request Cancel status and OData date filter correctionRelease 2018.16.1.1CRM Integration - correct asset identification issueRelease 2018.16.1.0last_modified date now available in component searchAble to include asset attributes that are not defined for the resultant asset, so long as attribute is validRelease 2018.15.2.2Correct issue with CRM integration resolving asset locationRelease 2018.15.2.1Finalise 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 WorkOrderIntegrationApiModel for Assetic3IntegrationRepresentationsAssetSpatialLocationRepresentation now includes ‘data’ property which should be used rather than ‘spatial_data’ which was erroneously namedIntroduce new CRM integration tool CRMTools that supports CRM integration, ‘adapter’ for Authority CRM includedNew property AssetSecurityGroup for Assetic3IntegrationRepresentationsComplexAssetRepresentationRelease 2018.11.1.2For the Bulk Export to SQL ServerAdd new option to set a custom field name using a list of dictionariesAdd an option to insert empty values as NULL rather than blank stringAdd new asset tool assetic.FullAssetExport() to export a csv file of asset with components and dimensions and location as a single recordRelease 2018.11.1.1Representations with date properties had a default date, default is now NoneAdd new asset tool to AssetTools.get_list_of_complete_assets get complete asset for a set of assetsRelease 2018.11.1.0assetic.WorkOrderConfigurationsApi changed to assetic.MaintenanceConfigurationApiassetic.ConfigurationsApi changed to assetic.SystemConfigurationApiIntroduce an OData query tool to assist with querying Assetic OData endpointsFormResultCount property added to Assetic3IntegrationRepresentationsAsmtTaskFormRepresentationId property added to Assetic3IntegrationRepresentationsAssessmentFormAssessmentFormDetailRepresentationCheck SQL Server ODBC driver defined for Bulk Export exists, if undefined or not exists use one of the installed SQL Server driversRelease 2018.7.3.0New API endpoints for new work order moduleassetic.WorkOrderIntegrationApiApi has multiple endpoints to GET, PUT, POST work ordersassetic.WorkOrderConfigurationsApi has multiple endpoints for work order configurationassetic.ConfigurationsApi has the endpoint GET unit_typeNew API endpoints for Service Criteria, assetic.ServiceCriteriaApiServiceCriteriaApi.service_criteria_get to get a filtered list of service criteria scoresServiceCriteriaApi.service_criteria_get to get a specific service criteria scoreDeprecated asseticSDK.client_for_docs in favour of using assetic.DocumentAPI.document_get_document_file_with_http_infoConfiguration 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 tagRelease 2018.2.1.0New 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 addressFor 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 processRelease 2017.15.4.2For Bulk Export process create tmp and target tables with key field as varchar(100) not null and PrimaryKey constraintAllow SMTP settings in ini file for username and password to be omitted if port=25Release 2017.15.4.1For Bulk Export process, drop tmp table after merge and remove spurious characters from Asset Street Number prior to mergeRelease 2017.15.4.0New API enpoints for Asset Configuration:GET /api/v2/assetfinancialclass Get a collection of financial class and financial sub-classGET /api/v2/assetcategory/criticality Get a collection of asset criticality for all asset categoriesGET /api/v2/assetcategory/{id}/criticality Get a collection of asset criticality for asset category idNew process for Bulk Document and Data Exchange uploads via a prompting scriptRelease 2017.14.2.0New API endpoints for Asset Configuration:GET /api/v2/workgroup Get a collection of work groupGET /api/v2/assetcategory Get a collection of asset categoryNew Bulk Upload tool BulkProcesses.bulk_upload_prompter to simplify bulk upload tasksRelease 2017.13.1.1Minor changes to Assessment Form creation to cater for unexpected configurations in CSV fileRelease 2017.13.1.0New asset configuration endpoints:GET /api/v2/assettype Get a collection of asset type and asset sub-typeGET /api/v2/assetclass Get a collection of asset class and asset sub-classEndpoint 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 detailsRelease 2017.11.1.2Fix issue when using column check to test for table existence introduced in 2017.11.1.1Release 2017.11.1.1Allow username/password connection to DB_Tools and SyncToLocalProcesses classes.
Improve error trapping in SyncToLocalProcesses and DB_Tools to assist with debugging issuesRelease 2017.11.1.0New AssessmentHelper class to enable creation of assessment form from a csv definition fileNew AssessmentTools class to simplify and manage interface with assessment APIsAdd generic mail message builder and sender in APIHelper classBuild against Assetic version 2017.11.1.0ReferenceDate property added to asset component representationAssessment 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.0Document API support for Assessments documentsInclude SDK version number in user_agent headerRelease 2017.3.11.2New 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
isoptionalnew sections titled [smtpserver] and [smtpauth].  See example below:[smtpserver]host=smtp.myserver.comport = 587[smtpauth]username=user@mysite.compassword=****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 variablesSupport 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.1New document metadata APIs for GET, POST and PUT of document metadataRelease 2017.3.8.2Add support for proxy server definition.  In ini file there is anoptionalnew section
titled [proxy] and a new setting within titled ‘server’.  See example below:[proxy]server=http://152.187.65.1:3128Add 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-py2to upgrade urllib3.
The Assetic SDK will implement urllib3.contrib.pyopenssl if installed.Release 2017.3.8.1Build for new version 2017.3.8New API endpoints GET & POST /api/v2/workrequest/{id}/supportinginfoEnsure special characters are handled by export sync process “SyncToLocalProcesses”
in python 2.7Release 2017.3.1.6Include 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 TrueReplace pypyodbc with pyodbc due to character length limitations found with pypyodbcCater for “” being used rather than the expected None when initiating
assetic.AsseticSDK logfilename parameterRelease 2017.3.1.5Test build and deploymentRelease 2017.3.1.4New Data Exchange API POST /api/v2/dataexchangejobnoprofile
allows a data exchange job to be created without specifying profile
Need to specify Module & Category insteadRelease 2017.3.1.3Introduce new api helper class with methods for launching
Assetic browser tabs in various contexts such as asset or
workorderRelease 2017.3.1.2Introduce new tool AssetTools.get_complete_assetRelease 2017.3.1.1Cater for special characters in asset IDRecord error messgaes back to Excel file for bulk upload toolRelease 2017.3.1.0Correct issue with asset tool not picking up not-null fields in
updateRelease 2017.3.0.0New API’s for Components, including dimensionsNew API for Asset Spatial GETComplex Asset API now named Asset API.  Original name supported via aliasRelease 2016.12.1.3Updated Bulk Import business logic for key-photos asset id retrieval and sync previewRelease 2016.12.1.2Include 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