Coder Social home page Coder Social logo

Comments (3)

Shin-yaKoga avatar Shin-yaKoga commented on July 26, 2024 1

この API(Device Group - Delete)は、その他の DELETE/PUT/POST 系の API と同じく、成功時のレスポンスのステータスコードとして 202 (Accepted) を返す非同期 API ですから、失敗しても、リクエストのレスポンスではエラーを知ることができません。レスポンス中の StartedDateUTC や CompletedDateUTC が null なのも、そのためだと思われます。
 非同期 API の実行が終わったこと、および終わった時の結果を知るためには、レスポンスで返ってきた Microsoft.Azure.Sphere.PublicApi.Contracts.Operation の OpereationId をパラメータにして、Async Operations - AsyncOperations Get を呼び出す必要があるでしょう:
 https://docs.microsoft.com/en-us/rest/api/azure-sphere/async%20operations/asyncoperations_get

from azuresphereexplorer.

matsujirushi avatar matsujirushi commented on July 26, 2024

プロダクトの削除で、削除の成功/失敗が判断できるか調べた。

-> 判断できない。

成功時

image

response.Content:

{"TenantId":"31908d60-fc8a-4403-b739-348ee8705d66","OperationId":"0a8a1023-1c61-4f6c-831e-dab66a4448e8","CreatedDateUTC":"2020-08-31T11:52:04.407902Z","StartedDateUTC":null,"CompletedDateUTC":null,"OperationType":10,"State":0,"ResourceLocation":"","Error":null}

失敗時

image

response.Content:

{"TenantId":"31908d60-fc8a-4403-b739-348ee8705d66","OperationId":"d122cee1-bda3-4c72-93e9-1b91d18e0c94","CreatedDateUTC":"2020-08-31T11:50:01.5251166Z","StartedDateUTC":null,"CompletedDateUTC":null,"OperationType":10,"State":0,"ResourceLocation":"","Error":null}

from azuresphereexplorer.

matsujirushi avatar matsujirushi commented on July 26, 2024

@Shin-yaKoga
情報ありがとうございます。

こちらにも同様の回答がありました。
https://docs.microsoft.com/answers/answers/97310/view.html

from azuresphereexplorer.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.