Authentication is required.


GET /api/v2/alerts
List logged-in account's alert

Examples

GET /api/v2/alerts
200
{
  "data": [
    {
      "id": "9",
      "type": "alerts",
      "links": {
        "self": "http://test.host/api/v2/alerts/9"
      },
      "attributes": {
        "name": "My first alert",
        "frequency": "real-time",
        "enabled": false,
        "email-delivery": false,
        "notification-delivery": true,
        "delivery-time": 6,
        "delivery-day": 1,
        "imperatives": null,
        "countries": [
          "Singapore"
        ],
        "sectors": null,
        "verticals": null,
        "min-market-cap": null,
        "max-market-cap": null,
        "any-entity-watched": null,
        "entity-watched": null,
        "author-followed": null,
        "reading-list-matched": null
      },
      "relationships": {
        "account": {
          "links": {
            "self": "http://test.host/api/v2/alerts/9/relationships/account",
            "related": "http://test.host/api/v2/alerts/9/account"
          }
        },
        "filter-preset": {
          "links": {
            "self": "http://test.host/api/v2/alerts/9/relationships/filter-preset",
            "related": "http://test.host/api/v2/alerts/9/filter-preset"
          }
        }
      }
    }
  ],
  "meta": {
    "total-pages": 1,
    "record-count": 1
  },
  "links": {
    "first": "http://test.host/api/v2/alerts?page%5Bnumber%5D=1&page%5Bsize%5D=10",
    "last": "http://test.host/api/v2/alerts?page%5Bnumber%5D=1&page%5Bsize%5D=10"
  }
}

GET /api/v2/alerts/:id
Show a alert

Params

Param name Description
id
required

alert 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/alerts
Create logged-in account's alert

Examples

POST /api/v2/alerts
{
  "data": {
    "type": "alerts",
    "attributes": {
      "name": "My first alert",
      "frequency": "weekly",
      "enabled": false,
      "email-delivery": false,
      "notification-delivery": true,
      "delivery-time": "6",
      "delivery-day": "1",
      "imperatives": null,
      "countries": null,
      "sectors": null,
      "verticals": null,
      "min-market-cap": null,
      "max-market-cap": null,
      "any-entity-watched": null,
      "entity-watched": null,
      "author-followed": null,
      "reading-list-matched": null
    },
    "relationships": {
      "account": {
        "data": {
          "type": "accounts",
          "id": "211"
        }
      }
    }
  }
}
201
{
  "data": {
    "id": "5",
    "type": "alerts",
    "links": {
      "self": "http://test.host/api/v2/alerts/5"
    },
    "attributes": {
      "name": "My first alert",
      "frequency": "weekly",
      "enabled": false,
      "email-delivery": false,
      "notification-delivery": true,
      "delivery-time": "6",
      "delivery-day": "1",
      "imperatives": null,
      "countries": null,
      "sectors": null,
      "verticals": null,
      "min-market-cap": null,
      "max-market-cap": null,
      "any-entity-watched": null,
      "entity-watched": null,
      "author-followed": null,
      "reading-list-matched": null
    },
    "relationships": {
      "account": {
        "links": {
          "self": "http://test.host/api/v2/alerts/5/relationships/account",
          "related": "http://test.host/api/v2/alerts/5/account"
        }
      },
      "filter-preset": {
        "links": {
          "self": "http://test.host/api/v2/alerts/5/relationships/filter-preset",
          "related": "http://test.host/api/v2/alerts/5/filter-preset"
        }
      }
    }
  }
}

Params

Param name Description
data
required

alert information

Validations:

  • Must be a Hash

data[type]
required

Validations:


PATCH /apiv2/alerts/:id
Update a alert

Examples

PATCH /api/v2/alerts/3
{
  "data": {
    "id": "3",
    "type": "alerts",
    "attributes": {
      "name": "a new name",
      "frequency": "daily",
      "enabled": false,
      "email-delivery": false,
      "notification-delivery": true,
      "delivery-time": "6",
      "delivery-day": "1",
      "imperatives": null,
      "countries": null,
      "sectors": null,
      "verticals": null,
      "min-market-cap": null,
      "max-market-cap": null,
      "any-entity-watched": null,
      "entity-watched": null,
      "author-followed": null,
      "reading-list-matched": null
    },
    "relationships": {
      "account": {
        "data": {
          "type": "accounts",
          "id": "209"
        }
      }
    }
  }
}
200
{
  "data": {
    "id": "3",
    "type": "alerts",
    "links": {
      "self": "http://test.host/api/v2/alerts/3"
    },
    "attributes": {
      "name": "a new name",
      "frequency": "daily",
      "enabled": false,
      "email-delivery": false,
      "notification-delivery": true,
      "delivery-time": "6",
      "delivery-day": "1",
      "imperatives": null,
      "countries": null,
      "sectors": null,
      "verticals": null,
      "min-market-cap": null,
      "max-market-cap": null,
      "any-entity-watched": null,
      "entity-watched": null,
      "author-followed": null,
      "reading-list-matched": null
    },
    "relationships": {
      "account": {
        "links": {
          "self": "http://test.host/api/v2/alerts/3/relationships/account",
          "related": "http://test.host/api/v2/alerts/3/account"
        }
      },
      "filter-preset": {
        "links": {
          "self": "http://test.host/api/v2/alerts/3/relationships/filter-preset",
          "related": "http://test.host/api/v2/alerts/3/filter-preset"
        }
      }
    }
  }
}

Params

Param name Description
id
required

alert 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

alert information

Validations:

  • Must be a Hash

data[type]
optional

Validations:


DELETE /apiv2/alerts/:id
Delete a alert

Examples

DELETE /api/v2/alerts/1
204
{}

Params

Param name Description
id
required

alert 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.