> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://developers.alephant.io/api-reference/saa-s-api/policies/list-policies/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.alephant.io/_mcp/server. # List policies GET https://alephant.io/api/v1/policies List all policies for the workspace with optional type, tier, enabled, page, pageSize (10-policies.md endpoint 1). Reference: https://developers.alephant.io/api-reference/saa-s-api/policies/list-policies ## Servers - `https://alephant.io` (Production, default) - `https://dev.alephant.io` (Development) ## Request ### Query parameters - `type` (string, optional) — Filter by type: budget, rate_limit, security, etc. - `tier` (string, optional) — Filter by tier - `enabled` (boolean, optional) — Filter by enabled - `page` (integer, optional) — Page number (default 1) - `pageSize` (integer, optional) — Page size, max 100 (default 20) ## Response ### 200 OK - `data` (list of github_com_alephant_backend-saas-service_internal_api_dto.PolicyItem, optional) - `meta` (github_com_alephant_backend-saas-service_internal_api_dto.Meta, optional) ## Errors ### 401 Unauthorized Error UNAUTHORIZED - `code` (string, optional) - `message` (string, optional) ### 500 Internal Server Error Internal Server Error - `code` (string, optional) - `message` (string, optional) ## Types ### github_com_alephant_backend-saas-service_internal_api_dto.PolicyItem - `appliedTo` (list of string, optional) - `comingSoon` (boolean, optional) - `config` (map from string to any, optional) - `createdAt` (string, optional) - `description` (string, optional) - `details` (string, optional) - `enabled` (boolean, optional) - `id` (string, optional) - `name` (string, optional) - `priority` (integer, optional) - `readonly` (boolean, optional) - `rules` (list of github_com_alephant_backend-saas-service_internal_api_dto.PolicyRule, optional) - `tier` (string, optional) - `type` (string, optional) - `updatedAt` (string, optional) ### github_com_alephant_backend-saas-service_internal_api_dto.Meta - `page` (integer, optional) - `pageSize` (integer, optional) - `total` (integer, optional) - `totalPages` (integer, optional) ### github_com_alephant_backend-saas-service_internal_api_dto.PolicyRule - `label` (string, optional) - `value` (string, optional) ## Examples **Response** ```json { "data": [ { "appliedTo": [ "string" ], "comingSoon": true, "config": {}, "createdAt": "string", "description": "string", "details": "string", "enabled": true, "id": "string", "name": "string", "priority": 1, "readonly": true, "rules": [ { "label": "string", "value": "string" } ], "tier": "string", "type": "string", "updatedAt": "string" } ], "meta": { "page": 1, "pageSize": 1, "total": 1, "totalPages": 1 } } ``` **SDK Code** ```python import requests url = "https://alephant.io/api/v1/policies" response = requests.get(url) print(response.json()) ``` ```javascript const url = 'https://alephant.io/api/v1/policies'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://alephant.io/api/v1/policies" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://alephant.io/api/v1/policies") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://alephant.io/api/v1/policies") .asString(); ``` ```php request('GET', 'https://alephant.io/api/v1/policies'); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://alephant.io/api/v1/policies"); var request = new RestRequest(Method.GET); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let request = NSMutableURLRequest(url: NSURL(string: "https://alephant.io/api/v1/policies")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```