Getting item details with the Get Entity API
To retrieve the details of an existing item, use the Get Entity API. The syntax is:
GET https://mc.adobe.io/{{TENANT_ID}}/target/recs/entities/[entity.id]
Entity details can only be retrieved for a single entity at a time. You can use Get Entity to confirm updates were made in the catalog as expected, or to otherwise audit the contents of the catalog.
-
In the API request, specify the entity ID, using the variable
entityId
. The following example will return details for the entity whose entityId=kit2004. -
Verify
TENANT_ID
andAPI_KEY
reference the Postman environment variables established earlier. Use the image below for comparison. If necessary, modify the Headers and path in your API request to match those in the image below. -
Send the request.
If you receive an error stating the entity was not found, as shown in the example above, verify you are submitting the request to the correct Target environment.NOTE
If no environment is explicitly specified, Get Entity attempts to get the entity from your default environment only. If you wish to pull from any environment other than your default environment, you must specify the environment ID. -
If necessary, add the
environmentId
parameter, and re-send the request. -
Send another Get Entity request, this time to inspect the entity whose entityId=kit2005.
Suppose you decide these entities need to be removed from your catalog. Let’s use the Delete Entities API.
Deleting items with the Delete Entities API
To remove items from your catalog, use the Delete Entities API. The syntax is:
DELETE https://mc.adobe.io/{{TENANT_ID}}/target/recs/entities?ids=[comma-delimited-entity-ids]&environment=[environmentId]
-
Navigate to Target > Setup > Hosts > Environments to obtain the Target Environment ID from which you want to delete items.
-
In the API request, specify the entity IDs of the entities you want to delete, using the syntax
&ids=[comma-delimited-entity-ids]
(a query parameter). When deleting more than one entity, separate the IDs using commas. -
Specify the environment ID, using the syntax
&environment=[environmentId]
, otherwise entities across all environments will be deleted. -
Verify
TENANT_ID
andAPI_KEY
reference the Postman environment variables established earlier. Use the image below for comparison. If necessary, modify the Headers and path in your API request to match those in the image below. -
Send the request.
-
Verify your results using Get Entity, which should now indicate the deleted entities cannot be found.
Congratulations! You can now use the Recommendations APIs to create, update, delete, and obtain details on the entities in your catalog. In the next section, you will learn how to manage custom criteria.
Personalization & Experiementation Excellence with Recommendations and AI
Adobe Customer Success Webinars
Tuesday, Mar 4, 4:00 PM UTC
Adobe Target innovations, including GenAI, and best practices on AI-powered personalization and experimentation at scale.
RegisterAdobe Target at Summit
Register for these developer sessions:
- Put the Customer at the Center and Build Relationships That Last a Lifetime (attend online)
- AI-Powered Personalization: Prudential's Secret to a 135% Engagement Boost
- Personalization at Scale, with Accuracy: Flexible Identity Graph Management (hands-on lab)
- The Secret to Next-Level Mobile App Engagement and Growth
- B2B Transformation Series: "No Limits" Digital Marketing at GE HealthCare
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more