Skip to content

Commit 7ebbb0a

Browse files
claudegraduta
authored andcommitted
[O2B-1623] Regenerate the HTTP API documentation with the simulation passes endpoints
1 parent 659af29 commit 7ebbb0a

2 files changed

Lines changed: 208 additions & 0 deletions

File tree

‎lib/server/api-docs/API.md‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,3 +379,60 @@ Responses:
379379
```bash
380380
curl -g "$BOOKKEEPING_URL/api/shift-data?shiftType=ECS&token=$TOKEN"
381381
```
382+
383+
## Simulation passes
384+
385+
Monte Carlo simulation productions.
386+
387+
### `GET /simulationPasses` - List simulation passes
388+
389+
Operation id: `listSimulationPasses`
390+
391+
Returns a page of simulation passes with their statistics (number of runs, data passes and logs).
392+
Default order is by name, descending.
393+
394+
List filters are repeated query parameters: `filter[ids][]=1&filter[ids][]=2`. A single value without `[]` is rejected. Filters are combined
395+
with AND.
396+
397+
| Parameter | In | Type | Required | Notes |
398+
| --- | --- | --- | --- | --- |
399+
| `filter[ids][]` | query | integer | no | Keep the simulation passes with one of these ids. Repeat the parameter for several values. |
400+
| `filter[names][]` | query | string | no | Keep the simulation passes with one of these exact names. Repeat the parameter for several values. |
401+
| `filter[lhcPeriodIds][]` | query | integer | no | Keep the simulation passes used by data passes of one of these LHC periods. Repeat the parameter for several values. |
402+
| `filter[dataPassIds][]` | query | integer | no | Keep the simulation passes anchored to one of these data passes. Repeat the parameter for several values. |
403+
| `sort[id]` | query | string | no | Sort by id. |
404+
| `sort[name]` | query | string | no | Sort by name (the default is `desc`). |
405+
| `sort[pwg]` | query | string | no | Sort by physics working group. |
406+
| `sort[jiraId]` | query | string | no | Sort by Jira ticket. |
407+
| `sort[requestedEventsCount]` | query | string | no | Sort by number of requested events. |
408+
| `sort[generatedEventsCount]` | query | string | no | Sort by number of generated events. |
409+
| `sort[outputSize]` | query | string | no | Sort by output size. |
410+
| `page[limit]` | query | integer | no | Maximum number of items to return. LLMs and agents must use 100 or less. |
411+
| `page[offset]` | query | integer | no | Number of items to skip. |
412+
413+
Responses:
414+
415+
- `200`: A page of simulation passes.
416+
- `400`: The request failed validation. HTTP status is 400 although each error's `status` field is `"422"`. `source.pointer` has the form `/data/attributes/<query|params|body>/<field>`.
417+
418+
```bash
419+
curl -g "$BOOKKEEPING_URL/api/simulationPasses?page[limit]=100&token=$TOKEN"
420+
```
421+
422+
### `GET /simulationPasses/{id}` - Get a simulation pass by id
423+
424+
Operation id: `getSimulationPass`
425+
426+
| Parameter | In | Type | Required | Notes |
427+
| --- | --- | --- | --- | --- |
428+
| `id` | path | integer | yes | Simulation pass identifier. |
429+
430+
Responses:
431+
432+
- `200`: The simulation pass.
433+
- `400`: The request failed validation. HTTP status is 400 although each error's `status` field is `"422"`. `source.pointer` has the form `/data/attributes/<query|params|body>/<field>`.
434+
- `404`: No simulation pass has this id.
435+
436+
```bash
437+
curl -g "$BOOKKEEPING_URL/api/simulationPasses/1?token=$TOKEN"
438+
```

‎lib/server/api-docs/index.html‎

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,157 @@ <h2>Shifts</h2>
608608
<pre><code class="language-bash">curl -g &quot;$BOOKKEEPING_URL/api/shift-data?shiftType=ECS&amp;token=$TOKEN&quot;
609609
</code></pre>
610610
</details>
611+
<h2>Simulation passes</h2>
612+
<p>Monte Carlo simulation productions.</p>
613+
<details>
614+
<summary><h3><span class="method get">GET</span> <code>/simulationPasses</code> - List simulation passes</h3></summary>
615+
616+
<p>Operation id: <code>listSimulationPasses</code></p>
617+
<p>Returns a page of simulation passes with their statistics (number of runs, data passes and logs).
618+
Default order is by name, descending.</p>
619+
<p>List filters are repeated query parameters: <code>filter[ids][]=1&amp;filter[ids][]=2</code>. A single value without <code>[]</code> is rejected. Filters are combined
620+
with AND.</p>
621+
<table>
622+
<thead>
623+
<tr>
624+
<th>Parameter</th>
625+
<th>In</th>
626+
<th>Type</th>
627+
<th>Required</th>
628+
<th>Notes</th>
629+
</tr>
630+
</thead>
631+
<tbody><tr>
632+
<td><code>filter[ids][]</code></td>
633+
<td>query</td>
634+
<td>integer</td>
635+
<td>no</td>
636+
<td>Keep the simulation passes with one of these ids. Repeat the parameter for several values.</td>
637+
</tr>
638+
<tr>
639+
<td><code>filter[names][]</code></td>
640+
<td>query</td>
641+
<td>string</td>
642+
<td>no</td>
643+
<td>Keep the simulation passes with one of these exact names. Repeat the parameter for several values.</td>
644+
</tr>
645+
<tr>
646+
<td><code>filter[lhcPeriodIds][]</code></td>
647+
<td>query</td>
648+
<td>integer</td>
649+
<td>no</td>
650+
<td>Keep the simulation passes used by data passes of one of these LHC periods. Repeat the parameter for several values.</td>
651+
</tr>
652+
<tr>
653+
<td><code>filter[dataPassIds][]</code></td>
654+
<td>query</td>
655+
<td>integer</td>
656+
<td>no</td>
657+
<td>Keep the simulation passes anchored to one of these data passes. Repeat the parameter for several values.</td>
658+
</tr>
659+
<tr>
660+
<td><code>sort[id]</code></td>
661+
<td>query</td>
662+
<td>string</td>
663+
<td>no</td>
664+
<td>Sort by id.</td>
665+
</tr>
666+
<tr>
667+
<td><code>sort[name]</code></td>
668+
<td>query</td>
669+
<td>string</td>
670+
<td>no</td>
671+
<td>Sort by name (the default is <code>desc</code>).</td>
672+
</tr>
673+
<tr>
674+
<td><code>sort[pwg]</code></td>
675+
<td>query</td>
676+
<td>string</td>
677+
<td>no</td>
678+
<td>Sort by physics working group.</td>
679+
</tr>
680+
<tr>
681+
<td><code>sort[jiraId]</code></td>
682+
<td>query</td>
683+
<td>string</td>
684+
<td>no</td>
685+
<td>Sort by Jira ticket.</td>
686+
</tr>
687+
<tr>
688+
<td><code>sort[requestedEventsCount]</code></td>
689+
<td>query</td>
690+
<td>string</td>
691+
<td>no</td>
692+
<td>Sort by number of requested events.</td>
693+
</tr>
694+
<tr>
695+
<td><code>sort[generatedEventsCount]</code></td>
696+
<td>query</td>
697+
<td>string</td>
698+
<td>no</td>
699+
<td>Sort by number of generated events.</td>
700+
</tr>
701+
<tr>
702+
<td><code>sort[outputSize]</code></td>
703+
<td>query</td>
704+
<td>string</td>
705+
<td>no</td>
706+
<td>Sort by output size.</td>
707+
</tr>
708+
<tr>
709+
<td><code>page[limit]</code></td>
710+
<td>query</td>
711+
<td>integer</td>
712+
<td>no</td>
713+
<td>Maximum number of items to return. LLMs and agents must use 100 or less.</td>
714+
</tr>
715+
<tr>
716+
<td><code>page[offset]</code></td>
717+
<td>query</td>
718+
<td>integer</td>
719+
<td>no</td>
720+
<td>Number of items to skip.</td>
721+
</tr>
722+
</tbody></table>
723+
<p>Responses:</p>
724+
<ul>
725+
<li><code>200</code>: A page of simulation passes.</li>
726+
<li><code>400</code>: The request failed validation. HTTP status is 400 although each error&#39;s <code>status</code> field is <code>&quot;422&quot;</code>. <code>source.pointer</code> has the form <code>/data/attributes/&lt;query|params|body&gt;/&lt;field&gt;</code>.</li>
727+
</ul>
728+
<pre><code class="language-bash">curl -g &quot;$BOOKKEEPING_URL/api/simulationPasses?page[limit]=100&amp;token=$TOKEN&quot;
729+
</code></pre>
730+
</details>
731+
<details>
732+
<summary><h3><span class="method get">GET</span> <code>/simulationPasses/{id}</code> - Get a simulation pass by id</h3></summary>
733+
734+
<p>Operation id: <code>getSimulationPass</code></p>
735+
<table>
736+
<thead>
737+
<tr>
738+
<th>Parameter</th>
739+
<th>In</th>
740+
<th>Type</th>
741+
<th>Required</th>
742+
<th>Notes</th>
743+
</tr>
744+
</thead>
745+
<tbody><tr>
746+
<td><code>id</code></td>
747+
<td>path</td>
748+
<td>integer</td>
749+
<td>yes</td>
750+
<td>Simulation pass identifier.</td>
751+
</tr>
752+
</tbody></table>
753+
<p>Responses:</p>
754+
<ul>
755+
<li><code>200</code>: The simulation pass.</li>
756+
<li><code>400</code>: The request failed validation. HTTP status is 400 although each error&#39;s <code>status</code> field is <code>&quot;422&quot;</code>. <code>source.pointer</code> has the form <code>/data/attributes/&lt;query|params|body&gt;/&lt;field&gt;</code>.</li>
757+
<li><code>404</code>: No simulation pass has this id.</li>
758+
</ul>
759+
<pre><code class="language-bash">curl -g &quot;$BOOKKEEPING_URL/api/simulationPasses/1?token=$TOKEN&quot;
760+
</code></pre>
761+
</details>
611762

612763
</main>
613764
<footer>Generated from openapi.yaml by <code>npm run docs:api</code> · ALICE Bookkeeping · internal use only</footer>

0 commit comments

Comments
 (0)