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

API requests: have a single table mapping NcMethodStatus to HTTP codes #3

Open
jonathan-r-thorpe opened this issue Jan 9, 2024 · 2 comments
Labels
enhancement New feature or request triage Apply to all new issues

Comments

@jonathan-r-thorpe
Copy link
Contributor

https://github.com/AMWA-TV/is-14/blob/publish-CR/docs/API%20requests.md

Currently there are multiple tables describing mappings from NcMethodStatus to HTTP codes. This should be replaced with a single table that maps all NcMethodStatus codes to HTTP codes (similar to the data type marshalling document)

@jonathan-r-thorpe jonathan-r-thorpe added the enhancement New feature or request label Jan 9, 2024
@github-actions github-actions bot added the triage Apply to all new issues label Jan 9, 2024
@cristian-recoseanu
Copy link
Contributor

We will do a first attempt to see what a unified mapping table looks like.

@jonathan-r-thorpe
Copy link
Contributor Author

Here's a first pass at a mapping table.

From the ConfigurationAPI.raml this is the current mapping from NcMethodStatus to HTTP Code:

NcMethodStatus MS-05-02 code HTTP code
OK 200 200
BadOid 404 404
MethodNotImplmented 501 404
PropertyNotImplemented 502 404
Readonly 405 500
ParameterError 417 400
DeviceError 500 500

However, These NcMethodStatus codes are not covered by the current RAML:

NcMethodStatus MS-05-02 code Comment
BadCommandFormat 400 Badly-formed command IS-12 specific?
Unauthorized 401 Client is not authorized Usage not well defined
InvalidRequest 406 Method call is invalid in current operating context This needs a mapping (4xx?)
Conflict 409 There is a conflict with the current state of the device This needs a mapping (5xx?)
BufferOverflow 413 Something was too big This needs a mapping (5xx?)
IndexOutOfBounds 414 Index is outside the available range This needs a mapping (4xx?)
Locked 423 Addressed object is locked This needs a mapping (?)
NotReady 503 The device is not ready to handle any commands This needs a mapping (5xx?)
Timeout 504 Method call did not finish within the allotted time Distinct from an HTTP timeout?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage Apply to all new issues
Projects
None yet
Development

No branches or pull requests

2 participants