curl -v -X GET https://api.swfi.com/v1/reports?before_published_at=2022-09-04&after_published_at=2022-08-20&type=50000000&limit=10&offset=0&sort_field=period&sort_dir=DESC \ -H "Accept: application/json" \ -H "Authorization: $API_KEY"
{ "data": [ { "_id": "6341ebd82888204117565e92", "type": "quarterly", "name": "SWFI Quarterly 2022 Q3", "description": "Sovereign Wealth Quarterly", "published_at": "2022-10-07T00:00:00.000Z", "media": { "thumbnail": { "file": "quarterly-20221001-thumb.png", "width": 204, "height": 265, "mime_type": "image/png", "source_url": "https://swfi-cdn.sfo2.digitaloceanspaces.com/quarterly-20221001-thumb.png" } }, "created_at": "2022-10-07T00:00:00.000Z", "updated_at": "2022-10-07T00:00:00.000Z" }, { "_id": "62c2273e87cbd1f25f835bfc", "type": "quarterly", "name": "SWFI Quarterly 2022 Q2", "description": "Sovereign Wealth Quarterly", "published_at": "2022-07-03T00:00:00.000Z", "media": { "thumbnail": { "file": "quarterly-20220701-thumb.png", "width": 204, "height": 265, "mime_type": "image/png", "source_url": "https://swfi-cdn.sfo2.digitaloceanspaces.com/quarterly-20220701-thumb.png" } }, "created_at": "2022-07-03T00:00:00.000Z", "updated_at": "2022-07-03T00:00:00.000Z" } ], "total_items": 10 }
{ "errors": [ { "query_parameter": "sort_field", "message": "Value not in available options." } ], "status": 400 }
Retrieve one report.
curl -v -X GET https://api.swfi.com/v1/reports/:_id \ -H "Accept: application/json" \ -H "Authorization: $API_KEY"
{ "data": { "_id": "6341ebd82888204117565e92", "type": "quarterly", "name": "SWFI Quarterly 2022 Q3", "description": "Sovereign Wealth Quarterly", "published_at": "2022-10-07T00:00:00.000Z", "media": { "thumbnail": { "file": "quarterly-20221001-thumb.png", "width": 204, "height": 265, "mime_type": "image/png", "source_url": "https://swfi-cdn.sfo2.digitaloceanspaces.com/quarterly-20221001-thumb.png" } }, "created_at": "2022-10-07T00:00:00.000Z", "updated_at": "2022-10-07T00:00:00.000Z" } }
{ "errors": [ { "path": "/v1/aum/:_id", "message": "Not Found" } ], "status": 404 }
Receive a Buffer in response which you will need to save.
curl -v -X GET https://api.swfi.com/v1/reports/:_id/download \ -H "Accept: application/pdf" \ -H "Authorization: $API_KEY"
{ "errors": [ { "path": "/v1/aum/:_id", "message": "Not Found" } ], "status": 404 }