Information model and API
#
Deviation type DefinitionDeviation type is for grouping deviations and having type specific property definitions for specific group of deviations.
#
PropertyDefinitions fieldDeviation type can have linked property definitions to it. By linking property definitions user specifies which properties can be used in the deviation.
Only those property definitions can be linked to deviation type that have "deviatioType" application rule.
#
Property Definition metadataTo replace deviation identifier in the mobile application, one of the property definitions can be marked as a display name. To achieve it you must update property definitioin metadata field and add displayNameField
boolean field to it.
Example:
{ "name": "location", "metadata":{ "displayNameField": true }}
#
IconIcon's name is a key of icon that is agreed with FE. Icon's color is a HEX color.
#
General deviation typeIn the system, by default, exists default deviation type called "General" and all old deviations are linked to it. General deviation type will be chosen by default when creating a deviation.
#
Deviation DefinitionDeviation is an Observation/Assessment with any damage, which does not allow a system or system component to function as it was designed. Deviation can be observed during an inspection of an asset or captured by monitoring systems. For example, HSS broken teeth observed during an inspection is a Deviation.
Deviation may have properties that are used to describe it.
#
Deviations filteringDeviations Get all
endpoint includes several filters that can be used to refine the results of a query.
GET /Deviations
By using these filters, users can easily search for Deviations based on specific criteria.
Filters:
ids
: Ids of DeviationsexcludeIds
: Ids of Deviations to not includesearchText
: Search text to search with ReferenceIdstatuses
: Deviations statusesobjectOwnerIds
: Ids of ObjectOwnerstypeIds
: Ids of Deviations TyperiskIds
: Ids of RisksequipmentIds
: Ids of EquipmentmainSystemIds
: Ids of MainSystemsplantNames
: Name of PlantsdesignObjectIds
: Ids of DesignObjectsproperties
: See in properties filtering sectionorder
: See in ordering section
#
Deviation unique valuesThis endpoint is used to retrieve a list of unique values for a given filtering field in the Deviations API. This endpoint is helpful for identifying the possible values that can be used to filter Deviations.
GET /Deviations/UniqueValues
#
TypeDeviation can have a type which is used to group them as well as separate properties.
#
PropertiesIn deviation there can be used only PropertyDefinitions
- Which ApplicationRule is Deviation
- Are linked to it's deviation type
#
Designation of Deviation ObjectIn order to designate a given deviation to a specific design, function or location, or any other aspect, assetReference
attribute is used.
The user can add main system, as well as the corresponding design object, e.g., designate to a function aspect that performs speed conversion function within chosen design.
The deviation can also be assigned to specific equipment that corresponds to the designated design.
#
RelationshipsThe system also allows to link a deviation with related deviations via relationships
attribute.
#
Work TypeSee in Entity types generic concept
#
Work TemplateWork Templates are templates based on which Work Items are created and they are revisioned entities.
Work Template has two dependent entities (WorkTemplateActivityTemplate and SectionTemplate). The initial work template has revision 1
. It is unique with Id
and revision
.
Work Template behaviour is different whether there is Work Item created based on it or not. The system behaves like usual in case there are no Work Items. We will discuss the second scenario in the last headline.
#
Work Templates filteringWork Templates Get all
endpoint includes several filters that can be used to refine the results of a query.
GET /WorkTemplates
By using these filters, users can easily search for WorkTemplates based on specific criteria.
Filters:
ids
: Ids of Work TemplatesexcludeIds
: Ids of Work Templates to not includesearchText
: Search text to search with DispayName and ReferenceIdstatuses
: Work template statusesobjectOwnerIds
: ids of ObjectOwnerstags
: tags filterproperties
: See in properties filtering sectionorder
: See in ordering section
#
Work Templates unique valuesThis endpoint is used to retrieve a list of unique values for a given filtering field in the WorkTemplate API. This endpoint is helpful for identifying the possible values that can be used to filter WorkTemplates.
GET /WorkTempltes/UniqueValues
#
Create-Delete-Get Work TemplateCreate Work Template using the following endpoint:
POST /WorkTemplates
The user always gets the last revision of Work Template(s).
GET /WorkTemplates
GET /WorkTemplates/{id}
The user is allowed to delete only the latest revision of the Work Template in case there are no Work Items created based on it.
DELETE /WorkTemplates/{id}
#
Work Template Has Work ItemsEach of the following endpoints will create new revision of a Work Template in the following way. The system will make an exact copy of the Work Template and its dependent objects with +1 revision and apply the changes to it.
PUT /WorkTemplates
PUT /WorkTemplates/{id}/ActivityTemplates
POST /WorkTemplates/{id}/ActivityTemplates
PUT /WorkTemplates/{id}/SectionTemplates
POST /WorkTemplates/{id}/SectionTemplates
DELETE /WorkTemplates/{id}/SectionTemplates/{sectionTemplateId}
DELETE /WorkTemplates/{id}/SectionTemplates/{sectionTemplateId}
#
Files on Work TemplatesWork templates can also have linked file references
Using this endpoint user can create a link between work template and file reference.
POST /WorkTemplates/{id}/FileReferences
File location can be
When a work item is created based on the work template file references linked to the work template will also be linked to the work item.
With this endpoint user can delete the link between work template and file reference.
DELETE /WorkTemplates/{id}/FileReferences
With this endpoint user can get all file references that are linked to the work template
GET /WorkTemplates/{id}/FileReferences
Or get a specific file reference with the following endpoint
GET /WorkTemplates/{id}/FileReferences/{fileReferenceId}
#
Work Template TagsTags serve as metadata that describe the Entities and allow for easy categorization and organization. The tags are stored as an array of strings within each Work Template object. The tags
field is an array of strings representing the tags associated with the Entity.
#
Activity TemplateActivity Templates are templates based on which Activities are created and they are revisioned entities.
Activity Template has one dependent entity (InputTemplate). The initial activity template has revision 1
. It is unique with Id
and revision
.
Activity Template behaviour is different whether there is Activity created based on it or not. The system behaves like usual in case there are no Activities. We will discuss the second scenario in the last headline.
#
Create-Delete-Get Activity TemplateCreate Activity Template using the following endpoint:
POST /ActivityTemplates
The user always gets the last revision of Activity Template(s).
GET /ActivityTemplates
GET /ActivityTemplates/{id}
Unlike Work Templates there is a case where we can get old revisions of ActivityTemplate. When creating Work Item, Activities are being created based on Activity Templates that are linked to the Work Template. The user is allowed to add Activities to the Work Item only if they are created based on the revision of Activity Template that was used initially.
The following endpoint will return revisions of Activity Templates related to the particualar Work Item:
GET /WorkItems/{id}/ActivityTemplates
The user is allowed to delete only latest revision of Activity Template in case there are no Activities created based on it.
DELETE /ActivityTemplates/{id}
#
Activity Templates filteringGET /ActivityTemplates
By using these filters, users can easily search for ACtivityTemplates based on specific criteria.
Filters:
ids
: Ids of ActivitiesexcludeIds
: Ids of Activities to not includesearchText
: Search text to search with DisplayName and ReferenceIdstatuses
: Activity statusesobjectOwnerIds
: Ids of ObjectOwnersactivityTypeIds
: Ids of ActivityTypestemplateTypes
: Template type filterworkItemIds
: WorkItem ids filterorder
: See in ordering sectionskip
: Skip first n elementstake
: Take first n elements
#
Activity Templates unique valuesThis endpoint is used to retrieve a list of unique values for a given filtering field in the Activity Templates. This endpoint is helpful for identifying the possible values that can be used to filter Activity Templates.
GET /ActivityTemplates/UniqueValues
#
Activities#
Activities filteringGET /Activities
By using these filters, users can easily search for Activities based on specific criteria.
Filters:
ids
: Ids of ActivitiesexcludeIds
: Ids of Activities to not includesearchText
: Search text to search with DisplayName and ReferenceIdstatuses
: Activity statusesdateOfActivityFrom
: Filter by DateOfActivity from given datedateOfActivityTo
: Filter by DateOfActivity to given datedateOfActivities
: Filter by DateOfActivitsobjectOwnerIds
: Ids of ObjectOwnersresponsibleIds
: Ids of ResponsiblesbasedOnIds
: Ids of BasedOn ActivityTemplatestypeIds
: Ids of ActivityTypesequipmentIds
: Ids of EquipmentmainSystemIds
: Ids of MainSystemsplantNames
: Name of PlantsdesignObjectIds
: Ids of DesignObjectsorder
: See in ordering sectionskip
: Skip first n elementstake
: Take first n elements
#
Activities unique valuesThis endpoint is used to retrieve a list of unique values for a given filtering field in the Activites. This endpoint is helpful for identifying the possible values that can be used to filter Activities.
GET /Activities/UniqueValues
#
Activity Template Has ActivitiesEach of the following endpoints will create new revision of Activity Template in the following way. The system will make an exact copy of the Activity Template and its dependent objects with +1 revision and apply the changes to it.
PUT /ActivityTemplates
PUT /ActivityTemplates/{id}/InputTemplates
POST /ActivityTemplates/{id}/InputTemplates
DELETE /ActivityTemplates/{id}/InputTemplates/{inputTemplateId}
DELETE /ActivityTemplates/{id}/InputTemplates/{inputTemplateId}
#
Work ItemWhen creating Work Items using Work Templates, the process involves the instantiation of all activities and inputs specified in the template. This streamlined approach ensures that each Work Item aligns with the predefined structure and requirements set by the template, promoting consistency and efficiency in project management.
It can be achieved using "basedOn"
property in the Work Item DTO.
After the initial creation of Work Items based on templates, users can update "basedOn"
field and add new templates. As new Work Templates are introduced to the list, the process insures the instantiation newly provided templates.
#
Work Item filteringGET /WorkItems
By using these filters, users can easily search for WorkItems based on specific criteria.
Filters:
ids
: Ids of WorkItemsexcludeIds
: Ids of WorkItems to not includesearchText
: Search text to search with DisplayName and ReferenceIdstatuses
: WorkItems statusesdueDateFrom
: Filter by DueDate from given datedueDateTo
: Filter by DueDate to given datedueDates
: Filter by DueDatesobjectOwnerIds
: Ids of ObjectOwnerstags
: Filter by tagsbasedOnIds
: Ids of BasedOn WorkTemplatesequipmentIds
: Ids of EquipmentmainSystemIds
: Ids of MainSystemsplantNames
: Name of PlantsdesignObjectIds
: Ids of DesignObjectsproperties
: See in properties filtering sectionorder
: See in ordering sectionskip
: Skip first n elementstake
: Take first n elements
#
Work Item unique valuesThis endpoint is used to retrieve a list of unique values for a given filtering field in the WorkItems. This endpoint is helpful for identifying the possible values that can be used to filter WorkItems.
GET /WorkItems/UniqueValues
#
Files on Work ItemsWork items can also have linked file references
Using this endpoint user can create a link between work item and file reference.
POST /WorkItems/{id}/FileReferences
File location can be
When a work item is created based on the work template file references linked to the work template will also be linked to the work item.
With this endpoint user can delete the link between work item and file reference.
DELETE /WorkItems/{id}/FileReferences
With this endpoint user can get all file references that are linked to the work item
GET /WorkItems/{id}/FileReferences
Or get a specific file reference with the following endpoint
GET /WorkItems/{id}/FileReferences/{fileReferenceId}
#
Linking Deviations to WorkItemsLink Deviations to WorkItems to have overview on which deviations technicians are going to perform activities in scope of particular Work Item.
Use the following endpoints to link, unlink or get Work Item's Deviations or Deviation's Work Items.
GET /WorkItems/{id}/Deviations
POST /WorkItems/{id}/Deviations/{deviationId}
DELETE /WorkItems/{id}/Deviations/{deviationId}
GET /Deviations/{id}/WorkItems
POST /Deviations/{id}/WorkItems/{workItemId}
DELETE /Deviations/{id}/WorkItems/{workItemId}
#
Work Item TagsTags serve as metadata that describe the Entities and allow for easy categorization and organization. The tags are stored as an array of strings within each Work Item object. The tags
field is an array of strings representing the tags associated with the Entity.
When Work Item is created based on Work Template the Work Item inherits the tags associated with the Work Template.
#
File reference#
AIH locationIf location of the file reference is "AIH
" then file is located in "Files
" microservice. "id
" field of "aihFile
" corresponds to the file's Id in "Files
" microservice.
#
External locationIf location of the file reference is "External
" then the "url
" of the source should be specified. User also has the option to name the file from the external source.
#
TagsTags serve as metadata that describe the Entities and allow for easy categorization and organization. The tags are stored as an array of strings within each Work Item object.
Endpoints:
GET /Tags
This endpoint returns a list of all the distinct tags associated with Work Items and Work Templates in the system.
#
Medias#
Images#
Image Identification CriteriaTo ensure that the uploaded file is an image, the system checks several criteria:
- Extension: The system examines the file extension to identify if it matches common image formats. Supported image extensions include:
.jpg
.jpeg
.png
.gif
.bmp
.tiff
.ico
.webp
.heic
.svg
.avif
- MIME Type: The Multipurpose Internet Mail Extensions (MIME) type is another method of verifying the file's nature. The system validates the MIME type against a list of accepted image MIME types:
image/jpeg
image/jpeg
image/png
image/gif
image/bmp
image/tiff
image/x-ico
image/webp
image/heic
image/svg+xml
image/avif
File Headers: The system analyzes the first 8 bytes of the file to determine its type. These file headers provide crucial information about the file and are different from the file extension. This method helps prevent users from deceiving the system by renaming files with incorrect extensions.
File Content: The system checks for file corruption to ensure that the uploaded file remains intact during the resizing process. If the file appears to be tampered with or corrupt, the system retains the original image without any resizing.
#
Image resizingWhen users upload images to the system via the POST /Medias
endpoint. The system performs various checks to determine if the uploaded file is indeed an image. If the file is a valid image, the system resizes it based on predefined rules and stores the resized versions for retrieval.
If the system successfully identifies the uploaded file as a valid image, it initiates the image resizing process. However, images are resized only if their dimensions exceed a predefined threshold. The resizing follows the guidelines below:
Original Size
: The image can be retrieved in its original size by using the query parameter size=Original when accessing the /Medias/{id}/Data endpoint.Medium Size
: To obtain a resized version with a maximum dimension of 1000 pixels, use the query parameter size=Medium. The aspect ratio of the original image is preserved, meaning the max dimension (width or height) will be adjusted to fit within the1000 pixels
limit while maintaining proportionality.Small Size
: Similarly, you can retrieve a smaller version with a maximum dimension of256 pixels
using the query parameter size=Small. The aspect ratio is maintained during this resizing process.
In GET /Medias/{id}/Data will be added new query parameter size with values [Original, Medium, Small] which for now will be supported only for Images.