import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const proxy = await client.proxies.create({ type: 'datacenter' });
console.log(proxy.id);{
"type": "datacenter",
"id": "<string>",
"name": "<string>",
"protocol": "https",
"status": "available",
"last_checked": "2023-11-07T05:31:56Z",
"config": {
"country": "US"
}
}Create a new proxy configuration for the caller’s organization.
import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const proxy = await client.proxies.create({ type: 'datacenter' });
console.log(proxy.id);{
"type": "datacenter",
"id": "<string>",
"name": "<string>",
"protocol": "https",
"status": "available",
"last_checked": "2023-11-07T05:31:56Z",
"config": {
"country": "US"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Configuration for routing traffic through a proxy.
Proxy type to use. In terms of quality for avoiding bot-detection, from best to worst: mobile > residential > isp > datacenter.
datacenter, isp, residential, mobile, custom Readable name of the proxy.
Protocol to use for the proxy connection.
http, https Configuration specific to the selected proxy type.
Show child attributes
Proxy created successfully
Configuration for routing traffic through a proxy.
Proxy type to use. In terms of quality for avoiding bot-detection, from best to worst: mobile > residential > isp > datacenter.
datacenter, isp, residential, mobile, custom Readable name of the proxy.
Protocol to use for the proxy connection.
http, https Current health status of the proxy.
available, unavailable Timestamp of the last health check performed on this proxy.
Configuration specific to the selected proxy type.
Show child attributes