Relyence User Guide
Relyence API Functions

Relyence API Functions

Depending upon how you intend to integrate with the Relyence API, you will need a set of wrapper functions to access the functions available through the Relyence API. If you start with the Relyence supplied example code, a set of wrapper functions are there for you to use as a starting point. The Relyence supplied code can be used as a starting point if you are using C#.

Details of the Relyence supplied wrapper functions are outlined below.

Initialization Functions

1. Initializing a new instance

Initializes a new instance of the RelyenceAPI client. If website address is not included, app.relyence.com is used.

RelyenceAPI(string APIKey, string username, string password, string version, string websiteAddress)

2. Initializing a New Connection

Initializes a new connection. Uses the parameters passed in during creation of the client object to sign in to Relyence and retrieve a new Authorization Code. If sign in fails, this function will fail.

intializeConnection()

Analysis Functions

1. Get Analyses

Returns a list of Analyses.

GetAnalyses(fileType)

  • fileType: A numerical indicator of the type of Relyence file, such as Analysis (optional; 0 is assumed if no value is passed)
    • 0 - Analysis
    • 10 - Knowledge Bank
    • 11 - Analysis Revision
    • 19 - Event Library
    • 20 - Fault Tree Library

2. Get Analysis

Returns information of the requested Analysis.

GetAnalysis(int AnalysisID)

3. Get Subsystems

Returns a list of Subsystems, and optionally Parts, in an Analysis sorted hierarchically. Optionally returns associated Reliability Prediction calculation results and FRACAS calculation results.

GetSubsystems(int analysisId, bool getPredictionResults=FALSE, bool getFracasResults=FALSE, bool getParts=FALSE, List <string> fields)

  • analysisId: The ID of the Analysis from which you want to retrieve Subsystems.
  • getPredictionResults: Set to retrieve calculated Reliability Prediction results.
  • getFRACASResults: Set to retrieve calculated FRACAS results.
  • getParts: Set to include Parts in the list of Subsystems.
  • fields: JSON list of data fields to retrieve for the Subsystems. Leave empty to return all data fields.

4. Get URL

Returns the URL of a requested Analysis item.

GetURL(int analysisId, string table=null, int recordId=-1, int module=-1, int fmeaType=-1, int urlType=3)

  • analysisId: The ID of the Analysis the item is in.
  • table: The Relyence Table Type: Functions, Modes, Actions, Causes, Characteristics, ControlMethods, Effects, Requirements, VerificationPlans, VerificationReports, Components, Problems, Incidents
  • recordId: The ID of the record.
  • module: A numerical indicator of the Relyence Product:
    • 0 - FMEA
    • 1 - FRACAS
    • 2 - Fault Tree
    • 3 - Reliability Prediction
    • 8 - RBD
    • 9 - Weibull
    • 10 - Maintainability
  • fmeaType: A numerical indicator of the type of FMEA:
    • 0 - FMECA
    • 1 - Design FMEA
    • 2 - Process FMEA
  • urlType: A numerical indicator of the URL to return:
    • 0 - Analysis
    • 1 - Analysis Tree
    • 2 - Table
    • 3 - Form
    • 4 - Analysis Tree Properties Form

FMEA Functions

1. Get FMEA Functions

Returns a list of Functions and all its associated data from an Analysis, optionally filtered by Subsystem. Data associated with the Function includes data across all related Worksheets. For example, for PFMEAs, the data returned includes the Process Flow Diagram (PFD), the PFMEA Worksheet, and Control Plan (CP) data associated with the Function.

GetFunctions(int analysisId, List <string> fields, int subsystemId, int fmeaType)

  • analysisId: The ID of the Analysis from which you want to retrieve for the Functions.
  • fields: JSON list of data fields to retrieve for the Functions. Leave empty to return all data fields.
  • subsystemId: If you want to retrieve Functions associated with a selected Subsystem, set to ID of desired Subsystem. To return a list of all Functions in the Analysis, set subsystemId to '0'.
  • fmeaType: A numerical indicator of the type of FMEA:
    • 0 - FMECA
    • 1 - Design FMEA
    • 2 - Process FMEA
    • 3 - FMEA-MSR

2. Get FMEA Function

Returns a Function and the requested fields.

GetFunction(int id, List <string> fields)

  • id: The ID of the Function to retrieve.
  • fields: JSON list of data fields to retrieve for the Function. Leave empty to return all data fields.

3. Insert FMEA Function

Inserts a FMEA Function and associated data into an Analysis.

InsertFunction(int subsystemId, int fmeaType, List <string> fields)

  • subsystemId: ID of desired Subsystem to which the Function will be added.
  • fmeaType: A numerical indicator of the type of FMEA:
    • 0 - FMECA
    • 1 - Design FMEA
    • 2 - Process FMEA
    • 3 - FMEA-MSR
  • fields: JSON list of data fields to insert for the Function.

4. Update FMEA Function

Updates a FMEA Function and associated data in an Analysis.

EditFunction(int id, Dictionary<string, object> listValues)

  • id: The ID of the Function you want to update.
  • listValues: JSON string of field name/data value pairs for the Function.

5. Delete FMEA Function

Deletes a FMEA Function from an Analysis.

DeleteFunction(int id)

  • id: The ID of the Function to delete.

6. Get Recommended Actions

Returns a list of Recommended Actions and all associated data from an Analysis, optionally filtered by Subsystem.

GetRecommendedActions(int analysisId, List <string> fields, int fmeaType)

  • analysisId: The ID of the Analysis from which you want to retrieve Recommended Actions.
  • fields: JSON list of data fields to retrieve for the Recommended Actions. Leave empty to return all data fields.
  • fmeaType: A numerical indicator of the type of FMEA:
    • 0 - FMECA
    • 1 - Design FMEA
    • 2 - Process FMEA
    • 3 - FMEA-MSR

7. Update Recommended Actions

Updates a FMEA Recommended Action and associated data in an Analysis.

EditRecommendedAction(int actionId, Dictionary<string, object> listValues)

  • actionId: The ID of the Recommended Action record you want to update.
  • listValues: JSON string of field name/data value pairs for the Recommended Action.

FRACAS Functions

1. Get FRACAS Incidents

Returns a list, or filtered list, of Incidents.

GetIncidents(int analysisId, List<string> fields, int incidentId=0, int subsystemId=0, int problemId=0, bool unassociated=FALSE)

  • analysisId: The ID of the Analysis from which you want to retrieve Incidents.
  • fields: JSON list of data fields to retrieve for Incidents. Leave empty to return all data fields.
  • incidentId: If you want to retrieve a single Incident, set to ID of desired Incident.
  • subsystemId: If you want to retrieve Incidents associated with a selected Subsystem, set to ID of desired Subsystem. Ignored if incidentId is set.
  • problemId: If you want to retrieve Incidents associated with a selected Problem, set to ID of desired Problem. Ignored if incidentId or subsystemId is set.
  • unassociated: Set to retrieve only Incidents not associated with any Subsystem. Ignored if incidentId, subsystemId, or problemId is set.

2. Get FRACAS Incident ID

Returns an Incident ID given the Analysis ID and the Incident Identifier.

GetIncidentId(int analysisId, string incidentIdentifier)

  • analysisId: The ID of the Analysis that contains the Incident.
  • incidentIdentifier: The Incident Identifier of the Incident.

3. Insert FRACAS Incident

Inserts a FRACAS Incident and associated data into an Analysis.

InsertIncident(int analysisId, Dictionary<string, object> listValues, int subsystemId=null, int problemId=null)

  • analysisId: The ID of the Analysis to insert the Incident into.
  • listValues: JSON string of field name/data value pairs for the Incident.
  • subsystemId: ID of the Subsystem to associate the Incident with (optional).
  • problemId: ID of the Problem to associate the Incident with (optional).

4. Update FRACAS Incident

Updates a FRACAS Incident with new data.

EditIncident(int incidentId, Dictionary<string, object> listValues)

  • incidentId: The ID of the Incident to update.
  • listValues: JSON string of field name/data value pairs for the Incident.

5. Delete FRACAS Incident

Deletes a FRACAS Incident. 

DeleteIncident(int incidentId)

  • incidentId: The ID of the Incident to delete.

6. Get FRACAS Problems

Returns a list or filtered list of Problems.

GetProblems(int analysisId, List<string> fields, int problemId=0, int subsystemId=0, int incidentId=0, bool unassociated=FALSE)

  • analysisId: The ID of the Analysis from which you want to retrieve Problems.
  • fields: JSON list of data fields to retrieve for Problems. Leave empty to return all data fields.
  • problemId: If you want to retrieve a single Problem, set to ID of desired Problem.
  • subsystemId: If you want to retrieve Problems associated with a selected Subsystem, set to ID of desired Subsystem. Ignored if problemId is set.
  • incidentId: If you want to retrieve Problems associated with an Incident, set the ID of the desired Incident. Ignored if problemId or subsystemId is set.
  • unassociated: Set to retrieve only Problems not associated with any Subsystem. Ignored if problemId, subsystemId, or incidentId is set.

7. Get FRACAS Problem ID

Returns an Problem ID given the Analysis and Problem Identifier.

GetProblemId(int analysisId, string problemIdentifier)

  • analysisId: The ID of the Analysis that contains the Problem.
  • problemIdentifier: The Problem Identifier of the Problem.

8. Insert FRACAS Problem

Inserts a FRACAS Problem and associated data into an Analysis.

InsertProblem(int analysisId, Dictionary<string, object> listValues, int subsystemId=null, int incidentId=null)

  • analysisId: The ID of the Analysis to insert the Problem into.
  • listValues: JSON string of field name/data value pairs for the Problem.
  • subsystemId: ID of the Subsystem to associate the Problem with (optional).
  • incidentId: ID of the Incident to associate the Problem with (optional).

9. Update FRACAS Problem

Updates a FRACAS Problem with new data.

EditProblem(int problemId, Dictionary<string, object> listValues)

  • problemId: The ID of the Problem to update.
  • listValues: JSON string of field name/data value pairs for the Problem.

10. Delete FRACAS Problem

Deletes a FRACAS Problem. 

DeleteProblem(int problemId)

  • problemId: The ID of the Problem to delete.

11. Update FRACAS Custom List

Adds elements to a FRACAS custom list, optionally creating a new list and clearing the list. 

AddChoicesToList(int analysisId, List<string> listChoices, string listName, bool createList, bool clearList)

  • analysisId: The ID of the Analysis containing the List.
  • listChoices: JSON string of choices to add to the List.
  • listName: The name of the List to add the choices to.
  • createList: Set to create the List if it doesn't exist.
  • clearList: Set to clear out the existing List and then add in the new choices.

12. Get FRACAS Results

Returns the calculation results from a FRACAS. 

GetSubsystems(int analysisId, false, true)

  • analysisId: The ID of the Analysis from which you want to retrieve results.

13. Get FRACAS Incident Subtable Records

Returns a list, or filtered list, of Incident Subtable Records.

GetIncidentSubtableRecords(int analysisId, string subtableName, List<string> fields, int incidentId=0, string incidentIdentifier=null)

  • analysisId: The ID of the Analysis from which you want to retrieve Incident Subtable records.
  • subtableName: The name of the Incident Subtable from which you want to retrieve records.
  • fields: JSON list of data fields to retrieve for Incident Subtable records. Leave empty to return all data fields.
  • incidentId: If you want to retrieve a single Incident Subtable record, set to ID of desired Incident Subtable record.
  • incidentIdentifier: If you want to retrieve a single Incident Subtable record, set to Identifier of desired Incident Subtable record. 

14. Get FRACAS Incident Subtable Record

Returns a single Incident Subtable Record.

GetIncidentSubtableRecord(int id, List<string> fields)

  • id: The ID of desired Incident Subtable record.
  • fields: JSON list of data fields to retrieve for the Incident Subtable record. Leave empty to return all data fields.

15. Insert FRACAS Incident Subtable Record

Inserts a FRACAS Incident Subtable record and associated data into an Analysis.

InsertIncidentSubtableRecord(int analysisId, string subtableName, int incidentId=null, string incidentIdentifier=null, List <string> fields)

  • analysisId: The ID of the Analysis to insert the Incident Subtable record into.
  • subtableName: The Name of the Incident Subtable to which to insert the new record.
  • incidentId: ID of the Incident to associate the Incident Subtable records with (optional).
  • incidentIdentifier: Identifier of the Incident to associate the Incident Subtable records with (optional).
  • fields: JSON list of data fields to insert for the Incident Subtable record.

16. Update FRACAS Incident Subtable Record

Updates a FRACAS Incident Subtable record with new data.

EditIncidentSubtableRecord(int id, Dictionary<string, object> listValues)

  • id: The ID of the Incident Subtable record to update.
  • listValues: JSON string of field name/data value pairs for the Incident Subtable record.

17. Delete FRACAS Incident Subtable Record

Deletes a FRACAS Incident Subtable record. 

DeleteIncidentSubtableRecord(int id)

  • id: The ID of the Incident Subtable record to delete.

18. Get FRACAS Problem Subtable Records

Returns a list, or filtered list, of Problem Subtable Records.

GetProblemSubtableRecords(int analysisId, string subtableName, List<string> fields, int problemId=0, string problemIdentifier=null)

  • analysisId: The ID of the Analysis from which you want to retrieve Problem Subtable records.
  • subtableName: The name of the Problem Subtable from which you want to retrieve records.
  • fields: JSON list of data fields to retrieve for Problem Subtable records. Leave empty to return all data fields.
  • problemId: If you want to retrieve a single Problem Subtable record, set to ID of desired Problem Subtable record.
  • problemIdentifier: If you want to retrieve a single Problem Subtable record, set to Identifier of desired Problem Subtable record. 

19. Get FRACAS Problem Subtable Record

Returns a single Problem Subtable Record.

GetProblemSubtableRecord(int id, List<string> fields)

  • id: The ID of desired Problem Subtable record.
  • fields: JSON list of data fields to retrieve for the Problem Subtable record. Leave empty to return all data fields.

20. Insert FRACAS Problem Subtable Record

Inserts a FRACAS Problem Subtable record and associated data into an Analysis.

InsertProblemSubtableRecord(int analysisId, string subtableName, int problemId=null, string problemIdentifier=null, List <string> fields)

  • analysisId: The ID of the Analysis to insert the Problem Subtable record into.
  • subtableName: The Name of the Problem Subtable to which to insert the new record.
  • incidentId: ID of the Problem to associate the Problem Subtable records with (optional).
  • incidentIdentifier: Identifier of the Problem to associate the Problem Subtable records with (optional).
  • fields: JSON list of data fields to insert for the Problem Subtable record.

21. Update FRACAS Problem Subtable Record

Updates a FRACAS Problem Subtable record with new data.

EditProblemSubtableRecord(int id, Dictionary<string, object> listValues)

  • id: The ID of the Problem Subtable record to update.
  • listValues: JSON string of field name/data value pairs for the Problem Subtable record.

22. Delete FRACAS Problem Subtable Record

Deletes a FRACAS Problem Subtable record. 

DeleteProblemSubtableRecord(int id)

  • id: The ID of the Problem Subtable record to delete.

Reliability Prediction

1. Get Reliability Prediction Parts

Returns a list of Parts from an Analysis, or from a Subsystem in an Analysis. 

GetParts(int analysisId, List<string> fields, int subsystemId)

  • analysisId: The ID of the Analysis to retrieve Parts from.
  • fields: JSON list of data fields to retrieve for the Parts. Leave empty to return all data fields.
  • subsystemID: If you want to retrieve Parts associated with a selected Subsystem, set to the ID of the desired Subsystem.

2. Get Reliability Prediction Part

Returns all Parts matching given Part Number from an Analysis, or from a Subsystem in an Analysis.

GetPart(int analysisId, string partNumber, int subsystemId)

  • analysisId: The ID of the Analysis to retrieve the Parts from.
  • partNumber: the Part Numbers to retrieve.
  • subsystemId: If you want to retrieve Parts from a selected Subsystem, set to the ID of the desired Subsystem.

3. Insert Reliability Prediction Part

Inserts a Part and associated data. 

InsertPart(int subsystemId, Dictionary<string, object> listValues)

  • subsystemId: The ID of the Subsystem to insert the Part into.
  • listValues: JSON string of field name/data value pairs for the Part.

4. Update Reliability Prediction Part

Updates a Part with new data.

EditPart(int partId, Dictionary<string, object> listValues)

  • partId: ID of the Part to update.
  • listValues: JSON string of field name/data value pairs for the Part.

5. Delete Reliability Prediction Part

Deletes a Part. 

DeletePart(int partId)

  • partId: ID of the Part to delete.

6. Get Reliability Prediction Results

Returns the calculation results from a Reliability Prediction Analysis. 

GetSubsystems(int analysisId, true)

  • analysisId: The ID of the Analysis from which you want to retrieve results.

RBD Functions

1. Get RBDs

Returns a list of top level RBDs that includes the following: a list of calculation results, a list of calculation parameters, a list of Blocks, and a list of Connections.

GetRbds(int analysisId)

  • analysisId: The ID of the Analysis from which you want to retrieve results.

2. Edit RBD

Updates an RBD with new data.

EditRbd(int blockId, Dictionary<string, object> listValues)

  • blockId: The ID of the RBD for which you want to update data.
  • listValues: JSON string of field name/data value pairs for the RBD.

Fault Tree Functions

1. Get Fault Tree Results

Returns a list of Fault Tree Top Gates and their calculation results, as well as a list of Gates and Events.

GetFaultTreeResults(int analysisId)

  • analysisId: The ID of the Analysis from which you want to retrieve results.

2. Edit Fault Tree

Updates a Fault Tree with new data.

EditFaultTree(int gateId, Dictionary<string, object> listValues)

  • gateId: The ID of the top gate for which you want to update data.
  • listValues: JSON string of field name/data value pairs for the Fault Tree.

Weibull Functions

1. Get Weibull Results

Returns a list of Weibull Data Sets and their calculation results. 

GetWeibullResults(int analysisId)

  • analysisId: The ID of the Analysis from which you want to retrieve results.