从 REST API 创建作业返回请求属性名称错误 [英] Creating Job from REST API returns a request property name error
本文介绍了从 REST API 创建作业返回请求属性名称错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已准备好资产和媒体处理器.现在我正在尝试对我的资产进行编码.当我发送教程中指定的请求时 (http://msdn.microsoft.com/en-us/library/jj129574.aspx):
I have my Asset and MediaProcessor ready. Now I am trying to encode my asset. When I send the request specified in the tutorial (http://msdn.microsoft.com/en-us/library/jj129574.aspx):
{
"Name":"CurlTestJob",
"InputMediaAssets":[
{
"__metadata":{
"uri":"https://wamsbluclus001rest-hs.cloudapp.net/api/Assets('nb%3Acid%3AUUID%3A429967f5-4709-4377-bab2-4680ae2a0dd87')"
}
}
],
"Tasks":[
{
"Configuration":"H.264 HD 720p VBR",
"MediaProcessorId":"nb%3Ampid%3AUUID%3A2e7aa8f3-4961-4e0c-b4db-0e0439e524f5",
"TaskBody":"<?xml version=\"1.0\" encoding=\"utf-8\"?><taskBody><inputAsset>JobInputAsset(0)</inputAsset><outputAsset>JobOutputAsset(0)</outputAsset></taskBody>"
}
]
}
我收到以下回复
{
"odata.error":
{
code: "";
message:
{
lang: "en-US";
value: "Parsing request content failed due to: Make sure to only use property names that are defined by the type";
};
};
}
我使用的是 api-version 2.2
I am using api-version 2.2
有人可以向我解释我错在哪里吗?
Can someone explain to me where am I wrong?
推荐答案
尝试设置 Header "DataServiceVersion: 2.0"
Try setting the Header "DataServiceVersion: 2.0"
我在使用DataServiceVersion: 3.0"时遇到了同样的问题
I ran into the same issue when using "DataServiceVersion: 3.0"
这篇关于从 REST API 创建作业返回请求属性名称错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文