Retrieves the specified iTwin Share for the specified iTwin.
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
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.
Request parameters
Request headers
OAuth access token with itwin-platform scope
Setting to application/vnd.bentley.itwin-platform.v2+json is recommended.
Response 200 OK
OK
{ "share": { "id": "a9562d2f-c7e1-4be2-9de4-5d33637a71d1", "iTwinId": "7b359df1-04e3-4e2b-9ccb-5f0d4363aa3e", "shareKey": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpVHdpbklkIjoiN2IzNTlkZjEtMDRlMy00ZTJiLTljY2ItNWYwZDQzNjNhYTNlIiwiaWQiOiJhOTU2MmQyZi1jN2UxLTRiZTItOWRlNC01ZDMzNjM3YTcxZDEiLCJleHAiOjE3NDI1MDQxMzh9.12ejNpB6IYUFF6nsPtbtpDdBtAjwlnlzsYIMSxGQjTo", "shareContract": "Default", "expiration": "2025-03-20T20:55:38.4910903+00:00" } }
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 403 Forbidden
The user has insufficient permissions for the requested operation.
{ "error": { "code": "InsufficientPermissions", "message": "The user has insufficient permissions for the requested operation." } }
Response 404 Not Found
This response indicates that iTwin or share with specified ID was not found.
{ "error": { "code": "ItwinNotFound", "message": "Requested iTwin is not available." } }
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.
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 }
Share response
{ "type": "object", "title": "Share response", "required": [ "share" ], "properties": { "share": { "$ref": "#/components/schemas/ITwinShareRepresentation" } }, "additionalProperties": false }
Share
The id of the share.
The id of the iTwin.
The share key to be used for authentication to the share.
The expiration for the share.
The share contract.
{ "type": "object", "title": "Share", "required": [ "id", "iTwinId", "shareKey", "shareContract", "expiration" ], "properties": { "id": { "type": "string", "description": "The id of the share." }, "iTwinId": { "type": "string", "description": "The id of the iTwin." }, "shareKey": { "type": "string", "description": "The share key to be used for authentication to the share." }, "expiration": { "type": "string", "description": "The expiration for the share." }, "shareContract": { "type": "string", "description": "The share contract." } }, "additionalProperties": false }
Was this page helpful?