Method | GET |
Rel | findsi:target-similars |
Description | Returns a list of similar Targets, in the context of the given Target and Actor. |
Required | Description | |
filter | No | A filter to apply on on the result set. Targets can be filtered by their Classification (exact match). |
A successful response (HTTP 200) will be a HAL document, containing the following:
Besides the default _self
and curies
links, the following links will be included:
actor | Returns the Actor that is the context for this request. |
target | Returns the Target that is the context for this request. |
targets | Returns a paged list of Targets the requesting API consumer has logged activities for. |
target-recommendations | Returns a list Targets, similar to the given Target, that the given Actor has never interacted with. |
Type | Description | |
target | Array | Ranked Targets that the given Actor has never interacted with, but are similar to the given Target. |
None
The API may respond with one of the following errors:
401 | Unauthorized | The Authorization header might be missing or malformed. Alternatively you may have provided an invalid API key. |
A basic, unfiltered request would look something like:
GET /targets/.../similars/... HTTP/1.1
Host: api.findsi.com
Accept: application/hal+json
Authorization: findsi_api_key apikey="..."
Content-Type: application/json
Cache-Control: no-cache
If all went well, your response will look something like this:
Cache-Control no-cache
Content-Length 9465
Content-Type application/hal+json; charset=utf-8
Date Thu, 11 Sep 2014 16:36:25 GMT
Expires -1
Pragma no-cache
{
"_links": {
"curies": {
"href": "http://www.findsi.com/docs/link-relations/{rel}",
"templated": true,
"name": "findsi"
},
"findsi:actor": {
"href": "/actors/..."
},
"findsi:target": {
"href": "/targets/..."
},
"findsi:targets": {
"href": "/targets"
},
"findsi:target-recommendations": {
"href": "/targets/.../recommendations/..."
},
"self": {
"href": "/targets/.../similars/..."
}
},
"_embedded": {
"findsi:target": [
{
"Rank": 1,
"Id": "3722387",
"Classification": "article",
"_links": {
"findsi:targets": {
"href": "/targets"
},
"findsi:target-similars": {
"href": "/targets/.../similars/..."
},
"findsi:target-recommendations": {
"href": "/targets/.../recommendations/..."
},
"self": {
"href": "/targets/..."
}
}
},
{
"Rank": 2,
"Id": "3722387",
"Classification": "article",
"_links": {
"findsi:targets": {
"href": "/targets"
},
"findsi:target-similars": {
"href": "/targets/.../similars/..."
},
"findsi:target-recommendations": {
"href": "/targets/.../recommendations/..."
},
"self": {
"href": "/targets/..."
}
}
},
{
"Rank": 3,
"Id": "3717492",
"Classification": "article",
"_links": {
"findsi:targets": {
"href": "/targets"
},
"findsi:target-similars": {
"href": "/targets/.../similars/..."
},
"findsi:target-recommendations": {
"href": "/targets/.../recommendations/..."
},
"self": {
"href": "/targets/..."
}
}
}
]
}
}
Note that an special Rank
property is added to the Target, indicating the level of similarity to the given Target within the context of the given Actor.