The base URL for this API is: https://api.leaseweb.com/abuse/v1/
This API provides ways to manage the abuse reports you might receive from Leaseweb.
LIMITED ACCESSTo use this API, please request access via your account mananager and/or compliance officer.
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" : "http://developer.leaseweb.com/errors/APP00800"
}
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.
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 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. |
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'
{- "reports": [
- {
- "id": "000000",
- "subject": "Report description",
- "status": "OPEN",
- "reportedAt": "2015-01-01T00:00:00+00:00",
- "updatedAt": "2015-01-01T00:00:00+00:00",
- "notifier": "notifier@email.com",
- "customerId": "10000001",
- "legalEntityId": "2000",
- "deadline": "2015-01-01T00:00:00+00:00"
}, - {
- "id": "000001",
- "subject": "Report description",
- "status": "CLOSED",
- "reportedAt": "2015-01-01T00:00:00+00:00",
- "updatedAt": "2015-01-01T00:00:00+00:00",
- "notifier": "notifier@email.com",
- "customerId": "10000001",
- "legalEntityId": "2600",
- "deadline": "2015-01-01T00:00:00+00:00"
}
], - "_metadata": {
- "totalCount": 2,
- "limit": 10,
- "offset": 0
}
}
reportId required | string Example: abc123 Report Id |
curl --request GET \ --url https://api.leaseweb.com/abuse/v1/reports/abc123 \ --header 'x-lsw-auth: REPLACE_KEY_VALUE'
{- "id": "000005",
- "subject": "Report description",
- "status": "CLOSED",
- "abuseType": "MALWARE",
- "reopened": false,
- "reportedAt": "2015-01-01T00:00:00+0100",
- "updatedAt": "2015-01-01T00:00:00+0100",
- "notifier": "notifier@email.com",
- "customerId": "10000001",
- "legalEntityId": "2000",
- "body": "string with content",
- "deadline": "2015-01-01T00:00:00+0100",
- "detectedIpAddresses": [
- "127.0.0.1"
], - "detectedDomainNames": [
- {
- "name": "example.com",
- "ipAddresses": [
- "93.184.216.34"
]
}
], - "attachments": [
- {
- "id": "1abd8e7f-0fdf-453c-b1f5-8fef436acbbe",
- "mimeType": "part/xml",
- "filename": "000001.xml"
}
], - "totalMessagesCount": 2,
- "latestMessages": [
- {
- "postedBy": "CUSTOMER",
- "postedAt": "2015-09-30T06:23:40+00:00",
- "body": "Hello, this is my first message!"
}, - {
- "postedBy": "ABUSE_AGENT",
- "postedAt": "2015-10-08T08:25:29+00:00",
- "body": "Hi, this is our first reply.",
- "attachment": {
- "id": "436acbbe-0fdf-453c-b1f5-1abd8e7f8fef",
- "mimeType": "image/png",
- "filename": "notification.png"
}
}
]
}
reportId required | string Example: abc123 Report Id |
limit | integer Default: 10 Limit the number of results returned |
offset | integer Default: 0 Return results starting from the given offset |
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'
{- "messages": [
- {
- "postedBy": "CUSTOMER",
- "postedAt": "2015-09-30T06:23:40+00:00",
- "body": "Hello, this is my first message!"
}, - {
- "postedBy": "ABUSE_AGENT",
- "postedAt": "2015-10-08T08:25:29+00:00",
- "body": "Hi, this is our first reply.",
- "attachment": {
- "id": "436acbbe-0fdf-453c-b1f5-1abd8e7f8fef",
- "mimeType": "image/png",
- "filename": "notification.png"
}
}
], - "_metadata": {
- "totalCount": 2,
- "limit": 10,
- "offset": 0
}
}
Sent a new message to the Leaseweb compliance team related to an abuse report.
reportId required | string Example: abc123 Report Id |
body required | string Plain text body of the message, for newlines use ' '. |
{- "body": "Hello, this is my first message."
}
[- "To make sure the request has been processed please see if the message is added to the list."
]
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.
reportId required | string Example: abc123 Report Id |
fileId required | string Example: sdfa73-adsfs-4fadf-sdfasdfa File Id |
curl --request GET \ --url https://api.leaseweb.com/abuse/v1/reports/abc123/messageAttachments/sdfa73-adsfs-4fadf-sdfasdfa \ --header 'x-lsw-auth: REPLACE_KEY_VALUE'
{- "errorCode": "ACCESS_DENIED",
- "errorMessage": "The access token is expired or invalid."
}
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.
reportId required | string Example: abc123 Report Id |
fileId required | string Example: sdfa73-adsfs-4fadf-sdfasdfa File Id |