Authentication is required.


GET /api/v2/filter-presets
List logged-in account's filter presets

Examples

GET /api/v2/filter-presets
200
{
  "data": [
    {
      "id": "10",
      "type": "filter-presets",
      "links": {
        "self": "http://test.host/api/v2/filter-presets/10"
      },
      "attributes": {
        "name": "Health Care",
        "countries": [
          "Singapore",
          "India"
        ],
        "sectors": [],
        "strategies": [],
        "verticals": [],
        "min-market-cap": null,
        "max-market-cap": null,
        "format-types": null,
        "imperatives": null,
        "time-horizons": null
      },
      "relationships": {
        "account": {
          "links": {
            "self": "http://test.host/api/v2/filter-presets/10/relationships/account",
            "related": "http://test.host/api/v2/filter-presets/10/account"
          }
        }
      }
    }
  ],
  "meta": {
    "record-count": 1
  }
}

GET /api/v2/filter-presets/:id
Show a filter preset

Examples

GET /api/v2/filter-presets/9
200
{
  "data": {
    "id": "9",
    "type": "filter-presets",
    "links": {
      "self": "http://test.host/api/v2/filter-presets/9"
    },
    "attributes": {
      "name": "Asean Tech",
      "countries": [
        "Singapore",
        "India"
      ],
      "sectors": [],
      "strategies": [],
      "verticals": [],
      "min-market-cap": null,
      "max-market-cap": null,
      "format-types": null,
      "imperatives": null,
      "time-horizons": null
    },
    "relationships": {
      "account": {
        "links": {
          "self": "http://test.host/api/v2/filter-presets/9/relationships/account",
          "related": "http://test.host/api/v2/filter-presets/9/account"
        }
      }
    }
  }
}

Params

Param name Description
id
required

Filter preset ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.


POST /api/v2/filter-presets
Create logged-in account's filter preset

Examples

POST /api/v2/filter-presets
{
  "data": {
    "type": "filter-presets",
    "attributes": {
      "name": "Asean Tech",
      "countries": [
        "Singapore",
        "India"
      ],
      "sectors": [],
      "strategies": [],
      "verticals": [],
      "min-market-cap": null,
      "max-market-cap": null,
      "format-types": null,
      "imperatives": null,
      "time-horizons": null
    },
    "relationships": {
      "account": {
        "data": {
          "type": "accounts",
          "id": "115"
        }
      }
    }
  }
}
201
{
  "data": {
    "id": "19",
    "type": "filter-presets",
    "links": {
      "self": "http://test.host/api/v2/filter-presets/19"
    },
    "attributes": {
      "name": "Asean Tech",
      "countries": [
        "Singapore",
        "India"
      ],
      "sectors": [],
      "strategies": [],
      "verticals": [],
      "min-market-cap": null,
      "max-market-cap": null,
      "format-types": null,
      "imperatives": null,
      "time-horizons": null
    },
    "relationships": {
      "account": {
        "links": {
          "self": "http://test.host/api/v2/filter-presets/19/relationships/account",
          "related": "http://test.host/api/v2/filter-presets/19/account"
        }
      }
    }
  }
}

Params

Param name Description
data
required

filter preset information

Validations:

  • Must be a Hash

data[type]
required

Validations:

data[attributes]
required

Validations:

  • Must be a Hash

data[attributes][name]
required

Validations:

  • Must be a String

data[attributes][countries]
optional , nil allowed

Validations:

  • Must be an array of any type

data[attributes][sectors]
optional , nil allowed

Validations:

  • Must be an array of any type

data[attributes][strategies]
optional , nil allowed

Validations:

  • Must be an array of any type

data[attributes][verticals]
optional , nil allowed

Validations:

  • Must be an array of any type

data[relationships]
required

Validations:

  • Must be a Hash

data[relationships][account]
required

Validations:

  • Must be a Hash

data[relationships][account][data]
required

Validations:

  • Must be a Hash

data[relationships][account][data][type]
required

Account type, which is `accounts`

Validations:

  • Must be a String

data[relationships][account][data][id]
required

Account ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.


PATCH /apiv2/filter-presets/:id
Update a filter preset

Examples

PATCH /api/v2/filter-presets/1
{
  "data": {
    "id": "1",
    "type": "filter-presets",
    "attributes": {
      "name": "new preset name",
      "countries": [
        "Singapore",
        "India"
      ],
      "sectors": [],
      "strategies": [],
      "verticals": [],
      "min-market-cap": null,
      "max-market-cap": null,
      "format-types": [
        "quick-note"
      ],
      "imperatives": [
        "bearish"
      ],
      "time-horizons": [
        "short"
      ]
    },
    "relationships": {
      "account": {
        "data": {
          "type": "accounts",
          "id": "98"
        }
      }
    }
  }
}
200
{
  "data": {
    "id": "1",
    "type": "filter-presets",
    "links": {
      "self": "http://test.host/api/v2/filter-presets/1"
    },
    "attributes": {
      "name": "new preset name",
      "countries": [
        "Singapore",
        "India"
      ],
      "sectors": [],
      "strategies": [],
      "verticals": [],
      "min-market-cap": null,
      "max-market-cap": null,
      "format-types": [
        "quick-note"
      ],
      "imperatives": [
        "bearish"
      ],
      "time-horizons": [
        "short"
      ]
    },
    "relationships": {
      "account": {
        "links": {
          "self": "http://test.host/api/v2/filter-presets/1/relationships/account",
          "related": "http://test.host/api/v2/filter-presets/1/account"
        }
      }
    }
  }
}

Params

Param name Description
id
required

Filter preset ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.

data
required

filter preset information

Validations:

  • Must be a Hash

data[type]
optional

Validations:

data[attributes]
optional

Validations:

  • Must be a Hash

data[attributes][name]
optional

Validations:

  • Must be a String

data[attributes][countries]
optional , nil allowed

Validations:

  • Must be an array of any type

data[attributes][sectors]
optional , nil allowed

Validations:

  • Must be an array of any type

data[attributes][strategies]
optional , nil allowed

Validations:

  • Must be an array of any type

data[attributes][verticals]
optional , nil allowed

Validations:

  • Must be an array of any type

data[relationships]
optional

Validations:

  • Must be a Hash

data[relationships][account]
optional

Validations:

  • Must be a Hash

data[relationships][account][data]
optional

Validations:

  • Must be a Hash

data[relationships][account][data][type]
optional

Account type, which is `accounts`

Validations:

  • Must be a String

data[relationships][account][data][id]
optional

Account ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.


DELETE /apiv2/filter-presets/:id
Delete a filter preset

Examples

DELETE /api/v2/filter-presets/8
204
{}

Params

Param name Description
id
required

Filter preset ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.