Using the All Projects Inclusions Report REST API
The All Projects Inclusions Report REST API provides the ability to get a report of all Policy Modeling projects included by other Policy Modeling projects.
For the permissions required to access the All Projects Inclusions Report REST API, see Role Permissions for Intelligent Advisor REST APIs.
Example GET an all projects inclusions report
The GET request URL looks like:
opa-hub/api/12.2.39/projects-inclusions
The response to a get an all projects inclusions report request looks like the following:
{
"inclusions": [{
"projectName": "Project A",
"projectVersion": 6,
"inclusionName": "Project B",
"inclusionVersion": 3,
"inclusionLatestVersion": 3,
"upToDateFlag": true
}, {
"projectName": "Project A",
"projectVersion": 6,
"inclusionName": "Project C",
"inclusionVersion": 3,
"inclusionLatestVersion": 4,
"upToDateFlag": false
}, {
"projectName": "Project B",
"projectVersion": 3,
"inclusionName": "Project D",
"inclusionVersion": 5,
"inclusionLatestVersion": 5,
"upToDateFlag": true
}, {
"projectName": "Project D",
"projectVersion": 1,
"inclusionName": "Project E",
"inclusionVersion": 3,
"inclusionLatestVersion": 4,
"upToDateFlag": false
}
],
"links": [
// ...
]
}
Note that only the immediate inclusions of the project are listed. For more information, see Get an all projects inclusions report.
The data may also be encoded as CSV data, suitable for Excel. The client may request CSV data in one of two ways:
-
Provide an HTTP Accept header that specifies that CSV data is preferred. The format is:
Accept: text/csv
-
Provide a query parameter in the URL that specifies that CSV data is required. The format is:
GET /opa-hub/api/12.2.39/projects-inclusions/?mediaType=text/csv