Skip to content

Commit 0b13fcf

Browse files
committed
API-flow: Add a new scenario
Signed-off-by: Olle E. Johansson <[email protected]>
1 parent 9f83ad7 commit 0b13fcf

File tree

1 file changed

+60
-3
lines changed

1 file changed

+60
-3
lines changed

api-flow/consumer.md

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ by other means. It contains one or multiple components.
1111

1212
- __List of TEA Components__: Components are components of something that is part of a product.
1313
Each Component has it's own versioning and it's own set of artifacts.
14-
- __List of TEA releases__: Each component has a list of releases where each release has a timestamp and
14+
- __List of TEA Releases__: Each component has a list of releases where each release has a timestamp and
1515
a lifecycle enumeration. They are normally sorted by timestamps. The TEA API has no requirements of
1616
type of version string (semantic or any other scheme) - it's just an identifier set by the manufacturer.
17-
- __List of TEA collections__: For each release, there is a list of TEA collections as indicated
17+
- __List of TEA Collections__: For each release, there is a list of TEA collections as indicated
1818
by release date and a version integer starting with collection version 1.
19-
- __List of TEA artifacts__: The collection is unique for a version and contains a list of artifacts.
19+
- __List of TEA Artifacts__: The collection is unique for a version and contains a list of artifacts.
2020
This can be SBOM files, VEX, SCITT, IN-TOTO or other documents. Note that a single artifact
2121
can belong to multiple versionsof a Component and multiple Components.
2222
- __List of artifact formats__: An artifact can be published in multiple formats.
@@ -105,6 +105,63 @@ sequenceDiagram
105105
user ->> tea_artifact: Request to download artifact
106106
tea_artifact ->> user: Artifact
107107
108+
```
109+
110+
## API flow based on cached data - checking for a new release
111+
112+
In this case a TEA client knows the component UUID and wants to check the status of the
113+
used release and if there's a new release. The client may limit the query with a given date
114+
for a release.
115+
116+
```mermaid
117+
118+
---
119+
title: TEA client flow with direct query for release
120+
---
121+
122+
sequenceDiagram
123+
autonumber
124+
actor user
108125
126+
participant tea_product as TEA Product
127+
participant tea_component as TEA Component
128+
participant tea_release as TEA Release
129+
participant tea_collection as TEA Collection
130+
participant tea_artifact as TEA Artefact
131+
132+
user ->> tea_release: Finding a specific version/release
133+
tea_release ->> user: List of releases and collection id for each release
109134
110135
```
136+
137+
## API flow based on cached data - checking if a collection changed
138+
139+
In this case a TEA client knows the release UUID, the collection UUID, and the
140+
collection version from previous queries. If the given version is not the same,
141+
another query is done to get reason for update and new collection list of artifacts.
142+
143+
144+
```mermaid
145+
146+
---
147+
title: TEA client collection query
148+
---
149+
150+
sequenceDiagram
151+
autonumber
152+
actor user
153+
154+
participant tea_product as TEA Product
155+
participant tea_component as TEA Component
156+
participant tea_release as TEA Release
157+
participant tea_collection as TEA Collection
158+
participant tea_artifact as TEA Artefact
159+
160+
161+
user ->> tea_collection: Finding the current collection, including version
162+
tea_collection ->> user: List of artefacts and formats available for each artefact
163+
164+
user ->> tea_collection: Request to access previous version of the collection to compare
165+
tea_collection ->> user: Previous version of collection
166+
167+
```

0 commit comments

Comments
 (0)