I'm successfully getting an individual file's properties but when I then try to Parse the output as JSON, I can't seem to do so and am getting a "schema validation error", "message: "Invalid type. Expected Object but got Array.". I'm taking the output from a prior run and pasting it into the Parse JSON to generate the schema, which seems fine, but it fails when I run it (using the body/value output). I have tried it with and without the header portion.
I'm just confused why the output from a previous run wouldn't be valid for a schema payload for future runs. I wanted to use JSON as I can get more values that way, such as file version and who last modified it.
I'm not sure the best way to post the schema, other than as below:
{
"value": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@@odata.etag": {
"type": "string"
},
"ItemInternalId": {
"type": "string"
},
"ID": {
"type": "integer"
},
"Modified": {
"type": "string"
},
"Editor": {
"type": "object",
"properties": {
"@@odata.type": {
"type": "string"
},
"Claims": {
"type": "string"
},
"DisplayName": {
"type": "string"
},
"Email": {
"type": "string"
},
"Picture": {
"type": "string"
},
"Department": {
"type": "string"
},
"JobTitle": {
"type": "string"
}
}
},
"Editor#Claims": {
"type": "string"
},
"SharedWithUsers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@@odata.type": {
"type": "string"
},
"Claims": {
"type": "string"
},
"DisplayName": {
"type": "string"
},
"Email": {
"type": "string"
},
"Picture": {
"type": "string"
},
"Department": {},
"JobTitle": {}
},
"required": [
"@@odata.type",
"Claims",
"DisplayName",
"Email",
"Picture",
"Department",
"JobTitle"
]
}
},
"SharedWithUsers@odata.type": {
"type": "string"
},
"SharedWithUsers#Claims": {
"type": "array",
"items": {
"type": "string"
}
},
"SharedWithUsers#Claims@odata.type": {
"type": "string"
},
"SharedWithDetails": {
"type": "string"
},
"MediaServiceImageTags": {
"type": "array"
},
"MediaServiceImageTags@odata.type": {
"type": "string"
},
"MediaServiceImageTags#WssId": {
"type": "array"
},
"MediaServiceImageTags#WssId@odata.type": {
"type": "string"
},
"Created": {
"type": "string"
},
"Author": {
"type": "object",
"properties": {
"@@odata.type": {
"type": "string"
},
"Claims": {
"type": "string"
},
"DisplayName": {
"type": "string"
},
"Email": {
"type": "string"
},
"Picture": {
"type": "string"
},
"Department": {},
"JobTitle": {}
}
},
"Author#Claims": {
"type": "string"
},
"OData__DisplayName": {
"type": "string"
},
"{Identifier}": {
"type": "string"
},
"{IsFolder}": {
"type": "boolean"
},
"{Thumbnail}": {
"type": "object",
"properties": {
"Large": {
"type": "string"
},
"Medium": {
"type": "string"
},
"Small": {
"type": "string"
}
}
},
"{Link}": {
"type": "string"
},
"{Name}": {
"type": "string"
},
"{FilenameWithExtension}": {
"type": "string"
},
"{Path}": {
"type": "string"
},
"{FullPath}": {
"type": "string"
},
"{IsCheckedOut}": {
"type": "boolean"
},
"{VersionNumber}": {
"type": "string"
}
},
"required": [
"@@odata.etag",
"ItemInternalId",
"ID",
"Modified",
"Editor",
"Editor#Claims",
"SharedWithUsers",
"SharedWithUsers@odata.type",
"SharedWithUsers#Claims",
"SharedWithUsers#Claims@odata.type",
"SharedWithDetails",
"MediaServiceImageTags",
"MediaServiceImageTags@odata.type",
"MediaServiceImageTags#WssId",
"MediaServiceImageTags#WssId@odata.type",
"Created",
"Author",
"Author#Claims",
"OData__DisplayName",
"{Identifier}",
"{IsFolder}",
"{Thumbnail}",
"{Link}",
"{Name}",
"{FilenameWithExtension}",
"{Path}",
"{FullPath}",
"{IsCheckedOut}",
"{VersionNumber}"
}
}
}
}