API - Add index IP access rule

Security

Lets one address reach one part of your Opensolr Index. A request from an address with no matching rule is refused, even with the right password.

Endpointhttps://opensolr.com/solr_manager/api/add_ip
MethodGET
Authemail and api_key of your account, as GET or POST parameters: Authentication.
In the panelIP restriction

01 · Parameters

core_nameRequired

The name of your index.

ipRequired

One IPv4 address, such as 203.0.113.10, or all for every address.

handlerRequired

The request handler the address may use: /select for searches, /update for writes, / for every handler.

02 · Example

curl -s "https://opensolr.com/solr_manager/api/add_ip?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_index&ip=203.0.113.10&handler=/"

03 · Answer

{
    "status": true,
    "msg": "IP_ADDED_OK"
}

A new index starts with one rule, all on /. Remove it with delete_ip once your own rules are in place.

04 · Errors

ERROR_INVALID_IP_ADDRESSHTTP 200

ip is not one IPv4 address or all.

ERROR_CANNOT_ADD_MORE_THAN_N_IP_ADDRESSESHTTP 200

The index has as many rules as your plan allows. N is the number of your plan.

ERROR_INVALID_CORE_NAMEHTTP 200

No index name, or the index is not yours.

ERROR_AUTHENTICATION_FAILEDHTTP 403

The email and API key do not match.

ERROR_RATE_LIMIT_PER_MINUTEHTTP 429

Too many calls. Wait for the Retry-After seconds: Rate limits.

05 · Related

List the rules: get_ip_list. Remove one: delete_ip.

Every error code and HTTP status of the API: API errors. Calls per minute and per hour: Rate limits.