GET /api/trends
200
{
"total": 2,
"subtotal": 2,
"page": 1,
"per_page": 20,
"search": null,
"sort": {
"by": null,
"order": null
},
"results": [
{
"created_at": "2018-07-24 13:15:10 UTC",
"updated_at": "2018-07-24 13:15:10 UTC",
"id": 5,
"trendable_type": "FactName",
"trendable_id": 3,
"fact_name": "fact195",
"type": "FactTrend",
"name": "trend4",
"label": "trend4"
},
{
"created_at": "2018-07-24 13:15:09 UTC",
"updated_at": "2018-07-24 13:15:09 UTC",
"id": 1,
"trendable_type": "Environment",
"trendable_id": 110,
"fact_name": "fact",
"type": "ForemanTrend",
"name": "trend3",
"label": "Environment"
}
]
}
| Param name | Description |
|---|---|
|
location_id optional |
Scope by locations Validations:
|
|
organization_id optional |
Scope by organizations Validations:
|
GET /api/trends/13
200
{
"created_at": "2018-07-24 13:15:10 UTC",
"updated_at": "2018-07-24 13:15:10 UTC",
"id": 13,
"trendable_type": "Environment",
"trendable_id": 114,
"fact_name": "fact",
"type": "ForemanTrend",
"name": "trend7",
"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": "FactName",
"trendable_id": "5"
}
}
201
{
"created_at": "2018-07-24 13:15:10 UTC",
"updated_at": "2018-07-24 13:15:10 UTC",
"id": 11,
"trendable_type": "FactName",
"trendable_id": 5,
"fact_name": "operatingsystem",
"type": "FactTrend",
"name": null,
"label": "operatingsystem"
}
| 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/32
{
"trend": {}
}
200
{
"id": 32,
"trendable_type": "Environment",
"trendable_id": 120,
"name": "trend13",
"fact_value": null,
"fact_name": "fact",
"created_at": "2018-07-24T13:15:10.695Z",
"updated_at": "2018-07-24T13:15:10.695Z"
}
| Param name | Description |
|---|---|
|
location_id optional |
Scope by locations Validations:
|
|
organization_id optional |
Scope by organizations Validations:
|
|
id required |
Validations:
|