-
Notifications
You must be signed in to change notification settings - Fork 47
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
Endpoint to fetch workflow type #259
Comments
I strongly agree this type of discovery is a requirement - and beyond just "supported workflow endpoints", discovery must include some definition on the protocol supported by those endpoints. In conjunction with that, I think it is vital to avoid creating the next WSDL. Clients to this API and its discovery need clear, normative guidance on how to interact with discovered endpoints (and when not to). Leaving I'd like to keep this Issue focused on workflow endpoint / type discovery, and open another issue/pr on the protocol discovery problem once this issue is resolved if folks agree, to contain the discussion a bit. An example structure for
This issue I think should define acceptable "types" on the RHS, and the next issue should provide guidance on the contents of these types/references - what MUST be in a type definition for clients to successfully operate in this pattern? Thoughts? |
You probably want to build in support for pagination:
|
There are some pretty normal conventions for this that we can take a stab at in a PR |
relevant DIF Specs:
Use Case: Discover the credentials and flows this issuer supports, then automatically obtain a credential from them, by presenting them other credentials. |
Thanks Orie; I'll have a look at Hydra. From first scan, and in response to the Credential Manifest and Presentation Exchange, I was thinking of something more generic; but I am open to feedback before I put together the PR. What I had in mind was a JSON object where:
where the Client MUST recognize the spec definition string as something it can support (if it expects to execute on the exchange). The spec definition string points to a "defined" spec; and those specs may be fluid and dynamic, or more prescriptive. For example, My goal/approach is that a Client (Holder) should be able to determine what protocol the endpoints support, and if they recognize that protocol, before calling them. This does not necessarily guarantee Client success; maybe during the exchange the Client discovers it cannot provide the necessary Cred... but at least it was able to communicate with the server and obtain those expectations. I would like to avoid Clients from having to implement too much logic at this stage of "discovery" - they either recognize and support the protocol or not. Open to other approaches on how Clients can quickly determine what to do with an endpoint. |
I also think we can add query params to tweak the response after we know the contents of the response... pagination and filtering etc... Quick rationale check; pagination is important because? I haven't seen it in other discovery protocols, but don't take that as me saying its a bad idea (and I have not seen all discovery protocols either). Just looking for the reason. Examples could be "in traceability world, we have thousands of workflows..." or "as a Client, I'll have an idea of the exchanges I support and don't want to receive and process the entire set..." ? I dunno, help me out :) supporting query parameters complicates server implementation. |
@msporny sorry, I can't lead on this one... perhaps @mkhraisha or @mprorock or @mavarley would be able to define these endpoints? |
Here is a better pagination example to kickstart the process:
|
@OR13 - I am able to define the endpoints, but I've asked for rationale as to why an endpoint used for automated discovery needs pagination - and if filtering is also required as I will include it in the same update. From my POV, I don't see such a huge volume of endpoints that the payload would be cumbersome for clients to manage (ie, the JSON response is reasonable enough in size that pagination is not required). If this is for UI display I can see the need for pagination but it is not something I had considered. If it is for finding an endpoint, then filtering may be more appropriate. Requiring pagination adds complexity and testing to the implementation which I just want to make sure we have a rationale for. What do you have in mind? Thanks. |
@mavarley its not that it needs it now, it's that you shouldn't assume it never will... and your JSON should account for that in the future. |
Yes, this comes up time and time again. As a (bad) example, IBM and Oracle went as far as to define one for the Linked Data Platform HTTP API work: https://www.w3.org/TR/ldp-paging/ I don't think we survive this work without one... and we should look to Twitter/Github/etc. for inspiration. |
Presumably, any client using this interface will be enumerating / continuing a query against the same deployment. Given that, we may allow implementations more flexibility in their database choices, etc. by expressing cursor information using an opaque next value string and whether or not there are more results: {
results: [/* { result one } */, /* { result two }, ... */],
cursor: {
next: <id of next value | page number | meaningful to implementation>,
hasMore: true
}
}
|
Work and discussion is captured in PR #268 - closing this issue. |
We probably should have an endpoint where you can fetch what workflow types your implementation supports.
something along the lines of
GET workflows
The text was updated successfully, but these errors were encountered: