Search code examples
metadatajsonschemafacetonedrive

OneDrive Facet schema Registration (for metadata)


I am trying to write some custom facet in order to add some metadata for OneDrive API as per https://dev.onedrive.com/misc/custom-metadata.htm

To do the schema registration I need to send an email with my CLIENT_ID and the schema definition JSON (to: [email protected]). On the body of the email I am providing the clientID on the first line and then on the 2nd and after I am giving the json as inline text.

This is my json schema:

{
    "name": "appDomain",
    "description": "",
    "properties": [
    {
      "name": "lastModifiedTime",
      "type": "datetime",
      "nullable": “false"
    },
    {
      "name": "locale",
      "type": "string ",
      "max": "3",
      "nullable": "true"
    }
    ]
}

After that, I did not receive any email to confirm about any successful registration.

When I am calling the PATCH request with the new metadata as following:

{
"appDomain": 
   {
     "lastModifiedTime": "2015-08-01T20:17:12.86Z",
     "locale": "EN"
   }
}

I am still not able to get the metadata values, but this response:

{
    "error": {
        "code": "invalidRequest",
        "message": "property appDomain does not exist"
    }
}

Do I need to do something different so to register properly my metadata property values? Thanks.


Solution

  • it looks like you did everything right! The custom facet feature is still in Preview (https://dev.onedrive.com/misc/custom-metadata.htm), so the facets don't automatically get registered when you send your mail. Please check your mail for a response from the team.