Integrating Integrity Structure
HTTP Interface
Below is the description of the Structure HTTP interface for PTC Integrity.
Method |
URL |
Description |
GET |
/mdworkbench/structure |
Provides access to a structural view of a model
Query Parameters
metamodel : integrity (fixed value)
parent (optional): id of the parent node for which children are requested (see Response Contents)
Request Headers
Accept (optional): the media type which is acceptable for the response.
Values can either be application/json (default) or application/xml .
includes (optional): comma separated list of element qualified names to include (e.g. /MyProject,/MySecondProject ).
All elements are included when omitted.
excludes (optional): comma separated list of element qualified names to exclude (e.g. /MyProject/SubFolder ).
No elements are excluded when omitted.
encryptionAlgorithm (optional): the encryption algorithm used to encrypt the password (e.g. AES/CBC/PKCS5Padding ),
if encryption is being used.
encryptionIV (optional): the encryption initialization vector used to encrypt the password, if any.
integrity.server - the server of the database to connect to (e.g. myServer )
integrity.port - the port of the database to connect to (e.g. 8601 )
integrity.user - the name of the Integrity user to make the connection
integrity.password - the password of the Integrity user to make the connection
integrity.contentKind (optional) - type of content to include in the response: Project (default) or Type
Note on headers and query parameters
The following properties can be set either as query parameters or headers:
metamodel, includes, excludes, encryptionIV, encryptionAlgorithm,
integrity.server, integrity.port, integrity.user, integrity.password, integrity.contentKind
Response Status
200 : the response body contains structure information.
503 : the server is in maintenance and structure cannot be requested.
Response Header
Content-Type : the media type of the response content.
Values can either be application/json (default) or application/xml .
Response Body
JSON or XML nodes.
Node Common Attributes:
id : id of the node. Id to use in the parent query, to get the children of a node.
type : type of the node (e.g. Folder ).
title : display name of the node.
integrity.name - Integrity name of the corresponding Integrity element
integrity.description - Description of the corresponding Integrity element
integrity.id - Integrity id of the corresponding Integrity element
Node Attributes for specific types:
Field node:
integrity.displayName - The display name of the field, which might be different from the integrity.name .
integrity.isMultiValued - true if multiple values can be assigned, false otherwise.
integrity.isRichContent - true if this is an HTML text field, false otherwise.
integrity.maxLength - Maximum length of the text field, if any.
integrity.referenceName - Referenced field name, if any (e.g. Shared Category ).
integrity.type - Integrity type name (e.g. shorttext )
Item node:
integrity.type - Integrity type name (e.g. Requirement Document )
Pick node:
Type node:
integrity.associatedTypeName - Associated Type (e.g. Shared Requirement ), if any.
integrity.type - Integrity type class: none , segment , node or shareditem
|
Using the HTTP Interface
Retrieving the Integrity Top Projects
The developer must send an HTTP GET request to the servlet URL without parent
query parameter,
to get the top Projects or Type list.
The developer must send a HTTP query parameter named metamodel
with a value set to integrity
.
The developer must send the following HTTP headers to enable a connection on the desired Integrity database:
integrity.server
, integrity.port
, integrity.user
and integrity.password
.
The developer shall set the expected Integrity content to be retrieved using the integrity.contentKind
header:
- If the end-user should select an Integrity Project or Item, the content should be set to
Project
.
- If the end-user should select a Integrity Type, the content should be set to
Type
.
Retrieving Integrity Child Elements
The developer must call the Servlet URL with a parent
query parameter
set to the id of the parent node for child nodes must be discovered.
The id of a node is obtained in the Servlet response.
The developer must send a HTTP query parameter named metamodel
with a value set to integrity
.
The developer must send the following HTTP headers to enable a connection on the desired Integrity database:
integrity.server
, integrity.port
, integrity.user
and integrity.password
.
Filtering Integrity elements
The developer shall send HTTP headers to filter Integrity projects directly on server side.
The HTTP headers includes
and excludes
shall be used
to either include only a specific set of Integrity projects or to exclude a set of Integrity projects.
This can be useful to hide parts of the Integrity database to the end-user and to allow him to focus on what is relevant for him.
Structure