Skip to content

Commit fc8be8a

Browse files
authored
Merge pull request #121 from oej/update-flow
Update the API flow
2 parents f28aa2a + 89a1a7c commit fc8be8a

File tree

1 file changed

+46
-6
lines changed

1 file changed

+46
-6
lines changed

api-flow/consumer.md

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ described in the [discovery document](/discovery/readme.md).
88

99
The standard TEI points to a product.
1010

11-
- __List of TEA Components__: Components are components of something sold. Each Component has it's own versioning and it's own set of artefacts. Note that a single artefact can belong to multiple versions of a Component and multiple Components.
12-
- __List of TEA collections__: For each Component, there is a list of TEA collections as indicated by release date and a version string. The TEA API has no requirements of type of version string (semantic or any other scheme) - it's just an identifier set by the manufacturer. It's sorted by release date as a default.
13-
- __List of TEA artefacts__: The collection is unique for a version and contains a list of artefacts. This can be SBOM files, VEX, SCITT, IN-TOTO or other documents.
11+
- __TEA Product__: This is the delivered goods, an open source software, library or a product sold. It consists of one or multiple TEA Components.
12+
- __TEA Components__: Components are components of something sold. Each Component has it's own versioning and it's own set of artefacts. Note that a single artefact can belong to multiple versions of a Component and multiple Components.
13+
- __TEA Component index__: A list of all the versions available for a TEA Component
14+
- __TEA Collection__: For each Component version, there is TEA collection as indicated by release date and a version string. The TEA API has no requirements of type of version string (semantic or any other scheme) - it's just an identifier set by the manufacturer. It's sorted by release date as a default.
15+
- __List of TEA artefacts__: The TEA Collection is unique for a version and contains a list of artefacts. This can be SBOM files, VEX, SCITT, IN-TOTO or other documents.
1416
- __List of artefact formats__: An artefact can be published in multiple formats.
1517

1618
The user has to know product TEI and version of each component (TEA Component) to find the list of artefacts for the used version.
1719

18-
## API flow
20+
## API flow based on TEI discovery
1921

2022
```mermaid
2123
@@ -37,10 +39,48 @@ sequenceDiagram
3739
user ->> discovery: Discovery using DNS
3840
discovery ->> user: List of API servers
3941
40-
user ->> tea_product: Finding all product parts
42+
user ->> tea_product: Finding all product parts (TEA Components) and facts about the product
4143
tea_product ->> user: List of product parts
4244
43-
user ->> tea_component: Finding all versions of a part
45+
user ->> tea_component: Finding all versions of a TEA Component
46+
tea_component ->> user: List of all available versions (paginated)
47+
48+
user ->> tea_collection: Finding all artefacts for version in scope
49+
tea_collection ->> user: List of artefacts and formats available for each artefact
50+
51+
user ->> tea_artifact: Download artefact
52+
53+
54+
55+
```
56+
57+
## API flow based on direct access to API
58+
59+
In this case, the client wants to search for a specific product using the API
60+
61+
```mermaid
62+
63+
---
64+
title: TEA client flow with search
65+
---
66+
67+
sequenceDiagram
68+
autonumber
69+
actor user
70+
71+
participant tea_product as TEA Product
72+
participant tea_component as TEA Component
73+
participant tea_collection as TEA Collection
74+
participant tea_artifact as TEA Artefact
75+
76+
77+
user ->> tea_product: Search for product based on identifier (CPE, PURL, name)
78+
tea_product ->> user: List of products
79+
80+
user ->> tea_product: Finding all product parts (TEA Components) and facts about choosen product
81+
tea_product ->> user: List of product parts
82+
83+
user ->> tea_component: Finding all versions of a TEA Component
4484
tea_component ->> user: List of all available versions (paginated)
4585
4686
user ->> tea_collection: Finding all artefacts for version in scope

0 commit comments

Comments
 (0)