logoBack to home screen

Querying for Specific Properties (Include and Exclude)

If you feel that the response of your REST query is too big and uninformative, you can include and exclude specific properties. This feature is available thanks to the following parameters:

  • includeProperties
  • excludeProperties

These parameters are available on GET endpoints for contents (apart from those related to representations and versions), folders and entries.

Important: when you query for an entry, the top level of the response is always sorted by entry type.

Consider the example below:

  1. I want to get all children of a particular entry.

    Note that children would normally be ignored due to autoExclude property being set to true by default. We don't want to set it to false though - it would make the response even more difficult to read!

  2. I don't want to get information about parent nor details about who created this entry or when (createdBy and createdAt, respectively).

To execute a request matching the above criteria, do as follows:

  1. Go to the landing page and click the API link under repository where the entry is kept:

    Swagger page opens, showing the available ADx endpoints.

  2. Open the /access.adx.content.default/v1/entry endpoint available in Entry section. Click Try it out! to activate the fields

  3. Enter the entry's technical ID (you can get it from the property panel in the explorer).

  4. Set the parameters as follows:

  5. Click Execute. The response should include the children, but no parent and no creation information:

    {
  "_type": "tribefire.adx.model.content.service.v1.request.crud.FolderResponse",
  "duration": 225,
  "folder": {
    "active": true,
    "children": [
      {
        "_type": "tribefire.adx.model.content.Folder",
        "active": true,
        "entryType": "FOLDER",
        "id": "a2aa0487-c802-4e18-96a5-66f59509b826",
        "lastModifiedAt": "2019-12-02T16:02:33.105+0000",
        "lastModifiedBy": "cortex",
        "name": "grandchild2",
        "owner": "cortex",
        "partition": "access.adx.content.default"
      },
      {
        "_type": "tribefire.adx.model.content.Content",
        "active": true,
        "chronicalId": "f024b2af-d495-472b-a85b-57d5df577cfb",
        "entryType": "CONTENT",
        "id": "0da3a961-82c6-404e-998c-eeab3d9ab8aa",
        "lastModifiedAt": "2019-12-02T16:07:28.934+0000",
        "lastModifiedBy": "cortex",
        "name": "file1",
        "owner": "cortex",
        "partition": "access.adx.content.default",
        "resource": {
          "created": "2019-11-26T08:46:33.880+0000",
          "creator": "cortex",
          "fileSize": 195568,
          "id": "8ec8eafa-3526-4b50-a196-b8254041362b",
          "md5": "d76a36e00ed55a52a0cdbc63001cb2e7",
          "mimeType": "image/jpeg",
          "name": "otomoto (2).jpg",
          "partition": "access.adx.content.default"
        },
        "version": "1.0",
        "versionStatus": "WORKING_COPY"
      },
      {
        "_type": "tribefire.adx.model.content.Content",
        "active": true,
        "chronicalId": "5371b51f-be0e-48d0-ab3f-1a1877b15808",
        "entryType": "CONTENT",
        "id": "f2a16a01-2f70-4ed7-89e6-10ca4de3d483",
        "lastModifiedAt": "2019-12-02T16:06:34.736+0000",
        "lastModifiedBy": "cortex",
        "name": "watermark2",
        "owner": "cortex",
        "partition": "access.adx.content.default",
        "resource": {
          "created": "2019-11-26T08:34:07.717+0000",
          "creator": "cortex",
          "fileSize": 101954,
          "id": "2dbeb0ad-a3f5-4612-8745-5dfe51f319a7",
          "md5": "e4d7529ec2f0ce77c0986dc6cf5d81a6",
          "mimeType": "image/png",
          "name": "watermark2.png",
          "partition": "access.adx.content.default"
        },
        "version": "1.0",
        "versionStatus": "CURRENT"
      },
      {
        "_type": "tribefire.adx.model.content.Folder",
        "active": true,
        "entryType": "FOLDER",
        "id": "fe0c0bd0-72da-4ef1-a162-543fa63171ab",
        "lastModifiedAt": "2019-12-02T16:02:26.086+0000",
        "lastModifiedBy": "cortex",
        "name": "grandchild1",
        "owner": "cortex",
        "partition": "access.adx.content.default"
      }
    ],
    "entryType": "FOLDER",
    "id": "50966c9e-90e1-4736-ac3a-eb940643f082",
    "lastModifiedAt": "2019-12-02T15:55:01.091+0000",
    "lastModifiedBy": "cortex",
    "name": "child",
    "owner": "cortex",
    "partition": "access.adx.content.default"
  }
}