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

Question: shouldn't PUT /executions return executionIdentifier? #93

Open
yarikoptic opened this issue Mar 28, 2018 · 3 comments
Open

Question: shouldn't PUT /executions return executionIdentifier? #93

yarikoptic opened this issue Mar 28, 2018 · 3 comments
Assignees
Milestone

Comments

@yarikoptic
Copy link
Contributor

ATM PUT /executions (why not PUT /execution?) returns a an Execution entry, which seems to not be aware of its own executionIdentifier... so I am a bit confused of the "flow" of information here. May be someone could show just on a silly example a typical flow for a simple execution, e.g. to get what is PUT and OUTPUT for each of the following commands for a typical simple execution

  1. PUT /executions -- to initialize a new one
  2. GET /executions -- what would it return
  3. PUT /executions/{executionIdentifier}/play -- which is what I guess is needed to switch execution from "initialized" to actually running?

That would help to mentalize it all -- thank you very much in advance

@axlbonnet
Copy link
Contributor

If i'm not mistaking PUT /executions does not exist, and you're talking about POST /executions.

Anyway, the flow is this one :

  1. I submit a new execution on POST /executions with an Execution payload containing a pipelineIdentifier, a name, some inputValues (and an optional timeout). The platform returns the same Execution object with enriched information : the important identifier and the status. Depending on the platform, the status could be Initializing or Running.

  2. I monitor the execution state with GET /executions/{executionIdentifier} which returns an actualized Execution object. I'm interested in its status evolution and i'm waiting for it to transition from Initializing --> Ready or from Running --> Finished

  3. (Optional) If my execution is Ready, i call PUT /executions/{executionsIdentifier}/play to start it. It returns an Execution object whose status is Running and I must monitor it again until it is Finished (Step 2).

Other related methods that could be confusing :

  • PUT /executions/{executionIdentifier} allow to modify an execution. This is limited as only the name and the timeout can be changed.
  • GET /executions is an utility that allow to list all my executions.

@glatard
Copy link
Contributor

glatard commented Apr 9, 2018

Maybe we could relate to the documentation here: https://github.com/simon-dube/CARMIN-server

@axlbonnet
Copy link
Contributor

We should at least put in the CARMIN-API repository README some basic documentation about a typical flow, in order to show the main features of the API.

Then we should also include some request examples, and if possible several complete workflows somewhere. First we'll check if we can do that in the OpenAPI document, and if swaggerHub can show them nicely. Otherwise we'll also put that in the main README.

@axlbonnet axlbonnet removed the question label Apr 9, 2018
@axlbonnet axlbonnet added this to the v0.4 milestone Jul 22, 2019
@axlbonnet axlbonnet self-assigned this Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants