Authentication is required.


GET /apiv2/activity-alerts
List activity alerts

Examples

GET /api/v2/activity-alerts
200
{
  "data": [
    {
      "id": "5",
      "type": "activity-alerts",
      "links": {
        "self": "http://test.host/api/v2/activity-alerts/5"
      },
      "attributes": {
        "name": "Company Alert",
        "email-delivery": true,
        "notification-delivery": true,
        "enabled": true
      },
      "relationships": {
        "account": {
          "links": {
            "self": "http://test.host/api/v2/activity-alerts/5/relationships/account",
            "related": "http://test.host/api/v2/activity-alerts/5/account"
          }
        },
        "company": {
          "links": {
            "self": "http://test.host/api/v2/activity-alerts/5/relationships/company",
            "related": "http://test.host/api/v2/activity-alerts/5/company"
          }
        }
      }
    }
  ],
  "meta": {
    "total-pages": 1,
    "record-count": 1
  },
  "links": {
    "first": "http://test.host/api/v2/activity-alerts?page%5Bnumber%5D=1&page%5Bsize%5D=10",
    "last": "http://test.host/api/v2/activity-alerts?page%5Bnumber%5D=1&page%5Bsize%5D=10"
  }
}

GET /apiv2/activity-alerts/:id
Show an activity alert

Examples

GET /api/v2/activity-alerts/1
200
{
  "data": {
    "id": "1",
    "type": "activity-alerts",
    "links": {
      "self": "http://test.host/api/v2/activity-alerts/1"
    },
    "attributes": {
      "name": "Company Alert",
      "email-delivery": true,
      "notification-delivery": true,
      "enabled": true
    },
    "relationships": {
      "account": {
        "links": {
          "self": "http://test.host/api/v2/activity-alerts/1/relationships/account",
          "related": "http://test.host/api/v2/activity-alerts/1/account"
        }
      },
      "company": {
        "links": {
          "self": "http://test.host/api/v2/activity-alerts/1/relationships/company",
          "related": "http://test.host/api/v2/activity-alerts/1/company"
        }
      }
    }
  }
}

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 /apiv2/activity-alerts
Create an activity alert

Examples

POST /api/v2/activity-alerts
{
  "data": {
    "type": "activity-alerts",
    "attributes": {
      "name": "Company Alert",
      "email-delivery": true,
      "notification-delivery": true,
      "enabled": true
    },
    "relationships": {
      "account": {
        "data": {
          "type": "accounts",
          "id": "6"
        }
      }
    }
  }
}
201
{
  "data": {
    "id": "6",
    "type": "activity-alerts",
    "links": {
      "self": "http://test.host/api/v2/activity-alerts/6"
    },
    "attributes": {
      "name": "Company Alert",
      "email-delivery": true,
      "notification-delivery": true,
      "enabled": true
    },
    "relationships": {
      "account": {
        "links": {
          "self": "http://test.host/api/v2/activity-alerts/6/relationships/account",
          "related": "http://test.host/api/v2/activity-alerts/6/account"
        }
      },
      "company": {
        "links": {
          "self": "http://test.host/api/v2/activity-alerts/6/relationships/company",
          "related": "http://test.host/api/v2/activity-alerts/6/company"
        }
      }
    }
  }
}

Params

Param name Description
data
required

alert information

Validations:

  • Must be a Hash

data[type]
required

Validations:


PATCH /apiv2/activity-alerts/:id
Update an activity alert

Examples

PATCH /api/v2/activity-alerts/2
{
  "data": {
    "id": "2",
    "type": "activity-alerts",
    "attributes": {
      "name": "Company Alert",
      "email-delivery": true,
      "notification-delivery": true,
      "enabled": false
    },
    "relationships": {
      "account": {
        "data": {
          "type": "accounts",
          "id": "2"
        }
      },
      "company": {
        "data": {
          "type": "companies",
          "id": "4"
        }
      }
    }
  }
}
200
{
  "data": {
    "id": "2",
    "type": "activity-alerts",
    "links": {
      "self": "http://test.host/api/v2/activity-alerts/2"
    },
    "attributes": {
      "name": "Company Alert",
      "email-delivery": true,
      "notification-delivery": true,
      "enabled": false
    },
    "relationships": {
      "account": {
        "links": {
          "self": "http://test.host/api/v2/activity-alerts/2/relationships/account",
          "related": "http://test.host/api/v2/activity-alerts/2/account"
        }
      },
      "company": {
        "links": {
          "self": "http://test.host/api/v2/activity-alerts/2/relationships/company",
          "related": "http://test.host/api/v2/activity-alerts/2/company"
        }
      }
    }
  }
}

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 an activity alert

Examples

DELETE /api/v2/activity-alerts/4
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.