Skip to main content
Glama
client_project_policy.go1.14 kB
package sls import ( "fmt" "io/ioutil" ) func (c *Client) GetProjectPolicy(project string) (policy string, err error) { h := map[string]string{ "x-log-bodyrawsize": "0", "Content-Type": "application/json", } uri := "/policy" r, err := c.request(project, "GET", uri, h, nil) if err != nil { return "", err } defer r.Body.Close() buf, err := ioutil.ReadAll(r.Body) if err != nil { return "", readResponseError(err) } policy = string(buf) return policy, nil } func (c *Client) UpdateProjectPolicy(project string, policy string) error { body := []byte(policy) h := map[string]string{ "x-log-bodyrawsize": fmt.Sprintf("%v", len(body)), "Content-Type": "application/json", } uri := "/policy" r, err := c.request(project, "POST", uri, h, body) if err != nil { return err } r.Body.Close() return nil } func (c *Client) DeleteProjectPolicy(project string) error { h := map[string]string{ "x-log-bodyrawsize": "0", "Content-Type": "application/json", } uri := "/policy" r, err := c.request(project, "DELETE", uri, h, nil) if err != nil { return err } r.Body.Close() return nil }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mozillazg/kube-audit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server