GET /api/trends 200 { "total": 2, "subtotal": 2, "page": 1, "per_page": 20, "search": null, "sort": { "by": null, "order": null }, "results": [ { "created_at": "2018-11-15 19:02:19 UTC", "updated_at": "2018-11-15 19:02:19 UTC", "id": 1, "trendable_type": "Environment", "trendable_id": 1, "fact_name": "fact", "type": "ForemanTrend", "name": "trend1", "label": "Environment" }, { "created_at": "2018-11-15 19:02:19 UTC", "updated_at": "2018-11-15 19:02:19 UTC", "id": 5, "trendable_type": "FactName", "trendable_id": 3, "fact_name": "fact1", "type": "FactTrend", "name": "trend2", "label": "trend2" } ] }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
GET /api/trends/1 200 { "created_at": "2018-11-15 19:02:19 UTC", "updated_at": "2018-11-15 19:02:19 UTC", "id": 1, "trendable_type": "Environment", "trendable_id": 11, "fact_name": "fact", "type": "ForemanTrend", "name": "trend11", "label": "Environment" }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
trend_id required |
Validations:
|
POST /api/trends { "trend": { "trendable_type": "Model" } } 201 { "created_at": "2018-11-15 19:02:19 UTC", "updated_at": "2018-11-15 19:02:19 UTC", "id": 6, "trendable_type": "Model", "trendable_id": null, "fact_name": null, "type": "ForemanTrend", "name": null, "label": "Model" }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
trendable_type required |
Validations:
|
fact_name optional |
Validations:
|
name optional |
Validations:
|
DELETE /api/trends/1 { "trend": {} } 200 { "id": 1, "trendable_type": "Environment", "trendable_id": 3, "name": "trend3", "fact_value": null, "fact_name": "fact", "created_at": "2018-11-15T19:02:19.325Z", "updated_at": "2018-11-15T19:02:19.325Z" }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
id required |
Validations:
|