Glossary

TermDefinition
Action PlanAn action plan is a set of issues (i.e. violations requiring a remedial action)
Code FragmentA code fragment identifies a file contents extract.
Component Snapshot

A component is a source code item such as a class, a method, etc. The effective definition depends on the programming language and the technology of the analyzed application. Container of a component is either an application or a module. 

A defective component is a component in violation with a quality rule pattern.

Defects SummaryStatistics of defects impacting a business criterion for all components in the scope of a tree node
Diagnosis Findings

Diagnosis Findings pinpoint statements or properties of the defective component violating a quality rule pattern.

Diagnosis ValueA diagnosis findings reported as a value.
File ContentsRaw text of a source file.
OMG FunctionsData Function or Transaction as results of Function Point analysis (see "International Function Point Users Group")
Issue

An issue reports a remedial action in a context of an application snapshot.
Component and quality rule pattern match either a violation that should have been addressed in previous snapshots, or that will have to be addressed before next snapshot.

Remedial ActionA remedial action describes a user input request to correct a component regarding a quality rule-pattern.
TransactionA set of components involved in a transaction processing
Tree Node

Hierarchy relation of a component. This hierarchy relation depends on the programming language. For example, a node for a "Java Package" component, will be parent node of "Java Class" nodes.

WARNING: a component may be reached from several tree nodes

Violation

A violation identifies a defective component breaking a quality rule pattern.

IMPORTANT: For a given component and a given quality rule pattern there is 0 or 1 violation. If a component breaks a rule N times, then each occurrence is detailed into diagnosis findings structure with a value counter equals to N, and/or with N values, and/or with N code bookmarks.

A critical violation is a violation of a quality rule identified as critical regarding a technical criterion or a business criterion.

Risk assessment is based on defective components number compared to observable components number.



OMG Data Functions and Transactions (Excel/CSV Representation only)

Warning

Even in case of a restricted license, authorizations.xml configuration is applied for these URLs.

URI Templates

HTTP ActionMedia TypeURI TemplatesDescription
GETtext/csv{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/ifpug-functionsArray of Functions.
application/vnd.openxmlformats-
officedocument.spreadsheetml.sheet
GET text/csv{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/ifpug-functions-evolution Array of Functions. 
application/vnd.openxmlformats-
officedocument.spreadsheetml.sheet
GETtext/csv{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/omg-functions-functional-evolution{?parameters} Array of Functions
application/vnd.openxmlformats-
officedocument.spreadsheetml.sheet

Parameters

URI Parameter

Description

Values

Default value

sheet

Specify the sheet you want to retrieve (only for CSV format)

Possible values are:

  • sheet=context
  • sheet=functional
  • sheet=technical
a stringnone

 CSV Representation

Columns
Description
Type
Occurs
Element TypeWhether this object is a Data Function or a TransactionString1
Object NameFull nameString1
Nb of FPsNumber of Function Points for this FunctionInteger1
FP detailsDetails on the Function Points for this FunctionString1
Object TypeType of this FunctionString1
Module nameName of a functional module containing this FunctionString1
TechnologyTechnology to which this Function belongsString1

Excel Representation

Columns
Description
Type
Occurs
Element TypeWhether this object is a Data Function or a TransactionString1
Object NameFull nameString1
Nb of FPsNumber of Function Points for this FunctionInteger1
Impact Factor (for AFP or EFP)
Complexity Factor (for AEFP) 
Multipying factor for Adjusted FP
available for Transactions only since version 8.0
available for Data Functions since version 8.1
available for AEFP since version 8.2 
Float1
TypeOMG Function typeString0..1
DETData Element TypeInteger0..1
RETRecord Element TypeInteger0..1
EIFExternal Interface FileInteger0..1
ILF Internal Logical FileInteger0..1
FTRFile Type ReferencedInteger0..1
Object TypeType of this FunctionString1
Module nameName of a functional module containing this FunctionString1
TechnologyTechnology to which this Function belongsString1

Transaction Directory

URI Templates

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/json{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/transactionsA Transaction directory

JSON Representation

Properties
Description
Type
Occurs
hrefAuto referenceURI1
nameNameString1
security.href

Reference to get transactions by risk propagation index for Security

URI1
efficiency.hrefReference to get transactions by risk propagation index for EfficiencyURI1
robustness.hrefReference to get transactions by risk propagation index for RobustnessURI1

JSON Example

{
	"href": "DEMO/applications/3/snapshots/8/transactions",
	"name": "Transactions for application DEMO in snapshot 2",
	"security": {
		"href": "DEMO/applications/3/snapshots/8/transactions/60016",
		"name": "Transactions ordered by Risk Propagation Index for Security"
	},
	"efficiency": {
		"href": "DEMO/applications/3/snapshots/8/transactions/60014",
		"name": "Transactions ordered by Risk Propagation Index for Efficiency"
	},
	"robustness": {
		"href": "DEMO/applications/3/snapshots/8/transactions/60013",
		"name": "Transactions ordered by Risk Propagation Index for Robustness"
	}
}

Transaction

URI Templates & Parameters

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/json{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/transactions/{BusinessCriterionId}/{?parameters}Array of Transactions
URI Parameter
Description
Values
Default value
startRowSpecify first iteman integer1
nbRowsSpecify max number of items to return or the '$all' keywordan integer or the '$all' keyword10


JSON Representation

Properties

Description

Type

Occurs

hrefReference to a transactionURI1
nameTransaction full nameString1
shortNameTransaction short nameString1
transactionRiskIndexRisk assessment according to a health factor
(if the business criterion is a health factor, this value is displayed, otherwise it is not) 
int0 or 1

JSON Example

[
	{
		"href": "DEMO/transactions/21/snapshots/8",
		"name": "[F:\CASTMS\TSTAEP82\Deploy\Shopizer\shopizer_src\sm-shop\WebContent\customer\address.jsp]",
		"shortName": "address.jsp",
		"transactionRiskIndex": 1291
	},
	{
		"href": "DEMO/transactions/22/snapshots/8",
		"name": "[F:\CASTMS\TSTAEP82\Deploy\Shopizer\shopizer_src\sm-central\WebContent\cartproperties\cartproperties.jsp]",
		"shortName": "cartproperties.jsp",
		"transactionRiskIndex": 851
	}
]

Tree Node 

URI Templates & Parameters

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/json{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/tree-nodeTree-node attached to this application. This is the root of all tree nodes.
GETapplication/json{Domain}/modules/{ModuleID}/snapshots/{SnapshotID}/tree-nodeTree-node attached to this module.
GETapplication/json{Domain}/tree-nodes/{Level}-{LowerID}-{UpperID}/snapshots/{SnapshotID}Tree-node detail
GETapplication/json{Domain}/tree-nodes/{Level}-{LowerID}-{UpperID}/snapshots/{SnapshotID}/children/{?parameters}

Array of direct tree node children for TQI by default. Tree nodes are ordered by names.

GETapplication/json{Domain}/tree-nodes/{Level}-{LowerID}-{UpperID}/snapshots/{SnapshotID}/ancestors

Array of all tree node ancestors. Tree Nodes are ordered by descending node levels

GETapplication/json{Domain}/components/{ComponentID}/snapshots/{SnapshotID}/tree-nodesArray of tree-nodes related to this component as a component may be reached from several tree nodes.
URI Parameter
Description
Values
Default value
startRowSpecify first iteman integer1
nbRowsSpecify max number of items to returnan integer10

JSON Representation

Properties
Description
Type
Occurs
hrefAuto referenceURI1
nameNameString1
component

Related component

There is no component for a tree-node attached to an application or a module.

Structure0..1
component.name

Related component

There is no component for a tree-node attached to an application or a module.

URI1
component.type.nameComponent type name. This name can be used as a file name of a PNG image.String1
component.type.labelComponent type label: "C++ Class", "Java Class", "Java Method"String1
defects-summary.hrefURI to get statistics of defects: defective components, violated rule patterns, violationsURI1
children.href

URI to get all direct children nodes

Warning: Undefined for leaf nodes.

URI0..1
ancestors.href

URI to get all parents of this tree node.

Warning: Undefined for the root tree-node wich is the application.

URI0..1

JSON Example

	{
		"href": "CASTONCAST/tree-nodes/3-63888-63923/snapshots/2",
		"name": "AMTActionsImpl::CAMTTestDomifier",
		"component": {
			"name": "[S:\\CAIP\\SRC\\...[CAMTTestDomifier]",
			"type": {
                    "name": "C_CLASS",
				    "label": "C++ Class"
            },
			"sourceCodes": {
				"href": "CASTONCAST/components/231310/snapshots/2/source-codes",
				"name": "Source Codes"
			}
		},
		"defectsSummary": {
			"href": "CASTONCAST/tree-nodes/3-63888-63923/snapshots/2/defects-summary",
			"name": "Defects"
		},
		"children": {
			"href": "CASTONCAST/tree-nodes/3-63888-63923/snapshots/2/children",
			"name": "Children"
		},
		"ancestors": {
			"href": "CASTONCAST/tree-nodes/3-63888-63923/snapshots/2/ancestors",
			"name": "Ancestors"
		}
	}
{
	"href": "ENDTOEND83/tree-nodes/4-3231-3234/snapshots/16",
	"name": "ListTitles.jsp",
	"component": {
		"href": "ENDTOEND83/components/36382/snapshots/16",
		"name": "[c:\\jenkins6_slave\\workspace\\CAIP_Trunk_TestE2E_CSS_ADG\\Work\\CAST\\Deploy\\Jurassic Park\\JSPBookDemo\\ListTitles.jsp]",
		"shortName": "ListTitles.jsp",
		"type": {
			"label": "eFile",
			"name": "CAST_Web_File"
		},
		"sourceCodes": {
			"href": "ENDTOEND83/components/36382/snapshots/16/source-codes",
			"name": "Source Codes"
		},
		"treeNodes": {
			"href": "ENDTOEND83/components/36382/snapshots/16/tree-nodes",
			"name": "Tree Nodes"
		},
		"codeLines": 81,
		"commentedCodeLines": null,
		"commentLines": 0,
		"coupling": 1,
		"fanIn": 1,
		"fanOut": 17,
		"cyclomaticComplexity": 4,
		"ratioCommentLinesCodeLines": 0,
		"halsteadProgramLength": 126,
		"halsteadProgramVocabulary": 40,
		"halsteadVolume": 464.798811218356,
		"distinctOperators": 12,
		"distinctOperands": 28,
		"integrationComplexity": 4,
		"essentialComplexity": 1
	},
	"defectsSummary": {
		"href": "ENDTOEND83/tree-nodes/4-3231-3234/snapshots/16/defects-summary",
		"name": "Defects"
	},
	"children": {
		"href": "ENDTOEND83/tree-nodes/4-3231-3234/snapshots/16/children",
		"name": "Children"
	},
	"ancestors": {
		"href": "ENDTOEND83/tree-nodes/4-3231-3234/snapshots/16/ancestors",
		"name": "Ancestors"
	}
}

Defects Summary

URI Templates & Parameters

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/json{Domain}/tree-nodes/{Level}-{LowerID}-{UpperID}/snapshots/{SnapshotID}/defects-summary{?parameters}Summary of defects
URI ParameterDescriptionValuesDefault value
business-criterionBusiness Criterion to compute statisticsAn integer60017 (TQI)

JSON Representation

Properties
Description
Type
Occurs
hrefAuto referenceURI1
nameNameString1
violations.numberNumber of violations impacting a business criterionInteger1
defectiveComponents.numberNumber of defective components impacting a business criterionInteger1
violatedRulePatterns.hrefURI to get list of violated rule patterns in the scope of this nodeURI1
violatedRulePatterns.number

Number of violated rules patterns impacting a business criterion

For each rule-pattern, see "violation" resource to get list of violations.

Integer1
criticalViolations.numberNumber of critical violations impacting a business criterionInteger1
defectiveComponentsToCriticalRules.numberNumber of defective components impacting the critical rules of a business criterionInteger1
violatedCriticalRulePatterns.number

Number of critical violated rules patterns impacting a business criterion

Integer1

JSON Example

{
    "href": "DEMO/tree-nodes/1-2-1827/snapshots/28/defects-summary?business-criterion=60017",
    "name": "eCommerce DataAccess",
    "violations": {
         "number": 9164
    },
    "defectiveComponents": {
         "number": 3501
    },
    "violatedRulePatterns": {
         "name": "Violated Rule Patterns",
         "href": "DEMO/tree-nodes/1-2-1827/snapshots/28/violated-rule-patterns?business-criterion=60017",
         "number": 227
    },
    "criticalViolations": {
         "number": 53
    },
    "defectiveComponentsToCriticalRules": {
         "number": 256
    },
    "violatedCriticalRulePatterns": {
         "number": 11
    }
}

Violated Rule Pattern

URI Templates & Parameters

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/json

{Domain}/tree-nodes/{Level}-{LowerID}-{UpperID}/snapshots/{SnapshotID}/violated-rule-patterns{?parameters}

An array of violated rule patterns ordered by violations number
text/csv
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

URI Parameters
Description
Values
Default value
business-criterionSpecify a business criterion to select rule patterns which associated Quality Rule indicator is contributing to a business criterionan integer60017 (TQI)

JSON Representation

Properties
Description
Type
Occurs
rulePattern.hrefAuto referenceURI1
violations.nameNameString1
violations.hrefReference to get the list of violations

violations.numberNumber of violations/defective components for this rule patternInteger1

JSON Example

{
   "rulePattern": {
        "href": "DEMO/rule-patterns/554"
    },
    "violations":  {
         "name": "Violations",
          "href": "DEMO/tree-nodes/0-1-64400/snapshots/28/violations?rule-pattern=554&business-criterion=60017",
          "number" : 19579
    }
}

EXCEL Example

Object NameBusiness criterionMetric NameMetric IdWeightCriticalSnapshot DateViolations
IFPUGTotal Quality IndexDeclare as Static all methods not using instance members72708true2013-6-21430

Components Directory

URI Templates & Parameters 

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/json{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/componentsA Components directory
GETapplication/json{Domain}/modules/{ModuleID}/snapshots/{SnapshotID}/componentsA Components directory

JSON Representation

Properties
Description
Type
Occurs
hrefAuto referenceURI1
nameNameString1
security.hrefReference to get components ordered by risk propagation index for SecurityURI1
efficiency.hrefReference to get components ordered by risk propagation index for EfficiencyURI1
robustness.hrefReference to get components ordered by risk propagation index for RobustnessURI1
transferability.hrefReference to get components ordered by risk propagation index for TransferabilityURI1
changeability.hrefReference to get components ordered by risk propagation index for ChangeabilityURI1

JSON Example

{
	"href": "DEMO/applications/3/snapshots/8/components",
	"name": "Components for object DEMO in snapshot 2",
	"security": {
		"href": "DEMO/applications/3/snapshots/8/components/60016",
		"name": "Components ordered by Risk Propagation Index for Security"
	},
	"efficiency": {
		"href": "DEMO/applications/3/snapshots/8/components/60014",
		"name": "Components ordered by Risk Propagation Index for Efficiency"
	},
	"robustness": {
		"href": "DEMO/applications/3/snapshots/8/components/60013",
		"name": "Components ordered by Risk Propagation Index for Robustness"
	},
	"transferability": {
		"href": "DEMO/applications/3/snapshots/8/components/60011",
		"name": "Components ordered by Risk Propagation Index for Transferability"
	},
	"changeability": {
		"href": "DEMO/applications/3/snapshots/8/components/60012",
		"name": "Components ordered by Risk Propagation Index for Changeability"
	}
}

Component Snapshot

URI Templates & Parameters 

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/json{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/components/{HealthFactorID}/{?parameters}Array of Components of an application snapshot filtered by Health Factor
text/csv
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
GETapplication/json{Domain}/modules/{ModuleID}/snapshots/{SnapshotID}/components/{HealthFactorID}/{?parameters}Array of Components of a module snapshot filtered by Health Factor
text/csv
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
GETapplication/json{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/components/{DistributionID}/{categoryRank}/{?parameters}Array of Components of a distribution
GETapplication/json{Domain}/modules/{ModuleID}/snapshots/{SnapshotID}/components/{ DistributionID }/{categoryRank}/{?parameters}Array of Components of a distribution
GETapplication/json{Domain}/applications/{ApplicationID}/components/65005/ {?parameters}Array of Components for Cost Complexity
GETapplication/json{Domain}/modules/{ModuleID}/components/65005/ {?parameters}Array of Components for Cost Complexity
GETapplication/json{Domain}/components/{ComponentD}/snapshots/{SnapshotID}A component snapshot

Common parameters

URI Parameters
Description
Values
Default value
startRowSpecify first iteman integer1
nbRowsSpecify max number of items to returnan integer10
business-criterionA health factor ID to compute propagated risk indexStringNone

Additional parameters for {Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/components/{HealthFactorID} and {Domain}/modules/{ModuleID}/snapshots/{SnapshotID}/components/{ HealthFactorID }:

URI Parameters

Description

Values

Default value

properties

List of component properties which should be non-null to filter the components

Eg, properties=(cyclomaticComplexity,fanOut) filters the components keeping only those which have a non-null cyclomaticComplexity and a non-null fanOut

The available properties are: codeLines, commentedCodeLines, commentLines, coupling, fanIn, fanOut, cyclomaticComplexity, ratioCommentLinesCodeLines, halsteadProgramLength, halsteadProgramVocabulary, halsteadVolume, distinctOperators, distinctOperands, integrationComplexity, essentialComplexity.

Their values are known only for the last snapshot.

a list of predefined stringsNone
order

See Indexed Violation order

By default, components are ordered by PRI desc (if any), component full name asc, component id asc

The sortable columns are all the above properties, plus the following : pri, component-name, component-id

a list of sort ordersNone

Only parameters applicable to {Domain}/applications/{ApplicationID}/components/65005/{?parameters} and {Domain}/modules/{ModuleID}/components/65005/{?parameters}

URI Parameters

Description

Values

Default value

snapshot-ids

Two snapshot ids (snapshot range to consider)

Eg. snapshot-ids=(12,14)

Two comma separated integersnone
status

Status of the artifacts between snapshots S1 and S2

Possible values are one of the following: added, updated, deleted

Stringnone
technologiesA technology name to filter artifactsStringnone


JSON Representation

Properties
Description
Scope
Type
Occurs
hrefAuto referencen/aURI1
nameFull name of the component.n/aString1
shortNameShort name of the componentn/aString1
propagationRiskIndexRisk propagation assessment index according to an input health factor.
This attribute is not set, if health factor is not specified
Enabled if a business criterion is specifiedInteger0..1
statusAn enumeration value of ["added", "updated", "unchanged"]n/aString0..1
sourceCodes.href

A reference to get an array of code fragments.
Each code fragment is a part of the source code.

This data is set only for the last snapshot of this application

Enabled for last Application Snapshot onlyURI0..1
type.labelComponent type label: "C++ Class", "Java Class", "Java Method"n/aString0..1

type.name

Component type name. This name can be used as a file name of a PNG image.n/aString0..1
treeNodes.hrefA reference to get an array of all tree nodes linked to this componentEnabled for last snapshot onlyURI0..1

Additional parameters

(available through the {Domain}/components/{ComponentD}/snapshots/{SnapshotID} URL only, and the "component" parameter of {Domain}/tree-nodes/{Level}-{LowerID}-{UpperID}/snapshots/{SnapshotID} URL only)

Properties
Description
Scope
Type
Occurs
codeLinesNumber of code linesEnabled for last snapshot only, on requesting a single ComponentSnapshotInteger0..1
commentedCodeLinesNumber of commented code linesEnabled for last snapshot only, on requesting a single ComponentSnapshotInteger0..1
commentLinesNumber of comment linesEnabled for last snapshot only, on requesting a single ComponentSnapshotInteger0..1
couplingCouplingEnabled for last snapshot only, on requesting a single ComponentSnapshotInteger0..1
fanInNumber of ingoing calls/referencesEnabled for last snapshot only, on requesting a single ComponentSnapshotInteger0..1
fanOutNumber of outgoing calls/referencesEnabled for last snapshot only, on requesting a single ComponentSnapshotInteger0..1
cyclomaticComplexityCyclomatic ComplexityEnabled for last snapshot only, on requesting a single ComponentSnapshotInteger0..1
ratioCommentLinesCodeLinesThe total number of comments divided by the total number of code linesEnabled for last snapshot only, on requesting a single ComponentSnapshotDouble0..1
halsteadProgramLengthProgram length as the sum of number of operands and number of operatorsEnabled for last snapshot only, on requesting a single ComponentSnapshotInteger0..1
halsteadProgramVocabularySum of distinctOperators and distinctOperandsEnabled for last snapshot only, on requesting a single ComponentSnapshotInteger0..1
halsteadVolumeThe volume as programLength * log2(distinctOperands + distinctOperators)Enabled for last snapshot only, on requesting a single ComponentSnapshotDouble0..1
distinctOperatorsNumber of distinct operatorsEnabled for last snapshot only, on requesting a single ComponentSnapshotInteger0..1
distinctOperandsNumber of distinct operandsEnabled for last snapshot only, on requesting a single ComponentSnapshotInteger0..1
integrationComplexityIntegration Complexity measures the number of independent integration pathsEnabled for last snapshot only, on requesting a single ComponentSnapshotInteger0..1
essentialComplexityEssential Complexity measures the number of non-structured independent pathsEnabled for last snapshot only, on requesting a single ComponentSnapshotInteger0..1

JSON Example

{
    "href": "CENTRAL/components/4/snapshots/5",
    "name": "com.cast.monster_event.base.model.Monster.Monster",
	"shortName":"Monster",
    "status": "added",
    "sourceCodes": {
           "href": "CENTRAL/components/4/snapshots/5/source-codes",
           "name": "Source codes"
    },
    "treeNodes" : {
           "href": "CENTRAL/components/4/snapshots/5/tree-nodes",
           "name": "Tree nodes"
    }
}
{
	"href": "ENDTOEND83/components/34364/snapshots/16",
	"name": "WASecurityForm._Default.GetRawInputGet",
	"shortName": "GetRawInputGet",
	"type": {
		"label": "C# Method",
		"name": "CAST_DotNet_MethodCSharp"
	},
	"treeNodes": {
		"href": "ENDTOEND83/components/34364/snapshots/16/tree-nodes",
		"name": "Tree Nodes"
	},
	"codeLines": 1,
	"commentedCodeLines": null,
	"commentLines": 0,
	"coupling": 3,
	"fanIn": 2,
	"fanOut": 3,
	"cyclomaticComplexity": 1,
	"ratioCommentLinesCodeLines": 0,
	"halsteadProgramLength": 8,
	"halsteadProgramVocabulary": 8,
	"halsteadVolume": 16.635532333438686,
	"distinctOperators": 5,
	"distinctOperands": 3,
	"integrationComplexity": 1,
	"essentialComplexity": 1
}
ENDTOEND84/applications/7/components/65005?snapshot-ids=(3,15)&status=updated&technologies=(.NET)
[
	{
		"href": "ENDTOEND84/components/16879/snapshots/15",
		"name": "Pchit.Builder.AddListToList",
		"shortName": "AddListToList",
		"nbOfUpdates": 1,
		"complexity": "moderate risk",
		"sqlComplexity": "low risk",
		"granularity": "moderate risk",
		"lackOfComments": "moderate risk",
		"coupling": "low risk",
		"treeNodes": {
			"href": "ENDTOEND84/components/16879/snapshots/15/tree-nodes",
			"name": "Tree Nodes"
		}
	},
...
]

Code Fragment

URI Templates

no URI. A code fragment is always embedded in a parent structure.

JSON Representation

Properties
Description
Type
Occurs
file.hrefURI to get source file contents as a text using the related media-typeURI1
file.namepath/name of the fileString1
file.sizesize of the file (number of octets)Integer1
startLinestart line of code fragmentInteger1
startColumn

start column of code fragment

Note: column number may be set to null in some cases, for example for a diagnosis findings of type "path"

Integer1
endLineend line of code fragmentInteger1
endColumn

end column of code fragment

Note: column number may be set to null in some cases, for example for a diagnosis findings of type "path"

Note 2: this value is exclusive. code fragment end at column (endColumn-1). This convention allows to locate a point in the text.

Integer1

JSON Example

{
    "file": {
		"href": "CENTRAL/local-sites/1/file-contents/123",
	    "name": "test.java",
        "size": 15
    },
    "startLine":6,
    "startColumn":1, 
    "endLine":6, 
    "endColumn": 10
} 

File Contents

URI Templates

HTTP ActionMedia TypeURI TemplatesDescription
GETtext/plain{Domain}/local-sites/{SiteID}/file-contents/{ContentsID}/?{Parameters}Source file contents as a text
URI Parameters
Description
Values
Default value
start-lineSpecify first line to extractan integer1
end-lineSpecify last line to extractan integerLast line no

Text/Plain Representation

A raw text


Action Plan Summary

URI Templates & Parameters 

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/json{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/action-plan/summary/{?parameters}Action plan summary for this application at this snapshot
GETapplication/json{Domain}/modules/{ModuleID}/snapshots/{SnapshotID}/action-plan/summary/{?parameters}Action plan summary for this application at this snapshot
URI ParameterDescriptionValuesDefault value
objectSamplesSpecify a number of sample objects to displayAn integer5
rule-pattern

Filter the issues following the specified quality rules

The common syntax for this parameter can be found in the Violation section

a combination of integers and stringsAll quality rules
status

Filter the issues following the specified status

a string

Possible values are "added", "pending" or "solved"

All statuses
tag

Filter the issues following the specified tag
(an issue is returned if the tag equals the specified value)

a stringAll tags
comment

Filter the issues following the specified comment
(an issue is returned if the comment contains the specified value)

a stringAll comments
object-fullname

Filter the issues following the specified object full name
(an issue is returned if the object full name contains the specified value)

a stringAll object full names

JSON Representations

  • D/applications/A/snapshots/S/action-plan/issues
  • D/applications/A/snapshots/S/action-plan/summary
  • D/applications/A/snapshots/S/action-plan/triggers
 Properties
Description
Type
Occurs
rulePattern.hrefReference to get a rule pattern descriptionURI1
objectSamplesA sample of defective componentsArray1
objectSamples[ ]A defective componentStructure1..*
addedIssuesNumber of issues added to the action plan in the requested snapshotInteger1
pendingIssues

Number of issues selected before the requested snapshot
and remaining in the action plan

Integer1
solvedIssuesNumber of issues selected before the requested snapshot
that have been corrected in the meantime
Integer1

JSON Example

[
	{
		"rulePattern": {
			"href": "DEMO/rule-patterns/1003114",
			"name": " Avoid class with too many fields"
		},
		"objectSamples": [
			{"name": "S:\\...MatchFilter"},
			{"name": "S:\\...UtilityManager"},
			{"name": "S:\\...SummaryGrid"},
			{"name": "S:\\...ParameterConstants"},
			{"name": "S:\\..."}
		],
		"addedIssues": 283,
		"pendingIssues": 8,
		"solvedIssues": 1
	}
]

Remedial Action

URL Templates & Parameters

no URI. A remedial action is always embedded in an issue or a violation.

JSON Representations

Properties
Description
Type
Occurs
status

This property is set only in the scope of an issue or a violation .

This property is computed with internal dates properties compared to the current snapshot date:

  • "added": A remedial action has been requested at this violation snapshot date, because this violation has been identified as an issue  
  • "pending": A remedial action has been requested prior to this violation snapshot date; this violation is still an issue to solve, it has not been corrected for this snapshot
  • "solved": This violation has been solved and does no longer exist in this snapshot 
String1
dates.updatedDate of last change of this remedial actionDate1
comment

A short comment provided by the requester who added manually a remedial action.

End of lines are represented with characters \r\n

String1
priorityRemediation priority: extreme, high, moderate, lowString1
tagA general text intended to replace priorityString1

JSON Example

{ 
     "dates" : { "updated": {"time":...} },
     "comment": "...",
     "priority": "high",
}

Issue

An issue represents a remedial action for a rule pattern and a component in a context of an application snapshot.

URL Templates & Parameters

HTTP Action
Media Type
URI Templates
Description
GETapplication/json
{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/action-plan/issues/{?Parameters}

Array of issues applicable until this application snapshot

"status" property if remedial action indicates the violation status regarding this action.

GETapplication/json
{Domain}/modules/{ModuleID}/snapshots/{SnapshotID}/action-plan/issues/{?Parameters}

Array of issues applicable until this module snapshot

"status" property if remedial action indicates the violation status regarding this action.

POST


application/json
                
{Domain}/applications/{ApplicationID}/action-plan/issues

Create a set of issues from last application snapshot

Users MUST have QUALITY_MANAGER Role and MUST be granted to access to the related application

(info) Payload is a collection of triplets: component, rule-pattern, and remedial action.

  [
{ "component": { "href": "D/components/C/snapshots/S" },
"rulePattern": { "href": "D/rule-patterns/M" },
"remedialAction": { "comment": "blablabla", "tag": "mytag" } }, ... ]

(info) For compatibility considerations with earlier versions, the following format is still accepted:

"remedialAction": { "comment": "blablabla", "priority": "high" } }

(info) No active action must be already defined on the same component and the same rule pattern

(info) Remedial actions are created with last application snapshot date as internal 'start date'

PUT


application/json
{Domain}/applications/{ApplicationID}/action-plan/issues

Update a set of issues opened in last application snapshot for a rule pattern

Users MUST have QUALITY_MANAGER Role and MUST be granted to access to the related application

(info) Payload is a collection of triplets: component, rule-pattern, and remedial action.

  [
{ "component": { "href": "D/components/C/snapshots/S" },
"rulePattern": { "href": "D/rule-patterns/M" },
"remedialAction": { "comment": "blablabla", "tag": "mytag" } }, ... ]

(info) For compatibility considerations with earlier versions, the following format is still accepted:

"remedialAction": { "comment": "blablabla", "priority": "high" } }

(info) Related component must belong to the last application snapshot

(info) Remedial action must be active (i.e. not deleted with internal 'last date').

DELETE


application/json
{Domain}/applications/{ApplicationID}/action-plan/issues

Remove a set of issues opened in last application snapshot for a rule pattern

Users MUST have QUALITY_MANAGER Role and MUST be granted to access to the related application

(info) Payload is a collection of issues, with rule-pattern href and component href:

[ { component: { "href": ....}, rulePattern: { "href": .... } }, ... ]

(info) Related component must belong to the last application snapshot

(info) Remedial actions must be active (i.e. internal 'end date' property not set).


Parameters

URI Parameter
Description
Values
Default value
startRowSpecify first item (for JSON format only)an integer1
nbRowsSpecify max number of items to return (for JSON format only)an integer10
rule-pattern

Filter the issues following the specified quality rules

The common syntax for this parameter can be found in the Violation section

a combination of integers and stringsAll quality rules
status

Filter the issues following the specified status

a string

Possible values are "added", "pending" or "solved"

All statuses
tag

Filter the issues following the specified tag
(an issue is returned if the tag equals the specified value)

a stringAll tags
comment

Filter the issues following the specified comment
(an issue is returned if the comment contains the specified value)

a stringAll comments
object-fullname

Filter the issues following the specified object full name
(an issue is returned if the object full name contains the specified value)

a stringAll object full names

JSON Representations

Properties
Description
Type
Occurs
hrefReference to an issue

componentDefective component snapshot violating a quality rule patternStructure1
rulePattern.hrefQuality Rule Pattern to complyURI1
remedialAction

Remedial Action

Structure0..1


JSON Example

{ 
      "remedialAction" : { 
            "dates": {
                 "updated": {"time":...},
            },
	        "status": "added",
     	    "comment": "...",
    	    "priority": "high",
            "tag": "to exclude"
      }
      "component" : {
           "href": "DEMO/components/858321/snapshots/12",
           "name": "com.cast.monster_event.base.model.Monster.Monster" 
           }
      },
      "rulePattern": { 
           "href": "CENTRAL/rule-patterns/4672",
           "name": "Methods must have appropriate JavaDoc @param tags"
      }, 
 } 

Excel/CSV Representation

Columns
Description
Type
Occurs
Action plan priorityRemediation priority: extreme, high, moderate, lowString1
Action plan tagA general text intended to replace priorityString1
Action plan status

This property is set only in the scope of an  issue or a  violation .

This property is computed with internal dates properties compared to the current snapshot date:

  • "added": A remedial action has been requested at this violation snapshot date, because this violation has been identified as an issue  
  • "pending": A remedial action has been requested prior to this violation snapshot date; this violation is still an issue to solve, it has not been corrected for this snapshot
  • "solved": This violation has been solved and does no longer exist in this snapshot 
String1
Action plan commentRemedial action commentString1
Quality rule nameRule pattern nameString1
Object name locationFull name of the defective componentString1
Action plan last updateDate of last update in the action planDate1

Action Plan Trigger

An Action Plan Trigger is composed of a rule pattern and a remedial action. If active, all theviolationsof the corresponding rule will be automatically put in Action Plan in the next snapshot.

URL Templates & Parameters

HTTP Action

Media Type

URI Templates

Description

GETapplication/json
{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/action-plan/triggers
{?Parameters}

Array of action plan triggers applicable in the next snapshot

text/csv
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
POST


application/json
                
{Domain}/applications/{ApplicationID}/action-plan/triggers

Create a set of action plan triggers

Users MUST have QUALITY_AUTOMATION_MANAGER Role and MUST be granted to access to the related application

(info) Payload is a collection of triplets: rule pattern, remedial action pattern, active.

[ {
"rulePattern":{"href":"D/rule-patterns/M"},
"remedialActionPattern":{"tag":"blabla bla","comment":"to do asap"},
"active": "true"
}, ... ]

(info) For compatibility considerations with earlier versions, the following format is still accepted:

"remedialActionPattern":{"priority":"extreme","comment":"to do asap"}

PUT


application/json
{Domain}/applications/{ApplicationID}/action-plan/triggers

Update a set of action plan triggers

Users MUST have QUALITY_AUTOMATION_MANAGER Role and MUST be granted to access to the related application

(info) Payload is a collection of triplets: rule pattern, remedial action pattern, active.

[ {
"rulePattern":{"href":"D/rule-patterns/M"},
"remedialActionPattern":{"tag":"blabla bla","comment":"to do asap"},
"active": "true"
}, ... ]

(info) For compatibility considerations with earlier versions, the following format is still accepted:

"remedialActionPattern":{"priority":"low","comment":"to do someday"}

DELETE


application/json
{Domain}/applications/{ApplicationID}/action-plan/triggers

Remove a set of action plan triggers

Users MUST have QUALITY_AUTOMATION_MANAGER Role and MUST be granted to access to the related application

(info) Payload is a collection of rule patterns:

[ { "rulePattern": {"href": "D/rule-patterns/M"} }, ... ]

Parameters

URI Parameter

Description

Values

Default value

rule-pattern

Filter the action plan triggers following the specified quality rules.

The common syntax for this parameter can be found in the Violation section

a combination of integers and stringsAll quality rules

JSON Representations

Properties

Description

Type

Occurs

rulePattern

Rule Pattern

Structure 1
remedialActionPattern

Remedial Action Pattern

NB. Whether the input has been "comment + priority" or "comment + tag", the JSON will contain {{"priority": "value", "tag": null}}

or {{"priority": null, "tag": "value"}}.

Structure1
activeWhether the Action Plan Trigger is currently active or notBoolean1

 JSON Example

   {
        "rulePattern": {
               "href": "ADG73/rule-patterns/7424",
               "name": "Avoid using SQL queries inside a loop"
        },
        "remedialActionPattern": {
               "priority": "high",
               "tag": null,
               "comment": "DBA - sprint 24",
               "dates": {
                       "updated": {
                               "time": 1411730470000,
                               "isoDate": "2014-09-26"
                       }
               }
        },
        "active": true
   }

Exclusion Request Detail

URL Templates & Parameters

no URI. An exclusion request detail is always embedded in an exclusion request or a violation.

JSON Representation


Properties
Description
Type
Occurs
status
  • added: a newly created exclusion request
  • processed: an exclusion request that has been processed
  • unbound: an exclusion request has been defined but the violation does not exist any more
String1
userNameUser name who created/updated the exclusion requestString1
comment

A comment ("False Positive" for example)

String1
dates.updatedCreation date or date of last updateDate1

JSON Example

"exclusionRequest": {
	"status": "added",
	"userName": "DCA",
	"comment": "False positive",
	"dates": {
		"updated": {
			"time": 1497279600000,
			"isoDate": "2017-06-12"
		}
	}
}

Exclusion Request

An exclusion request represents the request to exclude a violation in the future (after reconsolidation or new snapshot).

URL Templates & Parameters

HTTP Action
Media Type
URI Templates
Description
POSTapplication/json
{Domain}/applications/{ApplicationID}/exclusions/requests

Create a collection o f Exclusion requests (comment is required)

Users MUST have EXCLUSION_MANAGER Role and MUST be granted to access to the related application

PUTapplication/json
{Domain}/applications/{ApplicationID}/exclusions/requests

Update comments of a collection of Exclusion requests (href of rulePattern and href or component are required)

Users MUST have EXCLUSION_MANAGER Role and MUST be granted to access to the related application

DELETEapplication/json
{Domain}/applications/{ApplicationID}/exclusions/requests

Delete a collection of Exclusion requests (href of rulePattern and href or component are required)

Users MUST have EXCLUSION_MANAGER Role and MUST be granted to access to the related application


Parameters

URI Parameter
Description
Values
Default value
startRowSpecify first item (for JSON format only)an integer1
nbRowsSpecify max number of items to return (for JSON format only)an integer10

JSON Representations

Properties
Description
Type
Occurs
componentDefective component snapshot violating a quality rule patternStructure1
rulePattern.hrefQuality Rule Pattern to complyURI1
exclusionRequestDetail of the exclusion requestStructure1
exclusionRequest.dates.updatedCreation date or date of last updateDate1
exclusionRequest.commentA comment ("False Positive" for example)String0..1
exclusionRequest.userNameUser name who created/updated the exclusion requestString1
exclusionRequest.status
  • added: a newly created exclusion request
  • processed: an exclusion request that has been processed
  • unbound: an exclusion request has been defined but the violation does not exist any more
String1

JSON GET Example

{
	"component": {
		"href": "ENDTOEND83/components/19517/snapshots/15",
		"name": "com.castsoftware.util.data.Criterion",
		"shortName": "Criterion",
		"treeNodes": {
			"href": "ENDTOEND83/components/19517/snapshots/15/tree-nodes",
			"name": "Tree Nodes"
		}
	},
	"rulePattern": {
		"href": "ENDTOEND83/rule-patterns/4554",
		"name": "Avoid large Classes - too many Methods"
	},
	"exclusionRequest": {
		"status": "added",
		"userName": "DCA",
		"comment": "Num metric, Single AV, Violation in last snapshot (15)",
		"dates": {
			"updated": {
				"time": 1497279600000,
				"isoDate": "2017-06-12"
			}
		}
	}
}

JSON POST/PUT/DELETE Input Example (Request Payload)

[
	{
		"rulePattern": { "href":"ENDTOEND83/rule-patterns/4672"},
		"component": { "href":"ENDTOEND83/components/18568/snapshots/15"},
		"exclusionRequest": { "comment": "to exclude"}
	},
	{
		"rulePattern": { "href": "ENDTOEND83/rule-patterns/7846"},
		"component": { "href": "ENDTOEND83/components/21514/snapshots/15"},
		"exclusionRequest": { "comment": "false positive"}
	},
	{
		"rulePattern": { "href": "ENDTOEND83/rule-patterns/7846"},
		"component": { "href": "ENDTOEND83/components/21520/snapshots/15"},
		"exclusionRequest": { "comment": "false positive"}
	}
]

Exclusion Summary

URI Templates & Parameters 

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/json{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/excluded-violations-summaryExclusion summary for this application at this snapshot

Parameters

URI Parameter

Description

Values

Default value

rule-pattern

Filter the excluded violations summary following the specified quality rules.

The common syntax for this parameter can be found in the Violation section

a combination of integers and stringsAll quality rules

JSON Representation

 Properties
Description
Type
Occurs
hrefAuto referenceURI1
nameNameString1
excludedViolations.numberNumber of excluded violations in this application snapshotInteger1

JSON Example

ENDTOEND83/applications/3/snapshots/15/excluded-violations-summary
{
	"href": "ENDTOEND83/applications/3/snapshots/15/excluded-violations-summary",
	"name": "Excluded Violations Summary",
	"excludedViolations": {
		"number": 25
	}
}

Scheduled Exclusion

URI Templates & Parameters 

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/json{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/exclusions/scheduled{?Parameters}Scheduled exclusions for this application at this snapshot
text/csv

application/vnd.openxmlformats-

officedocument.spreadsheetml.sheet

Parameters

URI Parameter
Description
Values
Default value
status

status of the scheduled exclusion:

  • to-add = violations to exclude at the next snapshot or reconsolidation
  • to-remove = exclusions to de-exclude at the next snapshot or reconsolidation
  • $all = scheduled exclusions with the to-add or to-remove status indifferently
to-add
to-remove
$all
$all
rule-pattern

Filter the scheduled exclusions following the specified quality rules.

The common syntax for this parameter can be found in the Violation section

a combination of integers and stringsAll quality rules
startRowSpecify first item (for JSON format only)an integer1
nbRowsSpecify max number of items to return (for JSON format only)an integer10

JSON Representation

 Properties
Description
Type
Occurs
componentDefective component snapshot violating a quality rule patternStructure1
rulePattern.hrefQuality Rule Pattern to complyURI1
exclusionRequest

An exclusion request.

This property is exclusive with "remedialAction" property

Structure0..1
remedialAction

A remediation action request

This property is exclusive with "exclusion" property

Structure0..1

JSON Example

ENDTOEND83/applications/3/snapshots/15/exclusions/scheduled
[
	{
		"component": {
			"href": "ENDTOEND83/components/19517/snapshots/15",
			"name": "com.castsoftware.util.data.Criterion",
			"shortName": "Criterion"
		},
		"rulePattern": {
			"href": "ENDTOEND83/rule-patterns/4554",
			"name": "Avoid large Classes - too many Methods"
		},
		"exclusionRequest": {
			"status": "added",
			"userName": "DCA",
			"comment": "Num metric, Single AV, Violation in last snapshot (15)",
			"dates": {
				"updated": {
					"time": 1497279600000,
					"isoDate": "2017-06-12"
				}
			}
		},
		"remedialAction": null
	},
	{
		"component": {
			"href": "ENDTOEND83/components/17172/snapshots/15",
			"name": "O11JNK.LINDBERGH_CENTRAL.PROPATTR",
			"shortName": "PROPATTR"
		},
		"rulePattern": {
			"href": "ENDTOEND83/rule-patterns/1596",
			"name": "Avoid using \"nullable\" Columns except in the last position in a Table"
		},
		"exclusionRequest": null,
		"remedialAction": null
	}
...
]

CSV Representation

Columns
Description
Type
Occurs
Exclusion statusStatus of the scheduled exclusion: "to add" or "to remove"String1
Exclusion requesterName of the EXCLUSION_MANAGER user who requested to add the exclusionString1
Exclusion request commentComment associated to the exclusion requestString1
Quality rule nameName of the quality ruleString1
Object name locationFull name of the objectString1
Exclusion request last updateDate of last update of the exclusion requestString1

CSV/EXCEL Example

Exclusion statusExclusion requesterExclusion request commentQuality rule nameObject name locationExclusion request last update
to addDCAComment 1Avoid large Classes - too many Methodscom.castsoftware.util.data.Criterion2017-06-12
to remove

Avoid using "nullable" Columns except in the last position in a TableO11JNK.LINDBERGH_CENTRAL.PROPATTR
to addDCAComment 2Avoid using Fields (non static final) from other Classes<Default Package>.ButtonReset.actionPerformed2017-06-12
to addExclusionManComment 3Avoid using Global Variables<none>2017-06-12
to addExclusionManComment 4Avoid using Inner Classescom.castsoftware.util.string.XMLFileInterpreterImpl.flushSection2017-06-12
to addDCAComment 5Methods must have appropriate JavaDoc @param tagscom.castsoftware.util.data.retriever.RowReaderConstant.close2017-06-12

Scheduled Exclusions Summary

URI Templates & Parameters 

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/json{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/exclusions/scheduled-summary{?Parameters}Scheduled exclusions summary for this application at this snapshot

Parameters

URI Parameter

Description

Values

Default value

rule-pattern

Filter the scheduled exclusions following the specified quality rules.

The common syntax for this parameter can be found in the Violation section

a combination of integers and stringsAll quality rules

JSON Representation

 Properties
Description
Type
Occurs
hrefAuto referenceURI1
nameNameString1
scheduledExclusionsToAdd.numberNumber of scheduled exclusions to add in the next snapshot or reconsolidationInteger1
scheduledExclusionsToRemove.numberNumber of scheduled exclusions to remove in the next snapshot or reconsolidationInteger1
scheduledExclusions.numberscheduledExclusionsToAdd.number + scheduledExclusionsToRemove.number Integer1

JSON Example

ENDTOEND83/applications/3/snapshots/15/exclusions/scheduled-summary
{
	"href": "ENDTOEND83/applications/3/snapshots/15/exclusions/scheduled-summary",
	"name": "Scheduled Exclusions Summary",
	"scheduledExclusionsToAdd": {
		"number": 5
	},
	"scheduledExclusionsToRemove": {
		"number": 1
	},
	"scheduledExclusions": {
		"number": 6
	}
}

Violation

A violation identifies a component breaking a quality rule, with following properties:

  • a defective component 
  • a violated rule pattern
  • a set of findings to pinpoint the statements or properties of the defective component violating the rule pattern
  • a remedial action request or an exclusion request

For example, consider these 2 quality rules:

  1. "Methods must have appropriate JavaDoc @param tags"
  2. "Avoid calling the same paragraph with PERFORM and GO TO statements"  

For Quality Rule #1, diagnosis results are list of parameter names without documentation.

For Quality Rule #2; diagnosis results are list of "GO TO" statements. For each diagnosis result, a pair of diagnosis bookmarks locates the GO TO and the PERFORM statement.

Note: "findings" are also known as "associated values"

Note 2: "violation" is also known as "failed check" 

URL Templates & Parameters

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/json

{Domain}/components/{ComponentID}/snapshots/{SnapshotID}/violations{?Parameters}

An empty array if there is no violation or an array with a single violation.
GETapplication/json{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/violations{?Parameters}

Array of Violations that have been raised for this application snapshot.

text/csv

application/vnd.openxmlformats-

officedocument.spreadsheetml.sheet   
GET     application/json

{Domain}/modules/{ModuleID}/snapshots/{SnapshotID}/violations{?Parameters}     

Array of Violations that have been raised for this module snapshot

text/csv

application/vnd.openxmlformats-
officedocument.spreadsheetml.sheet

GETapplication/json

{Domain}/tree-nodes/{Level}-{LowerID}-{UpperID}/snapshots/{SnapshotID}/violations
{?Parameters}

Array of Violations that have been raised for this application snapshot in the scope of this tree node

text/csv
application/vnd.openxmlformats-
officedocument.spreadsheetml.sheet
GETapplication/json{Domain}/transactions/{TransactionID}/snapshots/{SnapshotID}/violations
{?Parameters}
Array of Violations that have been raised for this application snapshot in the scope of this transaction
text/csv
application/vnd.openxmlformats-
officedocument.spreadsheetml.sheet




GETapplication/json{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/excluded-violations{?Parameters}Array of Violations that are effectively excluded in this application snapshot
text/csv
application/vnd.openxmlformats-
officedocument.spreadsheetml.sheet
GETapplication/json{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/removed-violations{?Parameters}Array of Violations that have been removed between this snapshot and the previous snapshot. The violations have been corrected, excluded, or the object does not exist any more.
text/csv
application/vnd.openxmlformats-
officedocument.spreadsheetml.sheet

Parameters

URI Parameter
Description
Values
Default value
startRowSpecify first item (for JSON format only)an integer1
nbRowsSpecify max number of items to return (for JSON format only)an integer10
rule-pattern

Specify the Quality Rules with a combination of the following syntaxes, separated by commas:

  • c: technicalCriterionId
  • cc: businessCriterionId
  • nc: businessCriterionId
  • bqi: businessCriterionId (Base Quality Indicators, i.e. all quality indicators from a Business Criterion)
  • critical-rules keyword (i.e. identified as critical regarding a business criterion)
  • a metric type, eg "quality-rules" keyword
  • a rule pattern id

NB: parameter not used for Excluded Violations

a combination of integers and stringsAll quality rules
business-criterion

A quality indicator ID of a business criterion (optional parameter) to a dd "Propagated Risk Index" property to components.

If not specified or not a health factor, components will contain no PRI

It's up to the requester to set a business criterion consistent with the rule-pattern.

NB: parameter not used for Excluded Violations and Removed Violations

an integerNone
technologies

A technology name to filter violations on

This parameter is available for ApplicationSnapshot violations and ModuleSnapshot violations, in any Media Type

NB: parameter not used for Excluded Violations and Removed Violations

Stringnone
status

A violation status to filter violations on

NB: parameter not used for Excluded Violations and Removed Violations

Stringnone


Date of last change of this remedial action

Excel/CSV Representation

ColumnsDescriptionTypeOccurs
Quality rule nameFull name of a rule patternString1
Object name locationFull name of the defective componentString1
Object status

Component status on this component compared to the previous snapshot

"added": new component

"unchanged": unchanged component

"updated": updated component

String1
Snapshot dateInput snapshot Date with YYYY-MM-DD formatString1
Business Criterion

An optional input health factor to filter violations.

if this business criterion is a health factor, then a Propagated Risk Propagation Assessment Index is calculated for this Health Factor

String0..1
RiskRisk propagation assessment index according to an input health factor.Integer0..1
Diagnosis Findings NameThe associated values (with a comma separator in case of multiple values)String1
Violation status

  Diagnosis status on this component compared to the previous snapshot  

  • "added": this component is a newly defective object regarding this quality rule
  • "updated": some diagnosis results have been changed
  • "unchanged": compared to the previous snapshot, diagnosis results are left unchanged
String1
Action plan status

Status of a related issue regarding the snapshot of the container (application or module)

  • "added": newly created issue in the current snapshot
  • "pending": pending issue, violation is not yet corrected for this snapshot
  • "solved": issue "solved for this snapshot
String1
Action plan tagA general text intended to replace priorityString1
Exclusion request statusExclusion request statusString1
Exclusion requesterName of the EXCLUSION_MANAGER user who requested the exclusionString1
        

CSV Representation

Diagnosis with bookmarks:

Quality rule nameBusiness CriterionObject name locationObject StatusSnapshot DatePropagation Risk IndexStatusNumber of violationsAction Plan StatusAction Plan Priority

Avoid missing WHEN OTHERS in CASE statements

TransferabilityF:\USERS\ABD\CAST-TESTS\.../KCD_FTAB_GETunchanged2014-12-311unchanged3pending

Diagnosis without bookmarks:

Quality rule nameBusiness CriterionObject name locationObject StatusSnapshot DatePropagation Risk IndexStatus

Number of violations

Undocumented parametersAction Plan StatusAction Plan Priority

Methods_must_have_appropriate JavaDoc @param tags

Transferabilitycom.cast.monster_event.base.model.Monster.Monsterunchanged2014-12-311unchanged3in_description,in_city,in_pricePerHourpending
Methods must have appropriate JavaDoc @param tagsTransferabilitycom.cast.monster_event.base.model.MonsterEvent.addMonsterunchanged2014-12-311unchanged3a,b,cpending
Methods must have appropriate JavaDoc @param tagsTransferabilitycom.cast.monster_event.base.model.Customer.Customerunchanged2014-12-311unchanged3a,b,cpending
Methods must have appropriate JavaDoc @param tagsTransferabilitycom.cast.monster_event.base.model.MonsterEvent.addOptionunchanged2014-12-311unchanged3a,b,cpending
Methods must have appropriate JavaDoc @param tagsTransferabilitycom.cast.monster_event.base.model.MonsterEvent.MonsterEventunchanged2014-12-311added3a,b,cpending
Methods must have appropriate JavaDoc @param tagsTransferabilitycom.cast.monster_event.base.model.SpookyPlace.SpookyPlaceunchanged2014-12-311added3a,b,cpending

JSON Representation

Properties
Description
Type
Occurs
componentDefective component snapshot violating a quality rule patternStructure1
rulePattern.hrefQuality Rule Pattern to complyURI1
remedialAction

A remediation action request

This property is exclusive with "exclusion" property

Structure0..1
diagnosis

Diagnosis status and findings or bookmarks

This property is null if violation has been solved or excluded

Structure0..1
exclusionRequest

An exclusion request.

This property is exclusive with "remedialAction" property

Structure0..1


Diagnosis structure

Properties
Description
Type
Occurs
status  Diagnosis status on this component compared to the previous
snapshot  
  • "added": this component is a newly defective object regarding this
    quality rule
  • "updated": some diagnosis results have been changed
  • "unchanged": compared to the previous snapshot, diagnosis
    results
    are left unchanged
String1
findings.refA reference to a diagnosis findings structureURI0..1

JSON Example

[
   { 
      "component" : {
           "href": "CENTRAL/components/4/snapshots/5",
           "name": "com.cast.monster_event.base.model.Monster.Monster", 
           "propagationRiskIndex" : ....,
           "status": "unchanged",
           "sourceCodes": {
               "href": "CENTRAL/components/4/snapshots/5/source-codes"
               "name": "Source codes",
           }
      },
      "rulePattern": { 
           "href": "CENTRAL/rule-patterns/4672",
           "name": "Methods must have appropriate JavaDoc @param tags"
      }, 
      "remedialAction" : { 
            "dates": {
                 "updated": {"time":...},
            },
    	    "comment": "...",
    	    "priority": "high",
            "status": "added",
            "tag": "high"
      },
      "exclusionRequest": null,
      "diagnosis": {
	      "status": "unchanged",
          "findings": {
              "href": "CENTRAL/components/4/snapshots/5/findings/4672"
              "name": "Diagnosis Findings"
	      }
	    }
   } 
]
[
	{
		"component": {
			"href": "ENDTOEND83/components/15700/snapshots/15",
			"name": "com.castsoftware.util.string.XMLFileInterpreterImpl.flushSection",
			"shortName": "flushSection",
			"status": "unchanged",
			"sourceCodes": {
				"href": "ENDTOEND83/components/15700/snapshots/15/source-codes",
				"name": "Source Codes"
			},
			"treeNodes": {
				"href": "ENDTOEND83/components/15700/snapshots/15/tree-nodes",
				"name": "Tree Nodes"
			}
		},
		"diagnosis": {
			"status": "unchanged",
			"findings": {
				"href": "ENDTOEND83/components/15700/snapshots/15/findings/7308",
				"name": "Diagnosis Findings"
			}
		},
		"exclusionRequest": {
			"status": "added",
			"userName": "ExclusionMan",
			"comment": "Meme metrique mais violation added",
			"dates": {
				"updated": {
					"time": 1497259800000,
					"isoDate": "2017-06-12"
				}
			}
		},
		"rulePattern": {
			"href": "ENDTOEND83/rule-patterns/7308",
			"name": "Avoid using Inner Classes"
		},
		"remedialAction": null
	}
]
ENDTOEND83/applications/3/snapshots/15/excluded-violations
[
  {
	"rulePattern": {
		"href": "ENDTOEND83/rule-patterns/1596",
		"name": "Avoid using \"nullable\" Columns except in the last position in a Table"
	},
	"component": {
		"href": "ENDTOEND83/components/17172/snapshots/15",
		"name": "O11JNK.LINDBERGH_CENTRAL.PROPATTR",
		"shortName": "PROPATTR"
	},
	"exclusionRequest": {
		"status": "processed",
		"userName": "ExclusionMan",
		"comment": "Char metric, Multiple AV, Processed",
		"dates": {
			"updated": {
				"time": 1497259800000,
				"isoDate": "2017-06-12"
			}
		}
	},
	"remedialAction": null
  }
]

Indexed Violation

This allows to filter violations with parameters, using a dedicated Lucene index.  

URL Templates & Parameters

HTTP ActionMedia TypeURI TemplatesDescription
PUTapplication/json

{Domain}/violations-index

NB. This is restricted to ADMIN users

Create the Lucene index dedicated to violations search
GETapplication/json{Domain}/violations-indexReturn information about the index
GETapplication/json{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/indexed-violations{?Parameters}

Number and array of Violations resulting from filtering with Parameters for this application snapshot

text/csv

application/vnd.openxmlformats-

officedocument.spreadsheetml.sheet   


Parameters

All parameters are optional. If mentioned, they will filter the violations accordingly.


URI Parameter

Description

Values

Default value

startRowSee Violation startRowan integer1
nbRowsSee Violation nbRowsan integer10
rule-pattern

See Violation rule-pattern


A combination of bqi:BCID, c:TCID, RuleID
(bqi means Base Quality Indicator, c means Contributor)

eg.
rule-pattern=(bqi:60014) means all QRs of BC “Efficiency”
rule-pattern=(c:61020) means all QRs of TC “Programming Practices - Modularity and OO Encapsulation Conformity”
rule-pattern=(7156) means the QR “Avoid Too Many Copy Pasted Artifacts”
rule-pattern=(bqi:60014,c:61020,7156) means the union of all above QRs

a combination of integers and stringsAll quality rules
weight

A combination of integer values ranged from 1 to 9

eg.
weight=(2) means all QRs with a weight=2
weight=(2,5) means all QRs with a weight=2 or a weight=5

IntegerAll weights
critical

true or false

eg.
critical=(true) means all critical QRs
critical=(false) means all non critical QRs

BooleanAll criticalities
business-criterion

See Violation business-criterion

an integerNone
statusSee Violation statusStringnone
object-status

The violated component status

Takes one or more values among "added", "updated", "unchanged"

Stringnone
technologies

See Violation technologies

Stringnone
modulesOne or more module namesStringnone
transactionsOne or more transaction idsIntegernone
modeSee Search Results modeStringnone
object-fullnameA string to search in a component's nameString none
order

Specify columns to be sorted on server side

asc means ascending order, desc means descending order.
Each sortable column is represented by a parameter value:

  • Actions or Exclusions: action-exclusion-status
  • Object name location: component-name
  • Rule: rule-pattern-name
  • Status: diagnosis-status

The use of parameter order is optional. Also, if you use this parameter, you can mention from one to four values in it.
Any not mentioned column value takes the default value. By default, violations are sorted by: PRI desc (if any), then by RULE_NAME asc, then by OBJECT_FULL_NAME asc, then by OBJECT_ID asc


Examples:
  • order=(asc(action-exclusion-status)) sorts the violations by ascending "Action/Exclusion": violations with remedial action, followed by violations with exclusion request, followed by all other violations
  • order=(desc(diagnosis-status)) sorts the violations by descending "Violation Status": "updated" violations, followed by "unchanged" violations, followed by "added" violations
  • order=(asc(action-exclusion-status),asc(component-name)) sorts the violations by ascending "Action/Exclusion", then by ascending "Object name"
  • order=(asc(action-exclusion-status),asc(rule-pattern-name),desc(component-name),asc(diagnosis-status))

NB Sorting works also with pagination. You can combine it with the startRow and nbRows parameters




NB. Any combination of the parameters rule-pattern, weight and critical gives the QRs verifying all the constraints.
For example: rule-pattern=(bqi:60014)&weight=(2,5)&critical=(true) means “all critical QRs of BC Efficiency with weight=2 or weight=5”

JSON Representation

Properties

Description

Type

Occurs

numberTotal number of violations matching the filterInteger1
violationsFiltered violationsArray of Violations1

JSON Example

{
	"number": 4893,
	"violations": [
		{
			"component": {
				"href": "ENDTOEND833/components/1049/snapshots/13",
				"name": "AppliPubs.liens_serveurs.lien_table",
				"shortName": "lien_table",
				"status": "unchanged",
				"sourceCodes": {
					"href": "ENDTOEND833/components/1049/snapshots/13/source-codes",
					"name": "Source Codes"
				},
				"treeNodes": {
					"href": "ENDTOEND833/components/1049/snapshots/13/tree-nodes",
					"name": "Tree Nodes"
				}
			},
			"diagnosis": {
				"status": "unchanged",
				"findings": {
					"href": "ENDTOEND833/components/1049/snapshots/13/findings/7344",
					"name": "Diagnosis Findings"
				}
			},
			"exclusionRequest": null,
			"rulePattern": {
				"href": "ENDTOEND833/rule-patterns/7344",
				"name": "Avoid \"SELECT *\" queries"
			},
			"remedialAction": null
		},

        ...
    ]
}
GET ENDTOEND833/violations-index
{
	"href": "ENDTOEND833/violations-index",
	"name": "Violations search index for applications of ENDTOEND833",
	"status": "toUpdate",			/* status of the index */
	"date": {						/* date of index creation or update */
		"time": 1493775223000,
		"isoDate": "2017-05-03"
	},
	"lastSnapshotDate": {			/* date of last snapshot for this domain */
		"time": 1493778823000,
		"isoDate": "2017-05-03"
	},
	"size": 6954394					/* size of the index in bytes */
}


Excel/CSV Representation

See Violation Excel/CSV Representation

Violations Summary


This represents the counts of total, added, updated or unchanged violations.


URL Templates & Parameters

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/json

{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/violations-summary{?Parameters}

Violations Summary for this application snapshot
GETapplication/json

{Domain}/modules/{ModuleID}/snapshots/{SnapshotID}/violations-summary{?Parameters}

Violations Summary for this module snapshot

GET     application/json

{Domain}/tree-nodes/{Level}-{LowerID}-{UpperID}/snapshots/{SnapshotID}/violations-summary{?Parameters}


Violations Summary for this treenode snapshot

GETapplication/json

{Domain}/transactions/{TransactionID}/snapshots/{SnapshotID}/violations-summary
{?Parameters}

Violations Summary for this transaction snapshot

Parameters

URI Parameter

Description

Values

Default value

rule-pattern

A rule pattern ID

an integer or a stringNone (Mandatory parameter)
technologies

A technology name to filter violations on

This parameter is available for ApplicationSnapshot violations and ModuleSnapshot violations only

Stringnone
status

A violation status to filter violations on

"status" can have one of the following values: added, updated, unchanged

If you want to get the total count of violations (corresponding to "status=all"), simply do not mention any status in the URL.

If the corresponding "status" has not been requested in the URL, then the response contains
"xxxViolations": null

instead of
"xxxViolations": { "number": N }

Stringnone

 JSON Representation

Properties

Description

Type

Occurs

hrefSelf referenceURI1
nameNameString1
totalViolations.number

The number of total violations in the context, or null if not requested

Integer0..1
addedViolations.number

The number of added violations in the context, or null if not requested

Integer0..1
updatedViolations.number

The number of updated violations in the context, or null if not requested

Integer0..1
unchangedViolations.numberThe number of unchanged violations in the context, or null if not requestedInteger0..1

 JSON Example

{
   "href": ".../violations-summary?rule-pattern=R&technologies=T&status=S",
   "name": "Violations count by rule, technology and status",
   "totalViolations": { "number": 4 },
   "addedViolations": { "number": 2 },
   "updatedViolations": { "number": 1 },
   "unchangedViolations": { "number": 1 }
}

Diagnosis Findings

URI Templates

HTTP ActionMedia TypeURI TemplatesDescription
GETapplication/json {Domain}/components/{ComponentID}/snapshots/{SnapshotID}/findings/{RuleID}Findings of a violation

JSON Representation

Properties____

Description
Type
Occurs
nameName of findings items. If values is empty then no name is set. Name may be "null" if diagnosis of the rule pattern does not set any name.String1
type

Type of an item of 'values'

  • integer: value is an integer. This value is typically a threshold that has been exceeded.
  • object: value is a wrapper of a component
  • path: value is an execution path. An execution path is an array of wrappers of code fragment.
     
  • group: value is a group. A group is an array of wrappers of components
  • percentage: value is decimal number between 0 and 100
  • text: value is a string
  • null: no value
String1
values

An array of findings items

Array0..1
values[ ]

An item (see type). For type "integer" and "percentage" this array contains a single value.

Any

1..*
bookmarks

An array of array of bookmarks.

This data is set only for the last snapshot of this application

Array0..1
bookmarks[ ][ ]

A structure that pinpoints a violation.

Structure0..*
parametersAn array of parametersArray0..1
parameters[ ]A parameterStructure 0..*
status[ ]ReservedString0..*


Findings item for type "object":

Properties___________________DescriptionTypeOccurs

values[ ].component.codeSources

Component source codes

This data is set only for the last snapshot of this application

Structure0..1


Values for type "path":

Properties___________________DescriptionTypeOccurs
values[ ][ ].componentComponent of the code fragmentStructure1
values[ ][ ].codeFragment

A code fragment of an execution step

This data is set only for the last snapshot of this application

Structure0..1
values[ ][ ].levelExecution code level of the code fragment, when this code fragment is part of an execution pathInteger0..1


Values for type  "group":

Properties____________________ DescriptionTypeOccurs

values[ ][ ].component.sourceCodes

Source codes of a group member

This data is set only for the last snapshot of this application

Structure0..1


Bookmark item:

Properties___________________DescriptionTypeOccurs
bookmarks[ ][ ].componentComponent of the code fragmentStructure1
bookmarks[ ][ ].codeFragment

A code fragment

This data is set only for the last snapshot of this application

Structure0..1

Parameter item:

Properties___________________DescriptionTypeOccurs
parameters[ ].nameParameter nameString1
parameters[ ].values[ ]

A parameter default value according of the technology

Any1..*

JSON Examples

Examples below are a list of JSON patterns:

Integer type
// Values is made of a single integer value which is number of bookmarks
{
	"name": "Number of Violations Patterns",
	"type": "integer",
    "values": [ 2 ],
	"bookmarks": [
	  [
	    { "component": { "name": "...", "sourceCodes": {...} }, "codeFragment": {...} },
	    { "component": { "name": "...", "sourceCodes": {...} }, "codeFragment": {...} }
      ],
	  [
	    { "component": { "name": "...", "sourceCodes": {...} }, "codeFragment": {...} },
	    { "component": { "name": "...", "sourceCodes": {...} }, "codeFragment": {...} }
      ]
    ]
}
Integer type
// Values is made of single sizing value w/o bookmarks
{
	"name": null,
	"type": "integer",
    "values": [ 35 ],
	"bookmarks": [
	  [
	    { "component": { "name": "...", "sourceCodes": {...} }, "codeFragment": {...} },
	  ]
     ]
}
Percentage type
// Values made of a single percentage value w/o bookmarks
{
	"name": "Comment/Code Ratio",
	"type": "percentage",
    "values": [ 15.0 ],
	"bookmarks": []
}
Text type
// Values is a list of message texts, w/o bookmarks
{
	"name": "Undocumented parameters",
	"type": "text",
    "values": [ "param1", "param2" ],
	"bookmarks": [
	  [
		{ "component": { "name": "...", "sourceCodes": {...} }, "codeFragment": {...} }
	  ],
	  [
		{ "component": { "name": "...", "sourceCodes": {...} }, "codeFragment": {...} }
	  ]
	]
}
Object type
// Values is a list of components w/o bookmarks
{
	"name": "Name of the table having a misused composite index",
	"type": "object",
    "values": [
			{ "component": { "name": "...", "sourceCodes": {...} } },
      		{ "component": { "name": "...", "sourceCodes": {...} } }
     ],
	"bookmarks": [
	  [
		{ "component": { "name": "...", "sourceCodes": {...} }, "codeFragment": {...} }
	  ],
	  [
		{ "component": { "name": "...", "sourceCodes": {...} }, "codeFragment": {...} }
	  ]
	]
}
Path type
// Values is a list of execution steps (case of a data-flow diagnosis)
// Ex: 7954: Avoid indirect String concatenation inside loops
// Ex: 7150: Favor PreparedStatement or CallableStatement over Statement 
// Note: 7150 is a contributor of "66062: Secure Coding - Input Validation"
{
	"name": null,
	"type": "path",
    "values": [
		 [
			{ "component": {...}, "codeFragment": {...}, "level": 2 },
			{ "component": {...}, "codeFragment": {...}, "level": 2 }
         ],
		 [
			{ "component": {...}, "codeFragment": {...}, "level": 2 },
			{ "component": {...}, "codeFragment": {...}, "level": 2 }
		 ]
     ],
	"bookmarks": null
}
Group type
// Specific case for "7156: Avoid Too Many Copy Pasted Artifacts"
{
	"name": null,
	"type": "group",
    "values": [
				 [
					   { "component": { ... } },
					   { "component": { ... } }
           		 ],	
				 [
					   { "component": { ... } },
					   { "component": { ... } }			
		  		 ]
      ],
	"bookmarks": null
}
 
No value type
// Values is empty, but bookmarks are set
{
	"name": null,
	"type": null,
	"values": [],
	"bookmarks": [
	  [
	    { "component": { "name": "...", "sourceCodes": {...} }, "codeFragment": {...} },
	    { "component": { "name": "...", "sourceCodes": {...} }, "codeFragment": {...} }
      ],
	  [
	    { "component": { "name": "...", "sourceCodes": {...} }, "codeFragment": {...} },
	    { "component": { "name": "...", "sourceCodes": {...} }, "codeFragment": {...} }
      ]
    ]
}


Search Results

Search results are items indexed by Lucene. As the construction of these indexes is still optional, we deliver these feature in a separate URI.

URL Templates & Parameters

HTTP Action
Media Type
URI Templates
Description
GETapplication/json
{Domain}/applications/{ApplicationID}/snapshots/{SnapshotID}/search-results/{?Parameters}

Search results on this application snapshot


Parameters

URI Parameter
Description
Values
Default value
itemstype of items to search on"components"none
mode

search mode
"prefix" retrieves objects starting with "word"
"term" retrieves objects containing "word" 

"prefix" or "term"none
wordthe word to searcha stringnone
startRowSpecify first iteman integer1
nbRowsSpecify max number of items to returnan integer10

JSON Representations

Properties
Description
Type
Occurs
numberTotal number of results matching the searchInteger1
componentsSearch results, ordered by alphabetical order (case-unsensitive) and object_idList<SnapshotedComponents>1


JSON Example


{
	"number": 7277,
	"components": [
		{
			"id": 284004,
			"name": "[S:\\CAIP\\JAVA\\Applications\\Dashboard\\adg\\adg-war\\src\\main\\webapp\\javascript\\isomorphic\\system\\modules\\ISC_Core.js].$be",
			"shortName": "$be",
			"type": {
				"label": "Javascript Client Side Method",
				"name": "CAST_Javascript_ClientSide_Method"
			}
		},
		{
			"id": 290125,
			"name": "[S:\\CAIP\\JAVA\\Applications\\Dashboard\\adg\\adg-war\\src\\main\\webapp\\javascript\\isomorphic\\system\\development\\ISC_Core.js].$be",
			"shortName": "$be",
			"type": {
				"label": "Javascript Client Side Method",
				"name": "CAST_Javascript_ClientSide_Method"
			}
		},
...
}