Examples

GET /api/media
200
{
  "total": 5,
  "subtotal": 5,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "path": "http://mirror.centos.org/centos/6.0/os/$arch",
      "os_family": null,
      "created_at": "2018-11-16 10:02:08 UTC",
      "updated_at": "2018-11-16 10:02:08 UTC",
      "id": 980190962,
      "name": "CentOS 5.4"
    },
    {
      "path": "http://download.opensuse.org/distribution/$version/repo/oss",
      "os_family": null,
      "created_at": "2018-11-16 10:02:08 UTC",
      "updated_at": "2018-11-16 10:02:08 UTC",
      "id": 750842046,
      "name": "OpenSUSE"
    },
    {
      "path": "http://brsla01/vol/solgi_5.10/sol$minor_$release_$arch",
      "os_family": null,
      "created_at": "2018-11-16 10:02:08 UTC",
      "updated_at": "2018-11-16 10:02:08 UTC",
      "id": 442321401,
      "name": "Solaris 10"
    },
    {
      "path": "http://sg.archive.ubuntu.com",
      "os_family": null,
      "created_at": "2018-11-16 10:02:08 UTC",
      "updated_at": "2018-11-16 10:02:08 UTC",
      "id": 1011586618,
      "name": "Ubuntu Mirror"
    },
    {
      "path": "http://nothing.intersting.com",
      "os_family": null,
      "created_at": "2018-11-16 10:02:08 UTC",
      "updated_at": "2018-11-16 10:02:08 UTC",
      "id": 338446587,
      "name": "unused"
    }
  ]
}

Params

Param name Description
operatingsystem_id
optional

ID of operating system

Validations:

  • Must be a number.

location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

search
optional

filter results

Validations:

  • Must be a String

order
optional

Sort and order by a searchable field, e.g. '<field> DESC'

Validations:

  • Must be a String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return, 'all' to return all results

Validations:

  • Must match regular expression /\A([1-9]\d*|all)\Z$/.

Search fields

Field name Type Possible values
family string
id integer
location string
location_id integer
name string
organization string
organization_id integer
path string