Leaseweb API for Abuse Handling (v1)

License: Apache 2.0

This API provides ways to manage the abuse reports you might receive from Leaseweb. To use this API, please request access via your account manager and/or compliance officer. LIMITED ACCESS

Errors

The API uses standard HTTP status codes to indicate the success or failure of the API call. The response will be JSON. Most APIs use the following format:

{
    "errorCode": "APP00800",
    "errorMessage": "The connection with the DB cannot be established.",
    "correlationId": "550e8400-e29b-41d4-a716-446655440000",
    "userMessage": "Cannot handle your request at the moment. Please try again later.",
    "reference": "https://developer.leaseweb.com/errors/APP00800"
}

API Key Authentication

Authentication for the APIs is required. To authenticate your call, you will need to sent your API key as X-LSW-Auth header.

You can generate API keys in the Customer Portal.

Abuse Reports

List reports

List reports

Authorizations:
X-LSW-Auth
query Parameters
limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

status
string
Default: "OPEN,WAITING,CLOSED"
Example: status=OPEN,WAITING,CLOSED

Comma separated list of report statuses to filter on.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/abuse/v1/reports?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE&status=SOME_STRING_VALUE' \
  --header 'X-LSW-Auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "reports": [
    ]
}

Inspect a report

Authorizations:
X-LSW-Auth
path Parameters
reportId
required
string
Example: abc123

Report Id

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123 \
  --header 'X-LSW-Auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "abuseType": "MALLWARE",
  • "attachments": [
    ],
  • "body": "string with content",
  • "customerId": "10000001",
  • "deadline": "2015-01-01T00:00:00+0100",
  • "detectedDomainNames": [
    ],
  • "detectedIpAddresses": [
    ],
  • "id": "000005",
  • "latestMessages": [
    ],
  • "legalEntityId": "2000",
  • "notifier": "notifier@email.com",
  • "reopened": false,
  • "reportedAt": "2015-01-01T00:00:00+0100",
  • "status": "CLOSED",
  • "subject": "Report description",
  • "totalMessagesCount": 2,
  • "updatedAt": "2015-01-01T00:00:00+0100"
}

List report messages

Authorizations:
X-LSW-Auth
path Parameters
reportId
required
string
Example: abc123

Report Id

query Parameters
limit
integer
Example: limit=20

Limit the number of results returned.

offset
integer
Example: offset=10

Return results starting from the given offset.

Responses

Request samples

curl --request GET \
  --url 'https://api.leaseweb.com/abuse/v1/reports/abc123/messages?limit=SOME_INTEGER_VALUE&offset=SOME_INTEGER_VALUE' \
  --header 'X-LSW-Auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "_metadata": {
    },
  • "messages": [
    ]
}

Create new message

Sent a new message to the Leaseweb compliance team related to an abuse report.

Authorizations:
X-LSW-Auth
path Parameters
reportId
required
string
Example: abc123

Report Id

Request Body schema: application/json
body
required
string

Plain text body of the message, for newlines use ' '.

Responses

Request samples

Content type
application/json
{
  • "body": "Hello, this is my first message."
}

Response samples

Content type
application/json
[
  • "To make sure the request has been processed please see if the message is added to the list."
]

Inspect a message attachment

The compliance team sometimes add an attachment to a message. You can use this endpoint to get the attachment. The content-type of the response depends on the content of the attachment.

Authorizations:
X-LSW-Auth
path Parameters
reportId
required
string
Example: abc123

Report Id

fileId
required
string
Example: sdfa73-adsfs-4fadf-sdfasdfa

File Id

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123/messageAttachments/sdfa73-adsfs-4fadf-sdfasdfa \
  --header 'X-LSW-Auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
  • "errorCode": "401",
  • "errorMessage": "You are not authorized to view this resource."
}

Inspect a report attachment

Use this endpoint to get an attachment which was created with the abuse report. The content-type of the response depends on the content of the attachment.

Authorizations:
X-LSW-Auth
path Parameters
reportId
required
string
Example: abc123

Report Id

fileId
required
string
Example: sdfa73-adsfs-4fadf-sdfasdfa

File Id

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123/reportAttachments/sdfa73-adsfs-4fadf-sdfasdfa \
  --header 'X-LSW-Auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
  • "errorCode": "401",
  • "errorMessage": "You are not authorized to view this resource."
}

List resolution options

In order to resolve a report, you need to specify a resolution. Use this endpoint to retrieve a list of all possible resolution options for this report.

Authorizations:
X-LSW-Auth
path Parameters
reportId
required
string
Example: abc123

Report Id

Responses

Request samples

curl --request GET \
  --url https://api.leaseweb.com/abuse/v1/reports/abc123/resolutions \
  --header 'X-LSW-Auth: REPLACE_KEY_VALUE'

Response samples

Content type
application/json
{
  • "isMessageRequired": false,
  • "resolutions": [
    ]
}

Resolve a report

Resolve a report

Authorizations:
X-LSW-Auth
path Parameters
reportId
required
string
Example: abc123

Report Id

Request Body schema: application/json
resolutions
required
Array of strings (resolutionList)

List of selected resolution ID's to explain how the report is resolved.

message
string

Message is required and only allowed if any of the IP(s) related to this report are null routed.

Responses

Request samples

Content type
application/json
{
  • "message": "The IP address associated with this report has been null routed due to policy violations. Further access will be restricted until the issue is resolved.",
  • "resolutions": [
    ]
}

Response samples

Content type
application/json
{
  • "correlationId": "289346a1-3eaf-4da4-b707-62ef12eb08be",
  • "errorCode": "400",
  • "errorDetails": { },
  • "errorMessage": "The API could not interpret your request correctly."
}