Creates a Report Mapping. Each one links a Mapping to a Report and each Report can have more than one Report Mapping.
Authentication
Requires Authorization header with valid Bearer token for scope itwin-platform.
For more documentation on authorization and how to get access token visit OAUTH2 Authorization page.
Authorization
User must have imodels_read, insights_modify permission(s) assigned at the Project level. iModel specific permissions may also be applied at the iModel level if iModel level permissions are enabled.
Alternatively the user should be an Organization Administrator for the Organization that owns a given Project or iModel.
An Organization Administrator must have at least one of the following roles assigned in User Management: Account Administrator, Co-Administrator, or CONNECT Services Administrator. For more information about User Management please visit our Bentley Communities Licensing, Cloud, and Web Services wiki page.
Rate limits
All iTwin Platform API operations have a rate limit. For more documentation on that visit Rate limits and quotas page.
Request parameters
The Report Id.
Request headers
OAuth access token with itwin-platform scope
Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.
Request body
Report Mapping (create)
The iModel Id.
The Mapping Id that should be linked to this Report.
Example
{ "mappingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "imodelId": "70a3d6d3-5385-4bc3-87c4-b6bf106e1c0a" }
Response 200 OK
Created a new Report Mapping successfully.
{ "mapping": { "reportId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "mappingId": "e3eb6edf-ab40-4b71-adb6-1f8dec1f8ea2", "imodelId": "70a3d6d3-5385-4bc3-87c4-b6bf106e1c0a", "_links": { "report": { "href": "https://api.bentley.com/insights/reporting/reports/3fa85f64-5717-4562-b3fc-2c963f66afa6" }, "mapping": { "href": "https://api.bentley.com/insights/reporting/datasources/imodels/70a3d6d3-5385-4bc3-87c4-b6bf106e1c0a/mappings/e3eb6edf-ab40-4b71-adb6-1f8dec1f8ea2" }, "imodel": { "href": "https://api.bentley.com/imodels/70a3d6d3-5385-4bc3-87c4-b6bf106e1c0a" } } } }
Response 401 Unauthorized
This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.
{ "error": { "code": "HeaderNotFound", "message": "Header Authorization was not found in the request. Access denied." } }
Response 404 Not Found
Specified ReportMapping was not found.
{ "error": { "code": "ReportMappingNotFound", "message": "Requested ReportMapping is not available.", "target": "id" } }
Response 422 Unprocessable Entity
The 422 (Unprocessable Entity) status code indicates that the request cannot be processed by the server due to a client error (e.g. malformed request syntax).
{ "error": { "code": "InvalidInsightsRequest", "message": "Error message." } }
Response 429 Too many requests
This response indicates that the client sent more requests than allowed by this API for the current tier of the client.
{ "error": { "code": "RateLimitExceeded", "message": "The client sent more requests than allowed by this API for the current tier of the client." } }
Response headers
Number of seconds to wait until client is allowed to make more requests.
Link
Hyperlink container.
Hyperlink to the specific entity.
{ "type": "object", "title": "Link", "properties": { "href": { "type": "string", "description": "Hyperlink to the specific entity." } }, "description": "Hyperlink container.", "additionalProperties": false }
Error
Contains error information.
One of a server-defined set of error codes.
The target of the error.
A human-readable representation of the error.
{ "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "target": { "type": "string", "nullable": true, "description": "The target of the error." }, "message": { "type": "string", "description": "A human-readable representation of the error." } }, "description": "Contains error information.", "additionalProperties": true }
Error Response
Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.
{ "type": "object", "title": "Error Response", "required": [ "error" ], "properties": { "error": { "$ref": "#/components/schemas/Error", "description": "Error information." } }, "description": "Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.", "additionalProperties": false }
Report Mapping
Defines a relationship between Report and Mapping. A Mapping can be associated with more than one Report.
{ "type": "object", "title": "Report Mapping", "properties": { "_links": { "type": "object", "properties": { "imodel": { "$ref": "#/components/schemas/Link" }, "report": { "$ref": "#/components/schemas/Link" }, "mapping": { "$ref": "#/components/schemas/Link" } }, "description": "Contains contextual hyperlinks to related data." }, "imodelId": { "type": "string", "description": "The iModel Id." }, "reportId": { "type": "string", "description": "The Report Id." }, "mappingId": { "type": "string", "description": "The Mapping Id." } }, "description": "Defines a relationship between Report and Mapping. A Mapping can be associated with more than one Report.", "additionalProperties": false }
Report Mapping (create)
Properties of the Report Mapping to be created.
The iModel Id.
The Mapping Id that should be linked to this Report.
{ "type": "object", "title": "Report Mapping (create)", "properties": { "imodelId": { "type": "string", "description": "The iModel Id." }, "mappingId": { "type": "string", "description": "The Mapping Id that should be linked to this Report." } }, "description": "Properties of the Report Mapping to be created.", "additionalProperties": false }
Report Mapping Response
Container for a Report Mapping object.
{ "type": "object", "title": "Report Mapping Response", "properties": { "mapping": { "$ref": "#/components/schemas/Report_Mapping" } }, "description": "Container for a Report Mapping object.", "additionalProperties": false }
Was this page helpful?