Get Collection
It is simple and easy to start getting documents from your saved data collections. You simply use the get
method in your WeDeploy API call and then pass the name of the collection you want to retrieve.
WeDeploy
.data('https://-.wedeploy.io')
.get('movies')
.then(function(movie) {
console.log(movie);
});
WeDeploy
.data('https://-.wedeploy.io')
.get(resourcePath: "movies")
.then { movie in
print(movie)
}
WeDeploy
.data("https://-.wedeploy.io")
.get("movies")
.execute();
curl -X "GET" "https://-.wedeploy.io/movies" \
-H 'Authorization: Bearer ' \
The response will give you all the documents inside that collection.
[
{"id":"star_wars_i", "title":"Star Wars: Episode I - The Phantom Menace", "year":1999, "rating":6.5},
{"id":"star_wars_ii", "title":"Star Wars: Episode II - Attack of the Clones", "year":2002, "rating":6.7},
{"id":"star_wars_iii", "title":"Star Wars: Episode III - Revenge of the Sith", "year":2005, "rating":7.7},
{"id":"star_wars_iv", "title":"Star Wars: Episode IV - A New Hope", "year":1977, "rating":8.7},
{"id":"star_wars_v", "title":"Star Wars: Episode V - The Empire Strikes Back", "year":1980, "rating":8.8},
{"id":"star_wars_vi", "title":"Star Wars: Episode VI - Return of the Jedi", "year":1983, "rating":8.4},
{"id":"star_wars_vii", "title":"Star Wars: Episode VII - The Force Awakens", "year":2015}
]