Object Characteristics
Draft
Get the characteristics of an object.
Optionally, get also the source locations of the object: the set of files and positions within each source file of the object.
Note that for some programming languages an object may have multiple source locations. For example, a location for a function declaration, and another location for a function implementation.
URI
GET /rest/applications/{name}/objects/{id}?select=source-locations
Path Parameters
-
name (string)
:- This parameter identifies the analyzed application.
The application name must be properly encoded if it is required. Character back-quote is not allowed.
-
id (number)
:- The unique identifier of the object from Imaging.
This ID is used to retrieve the specific object within the application.
Query Parameters
-
select (string)
, optional:- If select=source-locations is applied, then the source locations of the object are also fetched.
The source locations fetching relies on the Source Code Service, it this service is disabled, or misconfigured then an HTTP 500 status code is returned.
If the source locations are not found, for example because the object is external, no value is returned.
Responses
-
application/json
:The response details the object characteristics.
Example:
{ "id": "1438", "name": "localeResolver", "fullName": "com.salesmanager.shop.application.config.ShopApplicationConfiguration.localeResolver", "mangling": "localeResolver() return org.springframework.web.servlet.i18n.SessionLocaleResolver", "type": "Java Method", "typeId": "JV_METHOD" "status": {"id": "Unchanged"}, "external": false, "programmingLanguage": {"name": "Java"}, "parent": { "id": "34088", "name": "ShopApplicationConfiguration", "type": "Java Class MVC", "typeId": "JV_CLASS" }, "sourceLocations": [ { "endLine": 168, "fileId": -85, "fileName": "ShopApplicationConfiguration.java", "filePath": "C:\\ProgramData\\CAST\\AIP-Console-Standalone\\shared\\upload\\Shopizer 2.17.0\\main_sources\\sm-shop\\src\\main\\java\\com\\salesmanager\\shop\\application\\config\\ShopApplicationConfiguration.java", "relativePath": "sm-shop\\src\\main\\java\\com\\salesmanager\\shop\\application\\config\\ShopApplicationConfiguration.java", "nbLines": 190, "startLine": 163 } ] }
JSON Representation
Property Type Description id string The object ID. name string The object name. fullName string The object long name, usually locates the object in a software architecture. mangling string The function signature or an empty string if not applicable. type string The object type for a display. typeId string The object type identifier is the type reference key. status.id string The object status code regarding the previous analysis, see Object Status, or null if not applicable. external bool True if the object is not an in-house code fragment, but refers to an external library, package, a primitive, or builtin. programmingLanguage.name string The programming language associated to the TypeId. parent struct The parent is the composite object. For some technologies (C++), when there are multiple parents, a single parent is selected. parent.id string The parent ID. parent.name string The parent name. parent.type string The parent type. parent.typeId string The parent type identifier. sourceLocations[].fileId string The source file ID. sourceLocations[].fileName string The source file short name. sourceLocations[].filePath string The source file absolute path. sourceLocations[].relativePath string The source file relative path to the delivery deployment folder itself deduced from the application original name. sourceLocations[].nbLines integer The number of lines of the source file. sourceLocations[].startLine integer The first line number of the object within the source file. Ex: 4 means the 4th line within the source file. sourceLocations[].endLine integer The last line number of the object within the source file. Ex: 14 means the 14th line within the source file.