GET /api/http_proxies
List of HTTP Proxies

Examples

GET /api/http_proxies
200
{
  "total": 2,
  "subtotal": 2,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "id": 326090511,
      "name": "myhttpproxy",
      "url": "https://mytest.com",
      "username": null
    },
    {
      "id": 1022235408,
      "name": "yourhttpproxy",
      "url": "https://yourtest.com",
      "username": null
    }
  ]
}

Params

Param name Description
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
id integer
location string
location_id integer
name string
organization string
organization_id integer
url string

GET /api/http_proxies/:id
Show an HTTP Proxy

Examples

GET /api/http_proxies/1022235411
200
{
  "id": 1022235411,
  "name": "http_proxy_31",
  "url": "http://url_31",
  "username": null,
  "locations": [],
  "organizations": []
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Identifier of the HTTP Proxy

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.


POST /api/http_proxies
Create an HTTP Proxy

Examples

POST /api/http_proxies
{
  "http_proxy": {
    "name": "http_proxy_is_smart",
    "url": "http://what????:5000"
  }
}
201
{
  "id": 1022235412,
  "name": "http_proxy_is_smart",
  "url": "http://what????:5000",
  "username": null,
  "password": null
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

http_proxy
required

Validations:

  • Must be a Hash

http_proxy[name]
required

The HTTP Proxy name

Validations:

  • Must be a String

http_proxy[url]
required

URL of the HTTP Proxy

Validations:

  • Must be a String

http_proxy[username]
optional , nil allowed

Username used to authenticate with the HTTP Proxy

Validations:

  • Must be a String

http_proxy[password]
optional , nil allowed

Password used to authenticate with the HTTP Proxy

Validations:

  • Must be a String

http_proxy[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

http_proxy[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


PUT /api/http_proxies/:id
Update an HTTP Proxy

Examples

PUT /api/http_proxies/1022235409
{
  "http_proxy": {
    "url": "https://some_other_url"
  }
}
200
{
  "url": "https://some_other_url",
  "id": 1022235409,
  "name": "http_proxy_29",
  "username": null,
  "password": null
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

http_proxy
required

Validations:

  • Must be a Hash

http_proxy[name]
optional

The HTTP Proxy name

Validations:

  • Must be a String

http_proxy[url]
optional

URL of the HTTP Proxy

Validations:

  • Must be a String

http_proxy[username]
optional , nil allowed

Username used to authenticate with the HTTP Proxy

Validations:

  • Must be a String

http_proxy[password]
optional , nil allowed

Password used to authenticate with the HTTP Proxy

Validations:

  • Must be a String

http_proxy[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

http_proxy[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


DELETE /api/http_proxies/:id
Delete an HTTP Proxy

Examples

DELETE /api/http_proxies/1022235410
{
  "http_proxy": {}
}
200
{
  "id": 1022235410,
  "name": "http_proxy_30",
  "url": "http://url_30",
  "username": null,
  "password": null
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

id
required

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.