---
title: Data Ingestion
slug: shkp-ajo/data-ingestion
docTags: 
createdAt: 2024-03-28T02:37:02.273Z
---

In this exercise you'll learn how to stream profile data to Adobe Journey Optimizer via the HTTP API Source Connector. &#x20;

## Authentication &#x20;

For data ingestion authentication is optional and can be configured in the source connector. &#x20;

You can read about the authentication method here: [https://experienceleague.adobe.com/en/docs/experience-platform/landing/platform-apis/api-authentication](https://experienceleague.adobe.com/en/docs/experience-platform/landing/platform-apis/api-authentication)

For now, let's generate an Access Token for your lab exercises today. &#x20;

Open the postman collection installed before the lab, and click to the Adobe Authentication request.   A temporary client Id and secret has been created for you and are already configured in the form-data.  &#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/0D6AvoGTu8XTwYaYZeYWB_image.png)

An access token will be returned which has a 24 hour lifespan.  Postman will automatically add this to the collection variables for use in the subsequent exercises. &#x20;

## HTTP API Source Connector&#x20;

Before you can stream profile data directly to Adobe Experience Platform you need to configure an API Inlet to receive the data.  &#x20;

An inlet has already been created for you to use within this exercise, we need to retrieve the inlet URL to use for our API calls. &#x20;

Navigate to **Connections&#x20;**-> **Sources -> Accounts.  &#x20;**&#x43;lick to open the **HTTP Streaming API&#x20;**&#x63;onnection. &#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/FFMmgFU074GEyUNDzu_f9_image.png)

Copy the streaming endpoint URL from the connection properties.&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/cQaoGkrxKpuk_FNdCM7LO_image.png)

## Create / Update a Profile&#x20;

We've created a sample API request for you to run to ingest your profile data. &#x20;

Open the postman collection installed before the lab, and click to the HTTP Source Connector request.    There are a few important elements we need to update before pressing send. &#x20;

Paste the Inlet URL from the source into the URL field

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/cbtks3ZPQo_-d44R2AW5b_image.png)

Note the body of the message is broken into two parts the **header &#x20;**&#x61;nd the **body.**

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/r1_XDKOVkGr38eSNLBn6-_image.png)

Firstly we need to define which dataset and which schema we're ingesting data into. &#x20;

Copy the dataset Id from the Profile Dataset you created in the previous exercise.&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/Km6dwZWXRJFpZeMvYhhIg_image.png)

Update this in the body of your message.&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/ImOmycxFsPLOdwRCCzASL_image.png)

Next we need to update the schema reference, copy your profile **schema URL** from the list of schemas. &#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/tF8wdfJbjUsy_n5GeN5fI_image.png)

Paste it into the 2x **schemaRef** fields within the message body.&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/RTzlQmFMK3GhbmwJ7K8Wf_image.png)

The data to be added to the dataset is in the **xdmEntity** field.   Update the content of the request to add a new profile to the sandbox.   Pay attention to setting a value you remember for the 2 identity fields:  loyaltyId and mobile.&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/nqZw2IYOmbZC4zW5KKVDt_image.png)

Verification of the payload against the schema is done asychronously unless requested otherwise.   Enable the **synchronousValidation** parameter.

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/uRm0p_drI_yuP720J30qz_image.png)

Click **Send. &#x20;**&#x20;You should see a pass status for the validation of the payload. &#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/MubyDUA4Wu_buYFQRyjNP_image.png)

## Lookup Profile&#x20;

Now that the record has been successfully ingested we should be able to lookup the profile immediately.  &#x20;

1. Navigate to **Customers -> Profiles ->**
2. Select the **Browse** tab
3. Select **LoyaltyId** ID Namespace
4. Input the Identity Value used for loyalty Id in your API call.&#x20;
5. Click to **View**

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/tCl3s-Msn1mbWTUVcK6Su_image.png)

Click on the profile card to view the details of your profile.&#x20;

![](https://api.archbee.com/api/optimize/1Jp0iolWv35Z_mkI7oUiT/mLlx7tAkV8hIddZqYVrDV_image.png)

