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

Support /results/{id}/{N} and /outputs/{id}/{N} endpoints #759

Open
3 tasks
fmigneault opened this issue Nov 22, 2024 · 0 comments
Open
3 tasks

Support /results/{id}/{N} and /outputs/{id}/{N} endpoints #759

fmigneault opened this issue Nov 22, 2024 · 0 comments
Assignees
Labels
triage/feature New requested feature.

Comments

@fmigneault
Copy link
Collaborator

Description

Given an output that happens to be an "array" (or rather, a multi-value result of any data format or media-type representation), adding an index sub-path could allow retrieving that specific reference. This could be useful for extracting a specific result used for chaining to another (or multiple) process(es).

In other words:

/jobs/{jobId}/results

{
  "result": [1, 2, 3]
  "urls": ["https://.../1", "https://.../2"]
}

/jobs/{jobId}/results/result

[1, 2, 3]

/jobs/{jobId}/results/result/1

2

/jobs/{jobId}/results/urls

["https://.../1", "https://.../2"]

/jobs/{jobId}/results/result/0

https://.../1

To Do

  • implement the endpoint by index
  • raise an "out-of-range" error if the index is invalid or does not apply (not an array value)
  • handle content-negotiation as applicable for that indexed-value

References

@fmigneault fmigneault added the triage/feature New requested feature. label Nov 22, 2024
@fmigneault fmigneault self-assigned this Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/feature New requested feature.
Projects
None yet
Development

No branches or pull requests

1 participant