Skip to content

Instantly share code, notes, and snippets.

@wwe-johndpope
Last active April 5, 2017 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wwe-johndpope/e70db69f5b5b08aadd1915433df80d57 to your computer and use it in GitHub Desktop.
Save wwe-johndpope/e70db69f5b5b08aadd1915433df80d57 to your computer and use it in GitHub Desktop.
save out json to files.
// chomd +x dumpSwaggerJson.sh
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/channels -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > channels.json
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/channels/channelContent?channelid=1092 -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > channel1092.json
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/channels/channelContent?channelid=1701 -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > channel1701.json
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/channels/channelContent?channelid=1408 -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > channel1408.json
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/channels/channelContent?channelid=1078 -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > channel1078.json
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/channels/channelContent?channelid=1155 -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > channel1155.json
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/video/associatedContent?video_id=1180 -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > associatedContent1105.json
//shows
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/shows -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > shows.json
// shows/related
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/shows/related?show_id=1111 -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > relatedShows1111.json
// superstars/related
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/superstars/related?superstar_id=1 -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > superstars1.json
@wwe-johndpope
Copy link
Author

Beware of filesize ~ 0kb / rate limit imposed

screen shot 2017-04-05 at 3 40 26 pm

@wwe-johndpope
Copy link
Author

from swagger - we can inspect the curl here
just add to above script.

screen shot 2017-04-05 at 3 42 35 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment