...
...
...
...
Method description
Create a new blacklist item for this instance.
Security
The calling user must have the EB_ROOT, EB_ADMIN, EB_APP, SEARCH_ADMIN or SEARCH_MANAGER role for this instance or the global instance.
Request Parameters
None
Request Data
The POST request must include a single object with the new blacklist data.
It's possible to save various blacklists, including a list of terms in the same petition, separating the terms by comma
See Play Service models for details.
...
the client {instance_id}.
URI Parameters
None
Requests
Body
application/json
Code Block | ||||
---|---|---|---|---|
| ||||
{ "lang": "ES", "terms": ["prueba 1 ES","prueba 2 ES"], } |
Response format and codes
...
See Play Service models for details. All non-optional fields must be included in the request.
Responses
201 - item has been created
...
When a blacklist is successfully created, the response will contain the a list of blacklist saved on the database and a list of blacklists ignored.
Also, a Location header will point to the URL for the blacklist that was just created.
...
Type: application/json
Code Block | ||||
---|---|---|---|---|
| ||||
{
"ignored": [
{
"created_on": "2017-07-10T18:35:30",
"id": null,
"lang": "ES",
"terms": "prueba 5 ES",
"updated_on": null
}
],
"saved": [
{
"created_on": "2017-07-07T12:08:57",
"id": "595f79d9f9cddab1c8170d45",
"lang": "ES",
"terms": "prueba 1 ES",
"updated_on": "2017-07-07T12:08:57"
},
{
"created_on": "2017-07-07T12:08:58",
"id": "595f79daf9cddab1c8170d46",
"lang": "ES",
"terms": "prueba 2 ES",
"updated_on": "2017-07-07T12:08:58"
},
{
"created_on": "2017-07-07T12:08:58",
"id": "595f79daf9cddab1c8170d47",
"lang": "ES",
"terms": "prueba 3 ES",
"updated_on": "2017-07-07T12:08:58"
},
{
"created_on": "2017-07-07T12:08:58",
"id": "595f79daf9cddab1c8170d48",
"lang": "ES",
"terms": "prueba 4 ES",
"updated_on": "2017-07-07T12:08:58"
}
]
} |
When a blacklist is successfully created, the response will contain the a list of blacklist items saved and a list of blacklist items ignored.
Also, a Location header will point to the URL for the boost that was just created.
400 - Invalid parameters. Error response will include details
Type: application/json
Code Block | ||||
---|---|---|---|---|
| ||||
{
"code": "validation_error",
"details": [
{
"message": "1 is not of type 'boolean'",
"path": ".enabled"
}
],
"message": "Error validating JSON",
"status": "error"
} |
401 - the user performing the action doesn't meet the security criteria
Type: application/json
Code Block | ||||
---|---|---|---|---|
| ||||
{
"code": 401,
"details": "The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required.",
"message": "Unauthorized",
"status": "error"
} |