Retrieve Objects That Share a Property

Retrieve all objects that share a field value, such as all instances of a concept, with a GET request.

2 min read

Send the request

  1. HTTP URL: https://<your-instance>.yooi.io/api/store/object/property/{propertyId}/{value}
  1. HTTP method: GET

Read the response

A JSON document representing an array of the concerned objects.

Retrieve all countries

To retrieve all countries, we need to find all objects that have the property Instance Field ID with the value Country Concept ID.

propertyId = Instance of Field ID

value = Country Concept ID

Use this cURL command.

curl -X GET \
  'https://<your-instance>.yooi.io/api/store/object/property/ee3b77dc-4172-5aae-add8-627a43b06783/a3a4f8d2-8f88-4398-99b9-37546ec9dfc1' \
  -H 'Authorization: Bearer {integrationToken}'

The result of the API call contains all objects, their fields and values.

If you receive an empty array, you may have forgotten to give the right permissions on your API integration. See Set Up an Integration.
[
  {
    "id": "098f942c-5aa4-4bcd-875e-a30e8dcc6ea6",
    "key": "098f942c-5aa4-4bcd-875e-a30e8dcc6ea6",
    "ee3b77dc-4172-5aae-add8-627a43b06783": "473e26e3-80b1-4c56-bef8-256309fafdb8",
    "30e01fe8-841d-43cb-814b-af97098ebfde": "P",
    "e8b10c4a-bae3-57cc-95c7-a22e69b5d4ae": 1632835375695,
    "436095ac-79f2-59c9-afa3-596bb1887f61": 1632836454621,
    "bf040b6b-58be-5194-8f32-4e1c8df24b42": [
      {
        "type": "paragraph",
        "children": [
          {
            "text": "France"
          }
        ]
      }
    ],
    "c685dd1f-ef27-466a-b5c0-fef652d7d321": 60000000
  },
  {
    "id": "7a2d06a6-12d4-4442-9764-714d9b68fe81",
    "key": "7a2d06a6-12d4-4442-9764-714d9b68fe81",
    "ee3b77dc-4172-5aae-add8-627a43b06783": "473e26e3-80b1-4c56-bef8-256309fafdb8",
    "30e01fe8-841d-43cb-814b-af97098ebfde": "h",
    "e8b10c4a-bae3-57cc-95c7-a22e69b5d4ae": 1632835380409,
    "436095ac-79f2-59c9-afa3-596bb1887f61": 1632836460908,
    "bf040b6b-58be-5194-8f32-4e1c8df24b42": [
      {
        "type": "paragraph",
        "children": [
          {
            "text": "Germany"
          }
        ]
      }
    ],
    "c685dd1f-ef27-466a-b5c0-fef652d7d321": 40000000
  }
]

Read more

Related articles

Was this page helpful?