top

Reports

Get a list of SWQ, Surveys and Special reports in PDF format.

Retrieve all reports

Retrieve a list of reports based on your query parameters.

Get/reports

Query Parameters

before_published_at
TYPEstring
Restrict the response to reports published_at before the set time

after_published_at
TYPEstring
Restrict the response to reports published_at after the set time

type
TYPEstring
Restrict the response to reports that match the type provided. Possible values: "quarterly", "surveys", "leagueTable", or "special".

limit
TYPEinteger
The number of records to return. Default value is 10. Maximum value is 100.

offset
TYPEinteger
Used for pagination, this is the number of records from a collection to skip. Default value is 0.

sort_field
TYPEstring
Returns files sorted by the specified field. Possible values: "published_at".

sort_dir
TYPEstring
Determines the order direction for sorted results. Possible values: "ASC" or "DESC". Default is "DESC".
List Reports
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"

Success Response

HTTP Status 200
data
TYPEobject[]
An array of reports.

total_items
TYPEinteger
The total number of items matching the query regardless of pagination.
Example response
{
  "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
}

Error Response

message
TYPEstring
A short, human-readable summary of the problem type.

status
TYPEinteger
The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurance of the problem.
Example response
{
  "errors": [
      {
          "query_parameter": "sort_field",
          "message": "Value not in available options."
      }
  ],
  "status": 400
}

Retrieve one report

Retrieve one report.

Get/reports/:_id

Path Parameters

_id
REQUIRED
TYPEstring
Get information about a specific report.
Get Report info
curl -v -X GET https://api.swfi.com/v1/reports/:_id \ 
-H "Accept: application/json" \ 
-H "Authorization: $API_KEY"

Success Response

HTTP Status 200
data._id
TYPEstring
Unique identifier for the report.

data.type
TYPEstring
Determines the type of report. Possible values: quarterly, special, league table, and survey.

data.name
TYPEstring
Friendly name for the report.

data.description
TYPEstring
A short description about the report.

data.published_at
TYPEstring
The period in time in which the report was published.

data.media
TYPEobject
Key value pairs of associated media objects for the report.

data.created_at
TYPEstring
The UTC time the report was created.

data.updated_at
TYPEstring
The UTC time the report was updated.
Example response
{
  "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"
  }
}

Error Response

message
TYPEstring
A short, human-readable summary of the problem type.

status
TYPEinteger
The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurance of the problem.
Example response
{
  "errors": [
      {
          "path": "/v1/aum/:_id",
          "message": "Not Found"
      }
  ],
  "status": 404
}

Download one report

Receive a Buffer in response which you will need to save.

Get/reports/:_id/download

Path Parameters

_id
REQUIRED
TYPEstring
Download a specific report.
Download
curl -v -X GET https://api.swfi.com/v1/reports/:_id/download \ 
-H "Accept: application/pdf" \ 
-H "Authorization: $API_KEY"

Success Response

HTTP Status 200

Error Response

message
TYPEstring
A short, human-readable summary of the problem type.

status
TYPEinteger
The HTTP status code (RFC2616, Section 6) generated by the origin server for this occurance of the problem.
Example response
{
  "errors": [
      {
          "path": "/v1/aum/:_id",
          "message": "Not Found"
      }
  ],
  "status": 404
}
Documentation as of 10/19/2022