Asset details from a Sitecore collection DAM - api

We are using Sitecore DAM for Digital Asset sharing and Sitecore API for integration with other systems. I have an Collection #1 created in Sitecore and uploaded 3 assets in it #2.
I want to get details of assets available in the Collection by querying API
e.g. https://my-sitecore-host/api/entities/{collection id}. I am able to access it but response doesn't contains asset details #3.
Is there any way I can access asset list by sending collection id to sitecore API ?

Related

Gatsby source shopify

I'm developing a headless commerce app for a client with Gatsby and Shopify. The situation is we're having a couple of collections and inside each collection, there will be a list of products.
But at the time of querying, I'm only getting the option to query allShopifyProducts. Unable to query for collections.
Gatsby Source Shopify plugin receives 2 required parameters password and storeUrl. I put the Admin API access token as a value for a password which makes the building process works with no errors. But with all that I'm unable to get the queries for Collections. Is there any way around it? I've been searching for 7 hours, but am unable to get the appropriate result
The README at https://www.gatsbyjs.com/plugins/gatsby-source-shopify/ states:
Add the following under the Active Permissions for this App section:
Read access for Product listings if you enable collections in the plugin options
And then under the plugin options itself:
shopifyConnections: string[]
An optional array of additional data types to source. Accepted values: 'orders', 'collections', 'locations'
The documentation is not outdated.

Exporting a list of images from Google Photos or DropBox as CSV

Do any of the major online photo storage/sharing platforms offer a reasonable way to export a set of image URLs and titles as something like a CSV or fetch them as JSON from a REST API?
I am trying to get any sort of clean list of title, url value pairs for all the images in a particular folder or gallery.
Google Drive/Photos would be my prefered platform, but I would switch to DropBox or other service if I could easily get such an export list.
If you're going to use Google Drive, you'll probably end up using these properties from File Resource:
webViewLink - a link for opening the file in a relevant Google editor
or
webContentLink - a link for downloading the content of the file in a
browser.
You can fetch this properties using files.list or files.get.
For Dropbox, you would use the /2/files/list_folder[/continue] endpoints to list the desired files:
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder
https://www.dropbox.com/developers/documentation/http/documentation#files-list_folder-continue
Then, you can use /2/sharing/create_shared_link_with_settings to create shared links for the desired files:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_settings
Or, to retrieve existing shared links, use /2/sharing/list_shared_links:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-list_shared_links
Those are links to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible:
https://www.dropbox.com/developers/documentation
Those have corresponding native methods for the HTTPS endpoints.

Dropbox v2 web service to retrieve children of a folder is not returning "size" metadata for folders

I am integrating Dropbox in my application. I am able to retrieve child folders of a folder in Dropbox using "https://api.dropboxapi.com/2/files/list_folder" web service. But the data that is being returned doesn't contain size data for folders. Is there any way to retrieve size data for folders in Dropbox?
No, the Dropbox API doesn't report the size of a folder. You would need to compute it yourself, presumably by using /list_folder (with "recursive": true). I'm assuming the definition you have in mind is "the sum of the sizes of all files contained within the folder, recursively."

How to Access Sitecore Lucene Search through the Item Web API?

Is it possible to use Lucene Search in Sitecore and have the results returned as JSON by the Sitecore Item Web API?
The documentation for the Sitecore Item Web API on the Sitecore Developer Network doesn't give any examples how to use Lucene Search through the Item Web API.
The end result I'm looking for is to have the search results returned as JSON based on the search parameter provided. Since the Sitecore Item Web API can be used with Sitecore Query to retrieve items it would be convenient to be able to use it for search as well.
I do not think this is possible with the default implementation of the Item Web Api.
You can however extend it. When you look into the config, there is a lot of points where you can hook up with extensions.
You should be able to add your custom processor in the itemWebApiRequest pipeline. I would add new processor there which inherits from Sitecore.ItemWebApi.Pipelines.Request.RequestProcessor and add logic to handle Lucene queries there.

Create content types available in multiple site collections

I want to create a content type, lets call it MyDocument with some properties we need. However we have 10 departments each one with its own site collection.
I want all documents to be created using MyDocument,across all site collections.
Thanks
In SharePoint 2010, you can use a Content Type Hub.
From Plan to share terminology and content types:
To share content types among site collections, you make one content type gallery the “hub” of a managed metadata service, create connections to the service from each Web application that contains a site collection, and specify that site collections should use the content types in the service.
The same effect can also be achieved using a custom Feature.