> For the complete documentation index, see [llms.txt](https://engineering-ing-inf-rd.gitbook.io/true-connector/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://engineering-ing-inf-rd.gitbook.io/true-connector/exchange-data.md).

# 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\
*--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)
