https://github.com/itwin/itwin-api-sample-app
https://github.com/itwin/itwin-api-sample-app
sample sample-code
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/itwin/itwin-api-sample-app
- Owner: iTwin
- License: mit
- Created: 2022-06-10T16:51:42.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-20T16:41:48.000Z (over 2 years ago)
- Last Synced: 2025-01-01T04:48:12.811Z (4 months ago)
- Topics: sample, sample-code
- Language: C#
- Homepage:
- Size: 37.1 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# iTwin API Sample App
Copyright © Bentley Systems, Incorporated. All rights reserved.
An iTwin sample application that demonstrates how to create, query and update an iTwin using the iTwin API.
This application contains sample code that should not be used in a production environment. It contains no retry logic and minimal logging/error handling.
## Prerequisites
* [Git](https://git-scm.com/)
* Visual Studio 2019/2022 or [Visual Studio Code](https://code.visualstudio.com/)
* [.NET 6.0](https://dotnet.microsoft.com/download/dotnet/6.0/)## Development Setup (Visual Studio 2019 or Visual Studio 2022)
1. Clone Repository
2. Open iTwinSampleApp.sln and Build
3. (Optional) Put breakpoint in Program.cs
4. Run to debug
5. It will require a user token.
* Go to the iTwin API [developer portal](https://developer.bentley.com/apis/itwins/operations/create-itwin/)
* Click the TryIt Button
* In the popup window, select authorizationCode in the Bentley OAuth2 Service dropdown
* This will popup another window that will require you to login.
* After you login, the Authorization header will be populated. Copy the entire string and paste into the command window for the iTwin Sample App.
* Press Enter6. You can now step through the code that will create and manage an iTwin.
## Contributing to this Repository
For information on how to contribute to this project, please read [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines, [GETTINGSTARTED.md](GETTINGSTARTED.md) for information on working with the documentation in this repository.