{"id":20382674,"url":"https://github.com/autodesk-forge/forge-viewmodels","last_synced_at":"2025-04-12T08:54:03.583Z","repository":{"id":54667125,"uuid":"76556591","full_name":"Autodesk-Forge/forge-viewmodels","owner":"Autodesk-Forge","description":"View models from listof buckets and objects: This basic C# WebAPI back-end sample implements a basic list of Buckets and Objects with an Autodesk Forge 2-Legged Token ","archived":false,"fork":false,"pushed_at":"2021-09-10T21:33:46.000Z","size":1310,"stargazers_count":21,"open_issues_count":2,"forks_count":19,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-12T08:53:58.427Z","etag":null,"topics":["autodesk-model-derivative","autodesk-viewer","csharp","net-core"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Autodesk-Forge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-15T12:09:34.000Z","updated_at":"2024-07-01T12:26:05.000Z","dependencies_parsed_at":"2022-08-13T23:20:19.923Z","dependency_job_id":null,"html_url":"https://github.com/Autodesk-Forge/forge-viewmodels","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fforge-viewmodels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fforge-viewmodels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fforge-viewmodels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fforge-viewmodels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Autodesk-Forge","download_url":"https://codeload.github.com/Autodesk-Forge/forge-viewmodels/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543882,"owners_count":21121838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autodesk-model-derivative","autodesk-viewer","csharp","net-core"],"created_at":"2024-11-15T02:18:34.803Z","updated_at":"2025-04-12T08:54:03.550Z","avatar_url":"https://github.com/Autodesk-Forge.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# View Models (.NET Core C#)\n\n![Platforms](https://img.shields.io/badge/platform-Windows|MacOS-lightgray.svg)\n![.NET](https://img.shields.io/badge/.NET%20Core-3.1-blue.svg)\n[![License](http://img.shields.io/:license-MIT-blue.svg)](http://opensource.org/licenses/MIT)\n\n[![oAuth2](https://img.shields.io/badge/oAuth2-v1-green.svg)](http://developer.autodesk.com/)\n[![OSS](https://img.shields.io/badge/OSS-v2-green.svg)](http://developer.autodesk.com/)\n[![Model-Derivative](https://img.shields.io/badge/Model%20Derivative-v2-green.svg)](http://developer.autodesk.com/)\n[![Viewer](https://img.shields.io/badge/Viewer-v6-green.svg)](http://developer.autodesk.com/)\n\n![Intermediate](https://img.shields.io/badge/Level-Intermediate-blue.svg)\n\n# Description\n\nThis basic C# WebAPI back-end sample implements a basic list of Buckets and Objects with an [Autodesk Forge 2 Legged OAuth](https://developer.autodesk.com/en/docs/oauth/v2/tutorials/get-2-legged-token/). The front-end was desiged with pure HTML + JavaScript (jQuery, Bootstrap), no ASPx features (i.e. no WebForms or MVC on this sample). It includes: create and delete buckets, upload and delete object, translate (including `.zip` files). This code is based on [this tutorial](http://learnforge.autodesk.io).\n\n## Thumbnail\n\n![thumbnail](/thumbnail.png)\n\n# Setup\n\n## Prerequisites\n\n1. **Forge Account**: Learn how to create a Forge Account, activate subscription and create an app at [this tutorial](http://learnforge.autodesk.io/#/account/). \n2. **Visual Studio**: Either Community 2017+ (Windows) or Code (Windows, MacOS).\n3. **.NET Core** basic knowledge with C#\n4. **JavaScript** basic knowledge with **jQuery**\n5. **ngrok**: Routing tool, [download here](https://ngrok.com/)\n\n## Running locally\n\nClone this project or download it (this `netcore` branch only). It's recommended to install [GitHub desktop](https://desktop.github.com/). To clone it via command line, use the following (**Terminal** on MacOSX/Linux, **Git Shell** on Windows):\n\n    git clone github.com/Autodesk-Forge/model.derivative-WebAPI-sample.git\n\n**Visual Studio** (Windows):\n\nRight-click on the project, then go to **Debug**. Adjust the settings as shown below. \n\n![](forgeSample/wwwroot/img/readme/visual_studio_settings.png)\n\n**Visual Sutdio Code** (Windows, MacOS):\n\nOpen the folder, at the bottom-right, select **Yes** and **Restore**. This restores the packages (e.g. Autodesk.Forge) and creates the launch.json file. See *Tips \u0026 Tricks* for .NET Core on MacOS.\n\n![](forgeSample/wwwroot/img/readme/visual_code_restore.png)\n\nAt the `.vscode\\launch.json`, find the env vars and add your Forge Client ID, Secret and callback URL. Also define the `ASPNETCORE_URLS` variable. The end result should be as shown below:\n\n```json\n\"env\": {\n    \"ASPNETCORE_ENVIRONMENT\": \"Development\",\n    \"ASPNETCORE_URLS\" : \"http://localhost:3000\",\n    \"FORGE_CLIENT_ID\": \"your id here\",\n    \"FORGE_CLIENT_SECRET\": \"your secret here\",\n    \"FORGE_WEBHOOK_URL\": \"your ngrok address here: e.g. http://abcd1234.ngrok.io\",\n},\n```\n\nRun `ngrok http 3000` to create a tunnel to your local machine, then copy the address into the `FORGE_WEBHOOK_URL` environment variable.\n\n## Deployment\n\nTo deploy this application to Heroku. After clicking on the button below, at the Heroku Create New App page, set your Client ID and Secret for Forge.\n\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\n# Further Reading\n\nDocumentation:\n\n- [Data Management API](https://developer.autodesk.com/en/docs/data/v2/overview/)\n- [Model Derivative API](https://forge.autodesk.com/en/docs/model-derivative/v2/developers_guide/overview/)\n- [Viewer](https://developer.autodesk.com/en/docs/viewer/v6)\n\n### Tips \u0026 Tricks\n\nThis sample uses .NET Core and works fine on both Windows and MacOS, see [this tutorial for MacOS](https://github.com/augustogoncalves/dotnetcoreheroku).\n\n### Troubleshooting\n\n1. **error setting certificate verify locations** error: may happen on Windows, use the following: `git config --global http.sslverify \"false\"`\n\n2. **Using Visual Studio 2015 (or older)**: unfortunately this version is not supported.\n\n## License\n\nThis sample is licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT). Please see the [LICENSE](LICENSE) file for full details.\n\n## Written by\n\nAugusto Goncalves [@augustomaia](https://twitter.com/augustomaia), [Forge Partner Development](http://forge.autodesk.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautodesk-forge%2Fforge-viewmodels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautodesk-forge%2Fforge-viewmodels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautodesk-forge%2Fforge-viewmodels/lists"}