How to parse the opensearch data stream name in snapshot api command to take the backup of the data stream

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):

opensearch version: 2.12

Describe the issue:

the restore documentation explains that indices field can be both data streams or indices as below:
Restore Snapshot - OpenSearch Documentation

indices	String	A comma-delimited list of data streams and indices to restore from the snapshot. Multi-index syntax is supported. By default, a restore operation includes all data streams and indices in the snapshot. If this argument is provided, the restore operation only includes the data streams and indices that you specify.

whereas the snapshot api documentation doesn’t explain how to take the backup of both data streams
Create Snapshot - OpenSearch Documentation

indices	String	The indices you want to include in the snapshot. You can use , to create a list of indices, * to specify an index pattern, and - to exclude certain indices. Don’t put spaces between items. Default is all indices.

query is - how would we pass the data stream names in snapshot api command. when the data streams need to be backed up?

The parameter indices in both APIs have same usage, you can specify a comma-delimited list of data streams when calling the create snapshot API.