Get IP profile
client.ZeroTrust.Devices.IPProfiles.Get(ctx, profileID, query) (*IPProfile, error)
GET/accounts/{account_id}/devices/ip-profiles/{profile_id}
Fetches a single WARP Device IP profile.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
Get IP profile
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/cloudflare-go"
"github.com/stainless-sdks/cloudflare-go/option"
"github.com/stainless-sdks/cloudflare-go/zero_trust"
)
func main() {
client := cloudflare.NewClient(
option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
)
ipProfile, err := client.ZeroTrust.Devices.IPProfiles.Get(
context.TODO(),
"profile_id",
zero_trust.DeviceIPProfileGetParams{
AccountID: cloudflare.F("account_id"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", ipProfile.ID)
}
{
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"result": {
"id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
"created_at": "2025-02-14T13:17:00.123456789Z",
"description": "example comment",
"enabled": true,
"match": "identity.email == \"test@cloudflare.com\"",
"name": "IPv4 Cloudflare Source IPs",
"precedence": 100,
"subnet_id": "b70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
"updated_at": "2025-02-14T13:17:00.123456789Z"
},
"success": true
}Returns Examples
{
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"result": {
"id": "f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
"created_at": "2025-02-14T13:17:00.123456789Z",
"description": "example comment",
"enabled": true,
"match": "identity.email == \"test@cloudflare.com\"",
"name": "IPv4 Cloudflare Source IPs",
"precedence": 100,
"subnet_id": "b70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
"updated_at": "2025-02-14T13:17:00.123456789Z"
},
"success": true
}