Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing device service API specification #106

Closed
farshidtz opened this issue Jul 12, 2022 · 1 comment · Fixed by #123
Closed

Missing device service API specification #106

farshidtz opened this issue Jul 12, 2022 · 1 comment · Fixed by #123

Comments

@farshidtz
Copy link
Member

📚 Docs or Wiki Bug Report

Description [REQUIRED]

The API of the device service translates REST/HTTP requests to SOAP/HTTP. The onvif features section of README links to ONVIF specs which document the SOAP API.
Things are straight forward when it comes to GET commands. However, it isn't that easy to figure out the data model of the input.
The only documented example of a SET command is in docs/getting-started-guide.

It took me some time to figure out how to do a RelativeMove. This only became obvious after I accidentally discovered the device-onvif-camera's Postman collection. It would be nice to make that more accessible. I could use that to figure out how to do RelativeMove:

curl -X PUT http://0.0.0.0:59882/api/v2/device/name/tp-link-Tapo-C210-3fa1fe68-b915-4053-a3e1-14ebb69b5003/RelativeMove -H 'Content-Type: application/json' \
    -d '{"RelativeMove": {"ProfileToken": "profile_1","Translation": {"PanTilt": {"x": 50,"y": 50}}}}'

which isn't obvious by just looking at the onvif spec:
image

I think instead of the Postman collection, the service should publish the spec based on the default camera.yaml profile using OpenAPI spec, added to the docs with Swagger UI.

🔬 Minimal Reproduction

What's the affected URL? [REQUIRED]

https://github.com/edgexfoundry/device-onvif-camera/tree/main/doc

Expected vs Actual Behavior

API specification is not available.

@farshidtz farshidtz added bug Something isn't working documentation labels Jul 12, 2022
@ajcasagrande
Copy link
Contributor

Related: edgexfoundry/device-sdk-go#1165

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants