Gets all ApiKeys of the current user with an optional Report filter.
Authentication
Requires Authorization header with valid Bearer token for scope itwin-platform.
The ApiKey endpoints cannot be used with access tokens generated using the Try it out feature. Only tokens generated using a registered application are permitted.
For more documentation on authorization and how to get access token visit OAUTH2 Authorization 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
Optional Report id to filter ApiKeys.
Optional max items to be sent in response.
Optional token to retrieve next page in paginated response.
Optionally return ApiKeys that expired.
Request headers
OAuth access token with itwin-platform scope
Setting to application/vnd.bentley.itwin-platform.v2+json is recommended.
Response 200 OK
Fetched all user ApiKeys successfully.
{ "keys": [{ "id": "7abd419f-a01d-483c-9242-eaf98c348fbf", "displayName": "iModel Report ApiKey", "userEmail": "john.doe@example.com", "expiresAt": "2022-09-02T12:03:00.0000000+00:00", "_links": { "report": { "href": "https://api.bentley.com/insights/reporting/reports/3fa85f64-5717-4562-b3fc-2c963f66afa6" } } }], "_links": { "next": { "href": "https://api.bentley.com/insights/reporting/keys/?$top=100&$continuationToken=ddac51e3-3d37-4407-816e-52b9fc80d70a" }, "self": { "href": "https://api.bentley.com/insights/reporting/keys/?$top=100" } } }
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 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": "Cannot retrieve ApiKeys.", "details": [{ "code": "InvalidParameter", "message": "Provided '$top' query parameter value is not valid. The value cannot be empty or consist only of whitespace characters.", "target": "$top" }] } }
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 }
ApiKey
Properties of the retrieved ApiKey.
The ApiKey Id.
ApiKey expiration DateTime.
Email of the user who created the ApiKey.
Name of the ApiKey.
{ "type": "object", "title": "ApiKey", "required": [ "id", "displayName", "userEmail", "expiresAt", "_links" ], "properties": { "id": { "type": "string", "description": "The ApiKey Id." }, "_links": { "$ref": "#/components/schemas/ApiKey_Links" }, "expiresAt": { "type": "string", "format": "date-time", "description": "ApiKey expiration DateTime." }, "userEmail": { "type": "string", "description": "Email of the user who created the ApiKey." }, "displayName": { "type": "string", "description": "Name of the ApiKey." } }, "description": "Properties of the retrieved ApiKey.", "additionalProperties": false }
ApiKey Links
Contains contextual hyperlinks to related data.
{ "type": "object", "title": "ApiKey Links", "required": [ "report" ], "properties": { "report": { "$ref": "#/components/schemas/Link" } }, "description": "Contains contextual hyperlinks to related data.", "additionalProperties": false }
DetailedError
Contains error information and an array of more specific errors.
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", "details" ], "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." }, "details": { "type": "array", "items": { "$ref": "#/components/schemas/Error" }, "description": "Optional array of more specific errors." }, "message": { "type": "string", "description": "A human-readable representation of the error." } }, "description": "Contains error information and an array of more specific errors.", "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 }
ApiKey Collection
List of ApiKeys.
{ "type": "object", "title": "ApiKey Collection", "required": [ "keys", "_links" ], "properties": { "keys": { "type": "array", "items": { "$ref": "#/components/schemas/ApiKey" }, "description": "List of ApiKeys." }, "_links": { "$ref": "#/components/schemas/PagedResponseLinks" } }, "description": "List of ApiKeys.", "additionalProperties": false }
Paged Response Links
URLs for redoing the current request and/or getting the next page of results if applicable.
{ "type": "object", "title": "Paged Response Links", "properties": { "next": { "$ref": "#/components/schemas/Link" }, "self": { "$ref": "#/components/schemas/Link" } }, "description": "URLs for redoing the current request and/or getting the next page of results if applicable.", "additionalProperties": false }
Detailed 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": "Detailed Error Response", "required": [ "error" ], "properties": { "error": { "$ref": "#/components/schemas/DetailedError", "description": "Error Detailed 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 }
Was this page helpful?