{"id":20119609,"url":"https://github.com/box/box-windows-metadata-sdk-v2","last_synced_at":"2025-05-06T14:32:37.326Z","repository":{"id":15151335,"uuid":"17878827","full_name":"box/box-windows-metadata-sdk-v2","owner":"box","description":"Box Metadata C# SDK Plugin","archived":false,"fork":false,"pushed_at":"2016-01-24T00:44:03.000Z","size":7678,"stargazers_count":5,"open_issues_count":1,"forks_count":7,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-09T13:46:52.783Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/box.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-18T19:22:19.000Z","updated_at":"2024-02-01T09:33:22.000Z","dependencies_parsed_at":"2022-08-28T09:50:54.294Z","dependency_job_id":null,"html_url":"https://github.com/box/box-windows-metadata-sdk-v2","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fbox-windows-metadata-sdk-v2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fbox-windows-metadata-sdk-v2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fbox-windows-metadata-sdk-v2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/box%2Fbox-windows-metadata-sdk-v2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/box","download_url":"https://codeload.github.com/box/box-windows-metadata-sdk-v2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252703454,"owners_count":21790887,"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":[],"created_at":"2024-11-13T19:16:17.867Z","updated_at":"2025-05-06T14:32:36.068Z","avatar_url":"https://github.com/box.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Project Status](http://opensource.box.com/badges/active.svg)](http://opensource.box.com/badges)\n\nBox Windows Metadata V2 SDK \n==================\n\n\n###Important Notice\n\nBox's metadata functionality is in beta and is subject to frequent change.\nDo not use it with production content as the data will be frequently purged.\nBy using the beta, you are acknowledging that you have read and agreed to our\n[beta terms of service](https://cloud.box.com/s/w73uuums8jjaumtri853). If you\nhave questions, send an email to metadata-beta@box.com.\n\n\n###Prerequisites\n* Git  \n* Visual Studio 2012 w/ Update 2 CTP  \n* Box.V2 SDK (please allow nuget to automatically download missing packages)\n\n###Overview\nThis is a plugin for [box-windows-sdk-v2](https://github.com/box/box-windows-sdk-v2) \nthat enables beta support for Box's metadata API. See\n[metadata API documentation](https://developers.box.com/metadata-api/) and\n[product documentation](https://developers.box.com/metadata-web-application/).\n\n\n\n**Note**: This library and the HTTP API it wraps are in beta and may undergo breaking\nchanges.\n\n### Usage\n\nInitialize the BoxConfig and BoxClient as you normally would. The addition of the BoxMetadataManager as a resource plugin, enables access to the metadata endpoint:\n\n```c#\n// Initialize the client with the MetadataManager plugin\nvar config = new BoxConfig(\u003cClient_Id\u003e, \u003cClient_Secret\u003e, new Uri(\"https://boxsdk\"));\nvar client = new BoxClient(config).AddResourcePlugin\u003cBoxMetadataManager\u003e();\n\n// Initialize the properties instance type and add metadata \nDictionary\u003cstring, string\u003e mdReq = new Dictionary\u003cstring, string\u003e() \n            {\n                { \"client_number\",\"820183\"}, \n                { \"client_name\", \"Biomedical Corp\"}, \n                { \"case_reference\", \"A83JAA\"}, \n                { \"case_type\", \"Employment Litigation\"}, \n                { \"assigned_attorney\", \"Francis Burke\" },\n                { \"case_status\", \"in-progress\"}\n            };\nBoxMetadata md = await _client.ResourcePlugins.Get\u003cBoxMetadataManager\u003e().CreateMetadata(\"YOUR_FILE_ID\", mdReq);\n\n// Retrieve the newly created metadata\nBoxMetadata md = await _client.ResourcePlugins.Get\u003cBoxMetadataManager\u003e().GetMetadata(TestFileId);\n\n// Update the existing metadata\nvar mdReq = new BoxMetadataRequest[]\n{\n    new BoxMetadataRequest() { Op = BoxMetadataOperations.Test, Path=\"assigned_attorney\", Value=\"Francis Burke\"},\n    new BoxMetadataRequest() { Op = BoxMetadataOperations.Replace, Path=\"assigned_attorney\", Value=\"Eugene Huang\"},\n    new BoxMetadataRequest() { Op = BoxMetadataOperations.Test, Path=\"case_status\", Value=\"in-progress\"},\n    new BoxMetadataRequest() { Op = BoxMetadataOperations.Remove, Path=\"case_status\", Value=\"Francis Burke\"},\n    new BoxMetadataRequest() { Op = BoxMetadataOperations.Add, Path=\"retention_length\", Value=\"7_years\"}\n};\n\nBoxMetadata md = await _client.ResourcePlugins.Get\u003cBoxMetadataManager\u003e().UpdateMetadata(TestFileId, mdReq);\n\n\n// A convenience method is available for creating metadata that will first try the create endpoint, and if the type instance is already available, will automatically retry with the updates endpoint\nBoxMetadata md = await _client.ResourcePlugins.Get\u003cBoxMetadataManager\u003e().CreateOrUpdateMetadata(TestFileId, mdReq);\n\n```\n\n\n### Tests\n\nTests can be run through the test explorer window in Visual Studio. Unit tests (tests under BoxMetadataManagerTest) can be run without additional setup. Integration tests (tests under BoxMetadataManagerTestIntegration) must have a valid ClientId/ClientSecret set, along with a valid Access Token to a metadata enabled account.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbox%2Fbox-windows-metadata-sdk-v2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbox%2Fbox-windows-metadata-sdk-v2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbox%2Fbox-windows-metadata-sdk-v2/lists"}