Delete definitions of existing Custom APIs for a given URL pattern and API on your token
Request
| Authentication | |
|---|---|
token | Cache and insert token into example requests (15d expiry) |
| Request body application/json | |
|---|---|
api | The specific API being targeted. Always precede the API name with “/api/” as in |
urlPattern | A regex that defines the URLs corresponding to which the Custom API definitions will be deleted. Make sure that is json-escaped before url-encoding it. |
token | Your token. The Custom API definitions only for this token will be deleted |
Example request
bash
curl --request DELETE \
--url 'https://api.diffbot.com/v3/custom?token=<DIFFBOT_TOKEN>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{}'
Response
| 200Successful API Response | |
|---|---|
token | |
urlPattern | |
api | |
status |
json
{
"api": "/api/discussion",
"token": "TOKEN",
"urlPattern": "examplePattern.com",
"status": "success"
}
| 500Internal Server Error | |
|---|---|
statusCode | |
error |
json
{
"statusCode": 500,
"error": "urlPattern and apiPrefix required to delete rule"
}