Filter Content by Content Type Example

GET /api/provider/contenttypes with parameters to filter a list of returned content type items.

curl Command

The following command filters content by the contentTypeId named composite-blueprint.
$curl --insecure -s -H "Content-Type: application/json" -H "Authorization: Bearer $token" https://$vRA/content-management-service/api/contents?%24filter=contentTypeId+eq+%27composite-blueprint%27

JSON Output

In this example, the returned IDs correspond to composite blueprints that meet the filtering criteria.

{
  "links": [],
  "content": [
    {
      "@type": "Content",
      "id": "9b348c29-88ff-4fa8-b93e-f80bc7c3e723",
      "contentId": "vSphere",
      "name": "vSphere",
      "description": "vSphere",
      "contentTypeId": "composite-blueprint",
      "mimeType": null,
      "tenantId": "qe",
      "subtenantId": null,
      "dependencies": [],
      "createdDate": "2015-08-04T14:46:54.201Z",
      "lastUpdated": "2015-08-04T16:59:30.488Z",
      "version": 1
    },
    {
      "@type": "Content",
      "id": "968ae331-1ef2-44f8-bdc5-dfc2be78ca2f",
      "contentId": "Amazon",
      "name": "Amazon",
      "description": "Amazon",
      "contentTypeId": "composite-blueprint",
      "mimeType": null,
      "tenantId": "qe",
      "subtenantId": null,
      "dependencies": [
        "9e2005c3-c56e-48d0-801c-be36851f2b08"
      ],
      "createdDate": "2015-08-04T20:47:20.308Z",
      "lastUpdated": "2015-08-04T20:47:20.308Z",
      "version": 0
    }
  ],
  "metadata": {
    "size": 20,
    "totalElements": 2,
    "totalPages": 1,
    "number": 1,
    "offset": 0
  }
}

Input

Output

The command output contains property names and values based on the command input parameters.