Skip to Main Content
Status Initial review
Categories API
Created by Guest
Created on Jul 5, 2024

Enhance fetchdata entity query to include the "isActive" property of inbound/outbound links

Please, fill in the below fields to enable the processing of your idea.

Who would benefit?

Anybody using REST API and supporting users who activate/deactivate links

What impact would it make?

Add to the already extensive list of information that can be retrieved by the fetchdata query

How should it work?

I envision adding a "LinkSummary" for the "objects" list that is applicable to only the inbound and outbound links wherein the result of the links endpoint could be included:

/api/v1.0.1/entities/{entityId}/links

So for example, if we take the following fetchdata request:

{
"entityIds": [8265],
"objects": "EntitySummary",
"outbound": {
"linkTypeIds": "ProductFeature",
"objects": "EntitySummary"
}
}

this currently returns the following (snippet):

},
"outbound": [
{
"entityId": 8269,
"linkTypeId": "ProductFeature",
"linkIndex": 0,
"summary":
{
"id": 8269,

We could use the above "LinkSummary" as follows:

{
"entityIds": [8265],
"objects": "EntitySummary",
"outbound": {
"linkTypeIds": "ProductFeature",
"objects": "EntitySummary,LinkSummary"
}
}

and have the result include what one would normally get from the links endpoint (snippet):

},
"outbound": [
{
"entityId": 8269,
"linkTypeId": "ProductFeature",
"linkIndex": 0,
"link":
{
"id": 429348,
"isActive": false,
"linkTypeId": "ProductFeature",
"sourceEntityId": 8265,
"targetEntityId": 8269,
"linkEntityId": null,
"index": 0
},
"summary":
{
"id": 8269,

Alternatively, the "isActive" property could be added to the inbound/outbound LinkModel.

Why is it needed?

Currently the only way to retrieve the isActive property of a link is to use the endpoint:

/api/v1.0.1/entities/{entityId}/links

The unfortunate side effect is the necessity to run multiple queries. The fetchdata endpoint already supports multiple ids, but if 2 ids are in the fetchdata query, I need to run the above "links" endpoint 2 times to get the isActive property of the links.


Additional feedback, background or context:

https://community.inriver.com/hc/en-us/community/posts/14760980322716-REST-API-api-v1-0-1-entities-fetchdata-linkEntityObjects

And I also see others asking for similar functionality: https://community.inriver.com/hc/en-us/community/posts/360006042260-REST-API-Add-support-for-link-status-active-inactive-in-fetchdata-method

  • Attach files