示例

POST /api/bookmarks
{
  "bookmark": {
    "public": false,
    "controller": "hosts",
    "name": "facts.architecture",
    "query": " facts.architecture = x86_64"
  }
}
201
{
  "name": "facts.architecture",
  "controller": "hosts",
  "query": "facts.architecture = x86_64",
  "public": false,
  "id": 980190963,
  "owner_id": 135138680,
  "owner_type": "User"
}

參數

參數名字 描述
location_id
選填

位置範圍

Validations:

  • Must be a Integer

organization_id
選填

組織範圍

Validations:

  • Must be a Integer

bookmark
必填

Validations:

  • Must be a Hash

bookmark[name]
必填

Validations:

  • Must be a String

bookmark[controller]
必填

Validations:

  • Must be a String

bookmark[query]
必填

Validations:

  • Must be a String

bookmark[public]
選填 , 允許空值

Validations:

  • Must be one of: true, false, 1, 0.