REST api的响应 [英] Response of REST api

查看:84
本文介绍了REST api的响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好, 


当我打电话*删除资产*或* LinkAssetToKey *通过使用REST API,不管它的成功或FAILUR的 E,Azure Media服务没有返回值。运行api之后,我检查了Azure门户,资产
未被删除,资产没有链接到密钥。现在有返回值(消息或代码)。任何想法都会受到欢迎。


我是使用PHP,并将以下值传递给AMS(根据POSTMAN)。


    [10002] => HTTPS://******.restv2.japaneast.media.azure.net/api/Assets( 'NB:CID:UUID:8474f5b8 - #### - #### - b00a-4bf622d89aee')

    [10036] =>删除

    [64] =>

    [19913] => 1

    [10023] =>数组

        (

       [0] => x-ms-version:2.15

        [1] =>接受:application / json

       [2] => Content-Type:application / json

       [3] =>授权:承载eyJ0eXAiOiJKV1QiLCJ ######## _ nRWOJ2tMeOnCuT0g

  &NBSP ;    [4] => DataServiceVersion:3.0

       [5] => MaxDataServiceVersion:3.0

       [6] =>主机:amsdrmtest01.restv2.japaneast.media.azure.net

     )


提前致谢,


Ying

解决方案

谢谢f或者你的问题。您能否确认您使用以下格式进行删除通话?
<预类= "prettyprint">删除的https:///订阅/ {subscriptionId} / resourceGroups / {resourceGroupName} /providers/Microsoft.Media/mediaServices/ {帐户名} /资产/ {ASSETNAME} API- version = 2018-03-30-preview




来源:  https://docs.microsoft.com/en-us/rest/api/媒体/资产/删除



Hello there, 

When I called *delete asset* or *LinkAssetToKey* by using REST api, whatever it's SUCCESS or FAILURE, there are no return value from Azure Media service. After I ran the api, I checked Azure portal, the asset wasn't deleted, the asset wasn't linked to the key. And there are now return value(message or code). Any idea would be welcomed.

I am using PHP, and passedthe following value to AMS(according to POSTMAN).

    [10002] => https://******.restv2.japaneast.media.azure.net/api/Assets('nb:cid:UUID:8474f5b8-####-####-b00a-4bf622d89aee')
    [10036] => DELETE
    [64] =>
    [19913] => 1
    [10023] => Array
        (
            [0] => x-ms-version: 2.15
            [1] => Accept: application/json
            [2] => Content-Type: application/json
            [3] => Authorization: Bearer eyJ0eXAiOiJKV1QiLCJ########_nRWOJ2tMeOnCuT0g
            [4] => DataServiceVersion: 3.0
            [5] => MaxDataServiceVersion: 3.0
            [6] => Host: amsdrmtest01.restv2.japaneast.media.azure.net
        )

Thanks in advance,

Ying

解决方案

Thank you for your question Ying. Can you please verify that you are using the below format for your delete call?

DELETE https:///subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/mediaServices/{accountName}/assets/{assetName}?api-version=2018-03-30-preview


Source: https://docs.microsoft.com/en-us/rest/api/media/assets/delete


这篇关于REST api的响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆