# How to Exchange Data

With default configuration, you can use following curl command, to get data from Provider connector

<details>

<summary>Multipart Form request</summary>

```
curl --location -k 'https://localhost:8184/proxy' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic aWRzVXNlcjpwYXNzd29yZA==' \
--data '{
    "multipart": "form",
    "Forward-To": "https://ecc-provider:8889/data",
    "messageType": "ArtifactRequestMessage",
    "requestedArtifact": "http://w3id.org/engrd/connector/artifact/1",
    "transferContract": "https://w3id.org/idsa/autogen/contractAgreement/d0459442-4eb3-4372-8640-0ca49abf8f1d",
    "payload" : {
		"catalog.offers.0.resourceEndpoints.path":"/pet2"
		}
}'
```

</details>

*NOTE*: even that this curl command is exported from Postman, it is noticed several times, that when you try to import it back in Postman, there are some problems during this process, which results in omitting request body, and then request fill fail - cannot find body to create request.\
If this happens, please check body of the request in Postman, and if body is empty, simply copy everything enclosed between\
\&#xNAN;*--data-raw '* and *'*

For more details on request samples, please check following link [Backend DataApp Usage](https://github.com/Engineering-Research-and-Development/true-connector-basic_data_app/blob/0.3.8/README.md)

Be sure to use correct configuration/ports for sender and receiver Data App and Execution Core Container (check .env file).

Default values:

```
DataApp URL: https://localhost:8184/proxy
"Forward-To": "https://ecc-provider:8889/data",
```

For WSS flow:

```
DataApp URL: https://localhost:8184/proxy
"multipart": "wss",
"Forward-To": "wss://ecc-provider:8086/data",
"Forward-To-Internal": "wss://ecc-consumer:8887",
```

For IDSCPv2:

Follow the REST endpoint or WS examples, put the server hostname/ip address in the Forward-To header (*wss/https\://{RECEIVER\_IP\_ADDRESS/Hostname}:{WS\_PUBLIC\_PORT}*).

* **AISECv2** put the certificates (keyStore and trustStore) in the *cert* folder,edit related settings (*IDSCP2 AISEC DAPS settings* section in env file)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://engineering-ing-inf-rd.gitbook.io/true-connector/exchange-data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
