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

chore(documentation): completed builder and explorer path, added correct insomnia collection #466

Merged
merged 3 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions dpp-tutorial/builder-path.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@ The next step will be to register your data in a Data Service.

This part provides the information needed to setup digital twin provisioning services as a data provider. Additionally, it enables you to create and register aspect models into the data service.

## 1º Prepare Digital Product Pass Model

In order to prepare aspect models, please follow the [aspect model guide](./aspect-model.md)

## Add Aspect Model to the Submodel Server

The data generated in previous step can be stored into the submode data service.
Expand All @@ -178,7 +174,7 @@ Substitute the `digitalTwinSubmodelId` for the generated UUID.
<summary>Click to see the Windows command</summary>

```bash
curl.exe -X POST "<Data_SERVICE_URL>/urn:uuid:<digitalTwinSubmodelId>" `
curl.exe -v -X POST "<Data_SERVICE_URL>/urn:uuid:<digitalTwinSubmodelId>" `
-H "Content-Type: application/json" `
--data-binary "@<PATH_TO_YOUR_JSON>.json"
```
Expand All @@ -204,7 +200,7 @@ Verify your data is registerd in the service
<summary>Click to see the Windows command</summary>

```bash
curl.exe -X POST "<Data_SERVICE_URL>/urn:uuid:<digitalTwinSubmodelId>" `
curl.exe -v -X GET "<Data_SERVICE_URL>/urn:uuid:<digitalTwinSubmodelId>" `
-H "Content-Type: application/json"
```

Expand Down Expand Up @@ -255,7 +251,7 @@ After creation of the digital twin in previous step, add the twin into Digital T
<summary>Click to see the Windows command</summary>

```bash
curl.exe -X POST "<DIGITAL_TWIN_REGISTRY_URL>/shell-descriptors" `
curl.exe -v -X POST "<DIGITAL_TWIN_REGISTRY_URL>/shell-descriptors" `
-H "Content-Type: application/json" `
--data-binary "@resources/<YOUR_DT_JSON>.json"
```
Expand Down Expand Up @@ -299,7 +295,7 @@ Base64 Encoded: dXJuOnV1aWQ6M2Y4OWQwZDQtZTExYy1mODNiLTE2ZmQtNzMzYzYzZDRlMTIx
<summary>Click to see the Windows command</summary>

```bash
curl.exe -X GET "<DIGITAL_TWIN_REGISTRY_URL>/shell-descriptors/<DIGITAL_TWIN_ID_BASE64_ENCODED>" `
curl.exe -v -X GET "<DIGITAL_TWIN_REGISTRY_URL>/shell-descriptors/<DIGITAL_TWIN_ID_BASE64_ENCODED>" `
-H "Content-Type: application/json"
```
</details>
Expand Down
13 changes: 6 additions & 7 deletions dpp-tutorial/data-consumption.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ Introduce the DPP Application host url in the browser:

```bash

https://<dpp-hostname-url>
https://<DPP_APP _URL>

```

You will be redirected to:

```bash

https://<dpp-hostname-url>/passport
https://<DPP_APP _URL>/passport

```

Expand All @@ -64,16 +64,15 @@ And a login page from Catena-X will pop up. To perform the login follow this ste
### 1º Introduce Company Name

```
CX-Test-Access
CX-Operator
```

![image](https://github.com/eclipse-tractusx/digital-product-pass/assets/71728767/60e5d9df-7149-43af-a8a2-0b8d0b8809e3)
![image](./resources/screenshots/dc_introduce_company_name.png)

### 2º Introduce Test Credentials

The credentials will be provided in the workshop

![image](https://github.com/eclipse-tractusx/digital-product-pass/assets/71728767/435493f4-2ad5-4708-a9ad-7e119b4508e8)
![image](./resources/screenshots/dc_test_credentials.png)


### 3º A Search by ID
Expand All @@ -84,7 +83,7 @@ Change the `<manufacturerPartId>` and `<partInstanceId>` to the actual values in
CX:<manufacturerPartId>:<partInstanceId>
```

![Introduce Id](./resources/screenshots/id-search.png)
![Introduce Id](./resources/screenshots/dc_search_by_id.png)

And click in "SEARCH" to start the search process!

Expand Down
42 changes: 17 additions & 25 deletions dpp-tutorial/explorer-path.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ In this step, you'll create the Digital Product Passport (DPP) by utilizing data

### Aspect Model Creation

Now, you replace the data from your sheet into the Aspect Model template. This step is crucial because it ensures that your specific car part is properly registered and exists as an Aspect Model in the system.

In a real production environment, this process would typically be automated by your systems. However, for this tutorial, you are manually mapping the data to understand how the correct information about your part will later be linked to the Digital Product Passport (DPP).

By completing this step, you ensure that the part data is accurate and ready to be associated with the DPP, which is vital for traceability and the integrity of the overall process..

You will get your information in a paper:

Example:
Expand Down Expand Up @@ -88,13 +94,6 @@ Example:
> You can search for your car part (identified by `ID (uuid)` on the sheet) using
> - with `CTRL + F` on Windows or `CMD + F` on MacOS/Linux

Now, you replace the data from your sheet into the Aspect Model template. This step is crucial because it ensures that your specific car part is properly registered and exists as an Aspect Model in the system.

In a real production environment, this process would typically be automated by your systems. However, for this tutorial, you are manually mapping the data to understand how the correct information about your part will later be linked to the Digital Product Passport (DPP).

By completing this step, you ensure that the part data is accurate and ready to be associated with the DPP, which is vital for traceability and the integrity of the overall process..


In Insomnia, locate the request labeled `Step 2.1.1 Create Aspect Model` and switch to the **Body** tab.

Replace the placeholders in the provided template with the data from your part. For example, to add the Product Carbon Footprint (PCF) value, use the following path:
Expand Down Expand Up @@ -165,10 +164,6 @@ The Digital Twin Registry is required to manage and store Digital Twins (DT) in

The Data Service is a crucial component for storing the payloads of Digital Product Passports in plain JSON format. This service should already be running and ready to accept data submissions. It acts as the backend repository where all passport-related information is securely stored and easily retrievable.


> [!CAUTION]
> The UUID should be written in the format: 6fb9a71b-aee6-4063-a82e-957022aeaa7a

---

### Step 2.1: Register the Aspect Model
Expand All @@ -185,38 +180,35 @@ Example:
<DATA_SERVICE_URL>/urn:uuid:f10c0181-ce80-4139-81f0-a59226c88bfe
```

4. Replace `<DIGITAL_TWIN_REGISTRY_URL>` with he data service url provided
4. Replace `<DATA_SERVICE_URL>` with the data service url provided

5. Send the **POST** request

- If successful, a 200 OK response will appear next to the `Send`-button, confirming the Aspect Model has been registered into the submodel data service with the correct reference to the DPP.

6. To verify the registration:
- Use the Insomnia request labeled `Step 2.1.2 Verify the Creation`.
- Replace <digitalTwinSubmodelId> with your actual UUID from the datasheet.
- Replace <digitalTwinSubmodelId> with the generated UUID.
- Send the request. A 200 OK response confirms that the data has been registered successfully.
- Optionally: Cross-check that the modified data in the response body matches the data you manipulated earlier.

---

### Step 2.2

Now we actually will create the digitil Twin.
Now we actually will create the digital Twin.

1. Open the Insomnia request labeled `Step 2.2.1 Create Digital Twin"`.

> [!NOTE]
> This request uses the template provided in <a href="./resources/digital-twins/example-dt.json" target="_blank" rel="noopener noreferrer">resources/digital-twins/example-dt.json</a>.

2. Replace `<DATA_SERVICE_URL>` with he data service url provided
2. Replace `<DIGITAL_TWIN_REGISTRY_URL>` with the data service url provided

3. Switch to the Body tab and replace the following placeholders:

```bash
<PART_INSTANCE_ID> -> the value of part instance written on datasheet
<PART_NAME> -> the part number is written on the datasheet from a part
<digitalTwinId> -> the UUID written on datasheet
<digitalTwinSubmodelId> -> the UUID generated the step ago
<digitalTwinSubmodelId> -> the UUID generated in the previous step
```


Expand All @@ -231,7 +223,7 @@ Now we actually will create the digitil Twin.
> - The other is used as `"globalAssetId"`

4. Send the POST request to add the Digital Twin to the Digital Twin Registry (DTR).
- A successful request will return a `201 Created` response, which confirms that the Digitil Twin has been created successfully.
- A successful request will return a `201 Created` response, which confirms that the Digital Twin has been created successfully.

> [!NOTE]
> Every physical part of vehicle is represented by a Digital Twin object. A car is manufactured with plenty of digital twins.
Expand All @@ -241,17 +233,17 @@ Now we actually will create the digitil Twin.
### Step 2.2.2: Verify the Digital Twin Registration

1. Use the Insomnia request labeled `"Step 2.2.2 Verify the Creation"`.
2. Replace `<DIGITAL_TWIN_ID_BASE64_ENCODED>` `with` the Base64-encoded version of the Digital Twin ID.
- You can encode your Digital Twin ID using this <a href="https://www.base64encode.org/Base64" target="_blank" rel="noopener noreferrer"> Encoder</a>
2. Replace `<DIGITAL_TWIN_ID_BASE64_ENCODED>` `with` the Base64-encoded version of the `digitalTwinId`.
- You can encode your `digitalTwinId` using this <a href="https://www.base64encode.org/Base64" target="_blank" rel="noopener noreferrer"> Encoder</a>

Example:

```bash
Digital Twin Id (UUID): 3f89d0d4-e11c-f83b-16fd-733c63d4e121
digitalTwinId (UUID): 3f89d0d4-e11c-f83b-16fd-733c63d4e121
Base64 Encoded: dXJuOnV1aWQ6M2Y4OWQwZDQtZTExYy1mODNiLTE2ZmQtNzMzYzYzZDRlMTIx
```

3. Replace <UUID-1_BASE64_ENCODED> in the following URL:
3. Replace `<DIGITAL_TWIN_REGISTRY_URL>` and `<UUID-1_BASE64_ENCODED>` in the following URL:

```bash
<DIGITAL_TWIN_REGISTRY_URL>/shell-descriptors/<DIGITAL_TWIN_ID_BASE64_ENCODED>
Expand All @@ -261,7 +253,7 @@ Base64 Encoded: dXJuOnV1aWQ6M2Y4OWQwZDQtZTExYy1mODNiLTE2ZmQtNzMzYzYzZDRlMTIx

---

### Step 2.3
### Step 2.3 Optional:

If you encounter an error or need to update the Digital Twin, you can use the Insomnia request labeled `Step 2.3 Modify Digital Twin` to make changes.

Expand Down
111 changes: 109 additions & 2 deletions dpp-tutorial/irs-drill-down.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,24 +146,62 @@ The BOMAsBuilt relationships, you stored temporarily in your notepad editor from
Open a new terminal and run the following command to add your data into the data service:
> POST /<<BOMAsBuiltID>BOMAsBuiltID>

*Windows*
<details>
<summary>Click to see the Windows command</summary>

```bash
curl.exe -v -X POST "<DATA_SERVICE_URL>/<BOMAsBuiltID>" `
-H "Content-Type: application/json" `
--data-binary "@<YOUR_JSON_FILE>.json"
```

</details>

*Mac & Linux*
<details>
<summary>Click here to see the Mac & Linux command</summary>

```bash
curl --location '<DATA_SERVICE_URL>/<BOMAsBuiltID>' \
--header 'Content-Type: application/json' \
--data "@<YOUR_JSON_FILE>.json"
```

</details>


> [!TIP]
> The placeholder <YOUR_JSON_FILE> is the json file which was stored in [step 2](#2-lookup-bomasbuilt-relationships-of-the-component)


Verify your data is registerd in the service

> GET /<<BOMAsBuiltID>BOMAsBuiltID>

*Windows*
<details>
<summary>Click to see the Windows command</summary>

```bash
curl.exe -v -X GET "<Data_SERVICE_URL>/urn:uuid:<digitalTwinSubmodelId>" `
-H "Content-Type: application/json"
```

</details>

*Mac & Linux*
<details>
<summary>Click here to see the Mac & Linux command</summary>

```bash
curl --location '<DATA_SERVICE_URL>/<BOMAsBuiltID>' \
--header 'Content-Type: application/json' \
```

</details>


## 4° Lookup SerialPart Item of the Component


Expand Down Expand Up @@ -220,23 +258,58 @@ The serial part data, you stored temporarily in your notepad editor from [step 4
Open a new terminal and run the following command to add your data into the data service:
> POST /<SerialPartID<SerialPartID>>

*Windows*
<details>
<summary>Click to see the Windows command</summary>

```bash
curl.exe -v -X POST "<Data_SERVICE_URL>/<SerialPartID>" `
-H "Content-Type: application/json" `
--data-binary "@<YOUR_JSON_FILE>.json"
```
</details>

*Mac & Linux*
<details>
<summary>Click here to see the Mac & Linux command</summary>

```bash
curl --location '<DATA_SERVICE_URL>/<SerialPartID>' \
--header 'Content-Type: application/json' \
--data "@<YOUR_JSON_FILE>.json"
```

</details>


> [!TIP]
> The placeholder <YOUR_JSON_FILE> is the json file which was stored in [step 4](#4-lookup-serialpart-item-of-the-component)


Verify your data is registerd in the service

> GET /<SerialPartID<SerialPartID>>

*Windows*
<details>
<summary>Click to see the Windows command</summary>

```bash
curl.exe -v -X POST "<Data_SERVICE_URL>/<SerialPartID>" `
-H "Content-Type: application/json" `
```
</details>

*Mac & Linux*
<details>
<summary>Click here to see the Mac & Linux command</summary>

```bash
curl --location '<DATA_SERVICE_URL>/<SerialPartID>' \
--header 'Content-Type: application/json' \
```
</details>


## 6° Add BOMAsBuilt and SerialPart to Existing Digital Twin

Expand All @@ -255,11 +328,29 @@ Base64 Encoded: dXJuOnV1aWQ6M2Y4OWQwZDQtZTExYy1mODNiLTE2ZmQtNzMzYzYzZDRlMTIx

> GET /shell-descriptors/<DIGITAL_TWIN_ID_BASE64_ENCODED>


*Windows*
<details>
<summary>Click to see the Windows command</summary>

```bash
curl.exe -X GET "<DIGITAL_TWIN_REGISTRY_URL>/shell-descriptors/<DIGITAL_TWIN_ID_BASE64_ENCODED>" `
-H "Content-Type: application/json" `
-H "Edc-Bpn: BPNL00000003CSGV"
```

</details>

*Mac & Linux*
<details>
<summary>Click here to see the Mac & Linux command</summary>

```bash
curl --location --request GET '<DIGITAL_TWIN_REGISTRY_URL>/shell-descriptors/<DIGITAL_TWIN_ID_BASE64_ENCODED>' \
--header 'Content-Type: application/json' \
--header 'Edc-Bpn: BPNL00000003CSGV'
```
</details>

Example JSON response:
```json
Expand Down Expand Up @@ -423,10 +514,26 @@ curl.exe -v -X PUT "<DIGITAL_TWIN_REGISTRY_URL>/shell-descriptors/<DIGITAL_TWIN_
<details>
<summary>Click here to see the Mac & Linux command</summary>

*Windows*
<details>
<summary>Click to see the Windows command</summary>

```bash
curl --location '<DIGITAL_TWIN_REGISTRY_URL>/shell-descriptors/<DIGITAL_TWIN_ID_BASE64_ENCODED>' \
curl.exe -v -X PUT "<DIGITAL_TWIN_REGISTRY_URL>/shell-descriptors/<DIGITAL_TWIN_ID_BASE64_ENCODED>" `
-H "Content-Type: application/json" `
--data-binary '@resources/<YOUR_DT_JSON>.json'
```

</details>

*Mac & Linux*
<details>
<summary>Click here to see the Mac & Linux command</summary>

```bash
curl --location --request PUT '<DIGITAL_TWIN_REGISTRY_URL>/shell-descriptors/<DIGITAL_TWIN_ID_BASE64_ENCODED>' \
--header 'Content-Type: application/json' \
--data "@<YOUR_JSON_FILE>.json"
--data '@resources/<YOUR_DT_JSON>.json'
```
</details>

Expand Down

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading