调用GetOssUploadMeta获取上传升级包到OSS所需要的STS token和Policy等信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String GetOssUploadMeta

系统规定参数。取值:GetOssUploadMeta

ProjectId String P0VFCREU

所属项目ID

RegionId String cn-shanghai

地域ID

Ext String zip

文件后缀

返回数据

名称 类型 示例值 描述
RequestId String 6F25F67C-F411-499F-BCE2-67CA563CB064

请求ID

OssUploadMeta

上传需要的信息

AccessKey String STS.NHBZSTcJvgZpKgs2XiuWKqWfk

上传需要的信息

Host String http://fota-upload-packages.oss-cn-shanghai.aliyuncs.com

上传的OSS服务器地址

ObjectKey String 11/1527911483513.zip

上传文件的目标路径

Policy String eyJleHBpcmF0aW9uIjoiMjAxOC0wNi0wMlQwMzo1MTo1NC44NDRaIiwiY29uZGl0aW9ucyI6W1siY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsMTA3Mzc0MTgyNF0sWyJzdGFydHMtd2l0aCIsIiRrZXkiLCIxMS8iXV19

OSS上传文件的Policy

SecurityToken String CAISxgJ1q6Ft5B2yfSjIr4v3EengjpVX0JibSUHC1lg8edhnnpLNiTz2IHxOfXRsAuwYsvswm29S7P0elqF0UNpEQ0rJd5P5Dk/KIkfzDbDasumZsJbM4f/MQBphYnyW9cvWZPqDA7G5U

STS token

Signature String vDcrUl4BPFOFGbrOQPuv2slyOpY=

签名

示例

请求示例


http(s)://iovcc.cn-shanghai.aliyuncs.com/?Action=GetOssUploadMeta
&ProjectId=P0VFCREU
&RegionId=cn-shanghai
&Ext=zip
&<公共请求参数>

正常返回示例

XML 格式

<GetOssUploadMetaResponse>
	  <RequestId>4EFF678D-DD88-4AEB-B81C-B760AFDFA250</RequestId>
	  <OssUploadMeta>
		    <Policy>eyJleHBpcmF0aW9uIjoiMjAxOC0wNi0wMlQwMzo1MTo1NC44NDRaIiwiY29uZGl0aW9ucyI6W1siY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsMTA3Mzc0MTgyNF0sWyJzdGFydHMtd2l0aCIsIiRrZXkiLCIxMS8iXV19</Policy>
		    <SecurityToken>CAISxgJ1q6Ft5B2yfSjIr4v3EengjpVX0JibSUHC1lg8edhnnpLNiTz2IHxOfXRsAuwYsvswm29S7P0elqF0UNpEQ0rJd5P5Dk/KIkfzDbDasumZsJbM4f/MQBphYnyW9cvWZPqDA7G5U/yxalfCuzZuyL/hD1uLVECkNpv77vwCac8MDDGlcR1MBtpdOnFiyqkgOGDWKOymPzPzn2PUFzAIgAdnjn5l4qnN5q/X4xHF3lrh0b1X9cajLJ+4ZoxxJJN4WtvwxOV9daPO3TUXskEoua59l/5D4iyV/IPfUVdW/xzDLvLQ9dRjaRdwbaszFKNf66Gl0r9awrWKyt2ukUsXbbgFA3qEGNmarZGaSL/zBLEQbq3mPnnB6NeLO6TuvhksCXBhb18QIod9cSMuVUNzFW6AcPT74jDNeUKiTa6IyrHbGGHxNOMFlxqAAT7JoElpTAaqu8A5uL5ZWpQSOmzeLFj8kPym5iwsEZZkFJbP7IfcnEe2ta8VhKlbY0hU5EgdfbKfORCzLTmOQRVwdtqyajQ5grUKKI2LXuEkncoPrC6uJ1VLPYuRNOZ3Lc/8/4Iuq5fo64HxooNO4fB30yujSuZWO8atkKlTwN2c</SecurityToken>
		    <Signature>vDcrUl4BPFOFGbrOQPuv2slyOpY=</Signature>
		    <ObjectKey>11/1527911483513.zip</ObjectKey>
		    <Host>http://fota-upload-packages.oss-cn-shanghai.aliyuncs.com</Host>
		    <AccessKey>STS.NHBZSTcJvgZpKgs2XiuWKqWfk</AccessKey>
	  </OssUploadMeta>
</GetOssUploadMetaResponse>

JSON 格式

{
	"RequestId":"4EFF678D-DD88-4AEB-B81C-B760AFDFA250",
	"OssUploadMeta":{
		"Host":"http://fota-upload-packages.oss-cn-shanghai.aliyuncs.com",
		"AccessKey":"STS.NHBZSTcJvgZpKgs2XiuWKqWfk",
		"Policy":"eyJleHBpcmF0aW9uIjoiMjAxOC0wNi0wMlQwMzo1MTo1NC44NDRaIiwiY29uZGl0aW9ucyI6W1siY29udGVudC1sZW5ndGgtcmFuZ2UiLDAsMTA3Mzc0MTgyNF0sWyJzdGFydHMtd2l0aCIsIiRrZXkiLCIxMS8iXV19",
		"SecurityToken":"CAISxgJ1q6Ft5B2yfSjIr4v3EengjpVX0JibSUHC1lg8edhnnpLNiTz2IHxOfXRsAuwYsvswm29S7P0elqF0UNpEQ0rJd5P5Dk/KIkfzDbDasumZsJbM4f/MQBphYnyW9cvWZPqDA7G5U/yxalfCuzZuyL/hD1uLVECkNpv77vwCac8MDDGlcR1MBtpdOnFiyqkgOGDWKOymPzPzn2PUFzAIgAdnjn5l4qnN5q/X4xHF3lrh0b1X9cajLJ+4ZoxxJJN4WtvwxOV9daPO3TUXskEoua59l/5D4iyV/IPfUVdW/xzDLvLQ9dRjaRdwbaszFKNf66Gl0r9awrWKyt2ukUsXbbgFA3qEGNmarZGaSL/zBLEQbq3mPnnB6NeLO6TuvhksCXBhb18QIod9cSMuVUNzFW6AcPT74jDNeUKiTa6IyrHbGGHxNOMFlxqAAT7JoElpTAaqu8A5uL5ZWpQSOmzeLFj8kPym5iwsEZZkFJbP7IfcnEe2ta8VhKlbY0hU5EgdfbKfORCzLTmOQRVwdtqyajQ5grUKKI2LXuEkncoPrC6uJ1VLPYuRNOZ3Lc/8/4Iuq5fo64HxooNO4fB30yujSuZWO8atkKlTwN2c",
		"ObjectKey":"11/1527911483513.zip",
		"Signature":"vDcrUl4BPFOFGbrOQPuv2slyOpY="
	}
}

错误码

访问错误中心查看更多错误码。