Integrate Software AG Products Using Digital Event Services 10.4 | Integrate Software AG Products Using Digital Event Services | MashZone NextGen Help | Appendix | Legacy Presto components | MashZone NextGen Development and APIs | MashZone NextGen APIs | MashZone NextGen Snapshot API | Get Snapshot Methods | Get Snapshot Collections By Criteria
 
Get Snapshot Collections By Criteria
Base URL
To retrieve all snapshots, use a URL in the form:
http://app-server:port/mashzone/edge/api/rest/snapshots
In most cases, you should add Parameters to filter the response to a specific set of snapshots. You can also use these parameters to sort the snapshot references in the response See Snapshot Collection Query Examples for some common combinations.
The response when you find a collection of snapshots contains a link with the URL to retrieve each matching snapshot. See Snapshot Collection Responses for an example.
Parameters
You can add any combination of the following parameters to queries for snapshot collections except that you must specify service if you specify operation.
Parameter
Req?
Description
name
A full or partial snapshot name. Snapshots whose name begins with this value are included.
tag
A tag to match.
service
The name of the mashable or mashup that this snapshot was generated from. You can use this parameter by itself or in conjunction with the operation parameter.
The name is case sensitive. You can also use partial artifact names. This matches artifacts whose name begins with the value you specify.
operation
The operation for the mashable or mashup that this snapshot was generated from. You must use this parameter in conjunction with the service parameter.
createdby
The name of the user who generated this snapshot.
fromdate
The first scheduled execution date to include in the form:
YYYY-MM-DD
todate
The first scheduled dateto exclude in the form:
YYYY-MM-DD
sortby
The field to use to sort snapshot references by in the response. You can sort by:
*name
*tags
*service
*operation
*createdby (default)
sortdir
The sort order to use, if you use the sortby parameters. This can be ascending (default) or descending.
Snapshot Collection Query Examples
Get snapshots by name or partial name:

http://localhost:8080/mashzone/edge/api/rest/snapshots?name=mySnap

http://localhost:8080/mashzone/edge/api/rest/snapshots?name=my
Get all snapshots for all operations of one service:

http://localhost:8080/mashzone/edge/api/rest/snapshots?service=YahooWeatherREST
Get all snapshots for one operation of a service:

http://localhost:8080/mashzone/edge/api/rest/snapshots?service=XigniteHistorical&operation=GetTopMovers
Get all snapshots created by one user:

http://localhost:8080/mashzone/edge/api/rest/snapshots?createdby=JAgusi
Get all snapshots for a tag and sort by artifact name:

http://localhost:8080/mashzone/edge/api/rest/snapshots?tag=news&sortby=service
Get all snapshots created since a specific start date:

http://localhost:8080/mashzone/edge/api/rest/snapshots?fromdate=2011-01-31
Get all snapshots created on one specific date:

http://localhost:8080/mashzone/edge/api/rest/snapshots?fromdate=2011-01-31&todate=2011-02-01
Get all snapshots created by one user using a specific tag

http://localhost:8080/mashzone/edge/api/rest/snapshots?createdby=ladams&tag=projectA
Snapshot Collection Responses
Snapshot collections contain metadata for matching snapshots but no snapshot data. This metadata includes the snapshot ID as well as the full URL (in content/@href) that you can use to retrieve individual snapshots.

<snapshots xmlns="http://www.jacbe.com/2009-08-01/snapshot">
<snapshot id="9445ae9b-28d3-11e0-9c7b-f391b2692a54">
<name>Snapshot - Tue Jan 25 2011</name>
<service>XigniteHistorical</service>
<operation>GetTopMovers</operation>
<createdby>Jane</createdby>
<description>10 top movers 12/31/2010</description>
<tags><tag>movers</tag></tags>
<view>Grid</view>
<createdtime>2011-01-25T14:37:41.935-08:00</createdtime>
<createdtimemillis>1295995061960</createdtimemillis>
<annotations count="0"/>
<content type="uri"
href="/mashzone/edge/api/rest/snapshot?id=9445ae9b-28d3-11e0-9c7b-f391b2692a54"
/>
</snapshot>
<snapshot id="7f6cb381-298e-11e0-afe3-8dcf3e37fbe1">
...
</snapshot>
...
</snapshots>

Copyright © 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release