--- sidebar_label: Querying Assets sidebar_position: 4 --- To integrate Amplify Video managed resources into your application, use the Amplify API javascript library and import the queries generated by Amplify. ```javascript import Amplify, { API, graphqlOperation } from 'aws-amplify'; import * as queries from '../../graphql/queries'; ``` Use the listVodAssets query to retrieve all assets in the CMS. ```javascript const assets = await API.graphql(graphqlOperation(queries.listVodAssets)); ``` You can also use GraphQL subscriptions to monitor for any newly created assets. ```javascript API.graphql( graphqlOperation(onCreateVodAsset), ).subscribe({ next: (((data) => { const { items } = this.state; items.push(data.value.data.onCreateVodAsset); this.setState({ items, }); })), }); ``` If you're using content protection, you may want to omit calling the token field within the CMS, as it will incur extra costs calling the lambda resolver for tokens each time you call ListVodAssets. You can edit the queries within `/src/graphql/queries.js` ```javascript export const listVodAssets = /* GraphQL */ query ListVodAssets( $filter: ModelvodAssetFilterInput $limit: Int $nextToken: String ) { listVodAssets(filter: $filter, limit: $limit, nextToken: $nextToken) { items { ... video { id token // remove this if you don't want lambda to be called on each invocation } ```