Skip to content

Some relationships not found by /adjacent #1052

@pudo

Description

@pudo

https://www.opensanctions.org/entities/c4-fv-26f553e48c92ffe88033bd04d2f9dd3a4f1cbb5d/ ownership https://www.opensanctions.org/entities/c4-fv-1981b8b74375b2ac7875741cd22d60d084ba164a/ by owner https://www.opensanctions.org/entities/NK-iJndYC9Ahf4RSaPMQkfuqa/ not found

It's in the nested entity response

$ curl --silent -H"Authorization: $API_KEY" -H"content-type: application/json" 'https://api.opensanctions.org/entities/c4-fv-26f553e48c92ffe88033bd04d2f9dd3a4f1cbb5d'|jq . | grep -B12 -A3 NK-iJndYC9Ahf4RSaPMQkfuqa
    ],
    "ownershipAsset": [
      {
        "id": "c4-fv-1981b8b74375b2ac7875741cd22d60d084ba164a",
        "caption": "Ownership",
        "schema": "Ownership",
        "properties": {
          "recordId": [
            "T6500002008101010016813"
          ],
          "owner": [
            {
              "id": "NK-iJndYC9Ahf4RSaPMQkfuqa",
              "caption": "Xinjiang Energy (Group) Co., Ltd.",
              "schema": "Company",
              "properties": {

It's not in the adjacent responses

curl --silent -H"Authorization: $API_KEY" -H"content-type: application/json" 'https://api.opensanctions.org/entities/c4-fv-26f553e48c92ffe88033bd04d2f9dd3a4f1cbb5d/adjacent'|jq . | grep -B12 -A3 NK-iJndYC9Ahf4RSaPMQkfuqa
--->(1)
$ curl --silent -H"Authorization: $API_KEY" -H"content-type: application/json" 'https://api.opensanctions.org/entities/c4-fv-26f553e48c92ffe88033bd04d2f9dd3a4f1cbb5d/adjacent/ownershipAsset' | jq .
{
  "detail": "No such property!"
}

Another asset's owner is in the adjacent response

$ curl --silent -H"Authorization: $API_KEY" -H"content-type: application/json" 'https://api.opensanctions.org/entities/lei-81560084D60FE553FF12/adjacent/ownershipAsset' | jq .
{
  "limit": 10,
  "offset": 0,
  "total": {
    "value": 1,
    "relation": "eq"
  },
  "results": [
    {
      "id": "NK-aHxkXceXm5Jc3Esx64WyJ3",
      "caption": "Ownership",
      "schema": "Ownership",
      "properties": {
        "owner": [
          {
            "id": "NK-NFHiJ7wUvi9FSL5dHt8Bzh",
            "caption": "UNICREDIT, SOCIETA' PER AZIONI",
            "schema": "Company",

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions