---
title: find-a-drain-by-id
product: vercel
url: /docs/rest-api/drains/find-a-drain-by-id
type: reference
prerequisites:
  []
related:
  - /docs/rest-api
summary: Learn about find-a-drain-by-id on Vercel.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# Find a Drain by id

```http
GET /v1/drains/{id}
```

Get the information for a specific Drain by passing the drain id in the URL.

## Authentication

**bearerToken**: HTTP bearer

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | Yes |  |


## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `teamId` | string | No | The Team identifier to perform the request on behalf of. |
| `slug` | string | No | The Team slug to perform the request on behalf of. |


## Responses

### 200: No description

Content-Type: `application/json`

```json
{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "createdAt",
        "delivery",
        "id",
        "name",
        "ownerId",
        "schemas",
        "source",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "createdAt": {
          "type": "number"
        },
        "updatedAt": {
          "type": "number"
        },
        "projectIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "name": {
          "type": "string"
        },
        "teamId": {
          "type": "string",
          "nullable": true
        },
        "ownerId": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled",
            "errored"
          ]
        },
        "firstErrorTimestamp": {
          "type": "number"
        },
        "disabledAt": {
          "type": "number"
        },
        "disabledBy": {
          "type": "string"
        },
        "disabledReason": {
          "type": "string",
          "enum": [
            "disabled-by-owner",
            "feature-not-available",
            "account-plan-downgrade",
            "disabled-by-admin"
          ]
        },
        "schemas": {
          "type": "object",
          "properties": {
            "log": {
              "type": "object"
            },
            "trace": {
              "type": "object"
            },
            "analytics": {
              "type": "object"
            },
            "speed_insights": {
              "type": "object"
            },
            "ai_gateway": {
              "type": "object"
            }
          }
        },
        "delivery": {
          "oneOf": [
            {
              "type": "object",
              "required": [
                "encoding",
                "endpoint",
                "headers",
                "type"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "http"
                  ]
                },
                "endpoint": {
                  "type": "string"
                },
                "encoding": {
                  "type": "string",
                  "enum": [
                    "json",
                    "ndjson"
                  ]
                },
                "compression": {
                  "type": "string",
                  "enum": [
                    "none",
                    "gzip"
                  ]
                },
                "headers": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "secret": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "required": [
                        "kind"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "INTEGRATION_SECRET"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            },
            {
              "type": "object",
              "required": [
                "encoding",
                "endpoint",
                "headers",
                "type"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "otlphttp"
                  ]
                },
                "endpoint": {
                  "type": "object",
                  "required": [
                    "traces"
                  ],
                  "properties": {
                    "traces": {
                      "type": "string"
                    }
                  }
                },
                "encoding": {
                  "type": "string",
                  "enum": [
                    "json",
                    "proto"
                  ]
                },
                "headers": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "secret": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "required": [
                        "kind"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "INTEGRATION_SECRET"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            },
            {
              "type": "object",
              "required": [
                "endpoint",
                "table",
                "type"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "clickhouse"
                  ]
                },
                "endpoint": {
                  "type": "string"
                },
                "table": {
                  "type": "string"
                }
              }
            },
            {
              "type": "object",
              "required": [
                "target",
                "type"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "internal"
                  ]
                },
                "target": {
                  "type": "string",
                  "enum": [
                    "vercel-otel-traces-db"
                  ]
                }
              }
            }
          ]
        },
        "sampling": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "rate",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "head_sampling"
                ]
              },
              "rate": {
                "type": "number"
              },
              "env": {
                "type": "string",
                "enum": [
                  "production",
                  "preview"
                ]
              },
              "requestPath": {
                "type": "string"
              }
            }
          }
        },
        "source": {
          "oneOf": [
            {
              "type": "object",
              "required": [
                "kind"
              ],
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "self-served"
                  ]
                }
              }
            },
            {
              "type": "object",
              "required": [
                "integrationConfigurationId",
                "integrationId",
                "kind"
              ],
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "integration"
                  ]
                },
                "resourceId": {
                  "type": "string"
                },
                "externalResourceId": {
                  "type": "string"
                },
                "integrationId": {
                  "type": "string"
                },
                "integrationConfigurationId": {
                  "type": "string"
                }
              }
            }
          ]
        },
        "filter": {
          "type": "string"
        },
        "filterV2": {
          "oneOf": [
            {
              "type": "object",
              "required": [
                "version"
              ],
              "properties": {
                "version": {
                  "type": "string",
                  "enum": [
                    "v1"
                  ]
                }
              }
            },
            {
              "type": "object",
              "required": [
                "filter",
                "version"
              ],
              "properties": {
                "version": {
                  "type": "string",
                  "enum": [
                    "v2"
                  ]
                },
                "filter": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "type"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "basic"
                          ]
                        },
                        "project": {
                          "type": "object",
                          "properties": {
                            "ids": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "log": {
                          "type": "object",
                          "properties": {
                            "sources": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "build",
                                  "edge",
                                  "lambda",
                                  "static",
                                  "external",
                                  "firewall",
                                  "redirect"
                                ]
                              }
                            },
                            "legacy_excludeCachedStaticAssetLogs": {
                              "type": "boolean",
                              "enum": [
                                false,
                                true
                              ]
                            }
                          }
                        },
                        "deployment": {
                          "type": "object",
                          "properties": {
                            "environments": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "production",
                                  "preview"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "text",
                        "type"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "odata"
                          ]
                        },
                        "text": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                }
              }
            }
          ]
        }
      }
    },
    {
      "type": "object",
      "required": [
        "createdAt",
        "delivery",
        "id",
        "name",
        "ownerId",
        "schemas",
        "source",
        "updatedAt"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "createdAt": {
          "type": "number"
        },
        "updatedAt": {
          "type": "number"
        },
        "projectIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "name": {
          "type": "string"
        },
        "teamId": {
          "type": "string",
          "nullable": true
        },
        "ownerId": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled",
            "errored"
          ]
        },
        "firstErrorTimestamp": {
          "type": "number"
        },
        "disabledAt": {
          "type": "number"
        },
        "disabledBy": {
          "type": "string"
        },
        "disabledReason": {
          "type": "string",
          "enum": [
            "disabled-by-owner",
            "feature-not-available",
            "account-plan-downgrade",
            "disabled-by-admin"
          ]
        },
        "schemas": {
          "type": "object",
          "properties": {
            "log": {
              "type": "object"
            },
            "trace": {
              "type": "object"
            },
            "analytics": {
              "type": "object"
            },
            "speed_insights": {
              "type": "object"
            },
            "ai_gateway": {
              "type": "object"
            }
          }
        },
        "delivery": {
          "oneOf": [
            {
              "type": "object",
              "required": [
                "encoding",
                "endpoint",
                "headers",
                "type"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "http"
                  ]
                },
                "endpoint": {
                  "type": "string"
                },
                "encoding": {
                  "type": "string",
                  "enum": [
                    "json",
                    "ndjson"
                  ]
                },
                "compression": {
                  "type": "string",
                  "enum": [
                    "none",
                    "gzip"
                  ]
                },
                "headers": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "secret": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "required": [
                        "kind"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "INTEGRATION_SECRET"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            },
            {
              "type": "object",
              "required": [
                "encoding",
                "endpoint",
                "headers",
                "type"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "otlphttp"
                  ]
                },
                "endpoint": {
                  "type": "object",
                  "required": [
                    "traces"
                  ],
                  "properties": {
                    "traces": {
                      "type": "string"
                    }
                  }
                },
                "encoding": {
                  "type": "string",
                  "enum": [
                    "json",
                    "proto"
                  ]
                },
                "headers": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "secret": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "required": [
                        "kind"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "INTEGRATION_SECRET"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            },
            {
              "type": "object",
              "required": [
                "endpoint",
                "table",
                "type"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "clickhouse"
                  ]
                },
                "endpoint": {
                  "type": "string"
                },
                "table": {
                  "type": "string"
                }
              }
            },
            {
              "type": "object",
              "required": [
                "target",
                "type"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "internal"
                  ]
                },
                "target": {
                  "type": "string",
                  "enum": [
                    "vercel-otel-traces-db"
                  ]
                }
              }
            }
          ]
        },
        "sampling": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "rate",
              "type"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "head_sampling"
                ]
              },
              "rate": {
                "type": "number"
              },
              "env": {
                "type": "string",
                "enum": [
                  "production",
                  "preview"
                ]
              },
              "requestPath": {
                "type": "string"
              }
            }
          }
        },
        "source": {
          "oneOf": [
            {
              "type": "object",
              "required": [
                "kind"
              ],
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "self-served"
                  ]
                }
              }
            },
            {
              "type": "object",
              "required": [
                "integrationConfigurationId",
                "integrationId",
                "kind"
              ],
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "integration"
                  ]
                },
                "resourceId": {
                  "type": "string"
                },
                "externalResourceId": {
                  "type": "string"
                },
                "integrationId": {
                  "type": "string"
                },
                "integrationConfigurationId": {
                  "type": "string"
                }
              }
            }
          ]
        },
        "filter": {
          "type": "string"
        },
        "filterV2": {
          "oneOf": [
            {
              "type": "object",
              "required": [
                "version"
              ],
              "properties": {
                "version": {
                  "type": "string",
                  "enum": [
                    "v1"
                  ]
                }
              }
            },
            {
              "type": "object",
              "required": [
                "filter",
                "version"
              ],
              "properties": {
                "version": {
                  "type": "string",
                  "enum": [
                    "v2"
                  ]
                },
                "filter": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "type"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "basic"
                          ]
                        },
                        "project": {
                          "type": "object",
                          "properties": {
                            "ids": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          }
                        },
                        "log": {
                          "type": "object",
                          "properties": {
                            "sources": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "build",
                                  "edge",
                                  "lambda",
                                  "static",
                                  "external",
                                  "firewall",
                                  "redirect"
                                ]
                              }
                            },
                            "legacy_excludeCachedStaticAssetLogs": {
                              "type": "boolean",
                              "enum": [
                                false,
                                true
                              ]
                            }
                          }
                        },
                        "deployment": {
                          "type": "object",
                          "properties": {
                            "environments": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "enum": [
                                  "production",
                                  "preview"
                                ]
                              }
                            }
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "text",
                        "type"
                      ],
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "odata"
                          ]
                        },
                        "text": {
                          "type": "string"
                        }
                      }
                    }
                  ]
                }
              }
            }
          ]
        },
        "integrationIcon": {
          "type": "string"
        },
        "integrationConfigurationUri": {
          "type": "string"
        },
        "integrationWebsite": {
          "type": "string"
        },
        "projectAccess": {
          "oneOf": [
            {
              "type": "object",
              "required": [
                "access",
                "managedBy"
              ],
              "properties": {
                "access": {
                  "type": "string",
                  "enum": [
                    "all"
                  ]
                },
                "managedBy": {
                  "type": "string",
                  "enum": [
                    "integration",
                    "drain"
                  ]
                }
              }
            },
            {
              "type": "object",
              "required": [
                "access",
                "managedBy",
                "projectIds"
              ],
              "properties": {
                "access": {
                  "type": "string",
                  "enum": [
                    "some"
                  ]
                },
                "projectIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "managedBy": {
                  "type": "string",
                  "enum": [
                    "integration",
                    "drain"
                  ]
                }
              }
            }
          ]
        }
      }
    }
  ]
}
```

### 400: One of the provided values in the request query is invalid.

### 401: The request is not authorized.

### 403: You do not have permission to access this resource.

### 404: No description

---

## Related

- [drains endpoints](/docs/rest-api#drains)

- [REST API overview](/docs/rest-api)

- [OpenAPI spec](https://openapi.vercel.sh/) (machine-readable, all endpoints)

---

[View full sitemap](/docs/sitemap)
