API Reference / Permissions
List assignable policies
Returns the named policies that can be granted to memberships and API keys, each with the permissions it includes.
/ accounts. v1. Accounts/ ListPoliciesRequest body
application/jsonRequired
Request for one page of the policies that can be granted. Available to any signed-in caller.
cursor?stringOpaque cursor from a previous ListPoliciesResponse.next_cursor. Empty for the first page.
limit?integerMaximum number of policies to return, up to 100. Zero uses the default of 100. A larger value is rejected with invalid_argument.
Format"int32"
Response body
application/json
Success
nextCursor?stringCursor to pass as cursor to fetch the next page. Empty when this is the last page.
policies?array<Policy>The policies on this page, each with its permissions, in a fixed order.
Show attributes
name?stringThe policy's name as used in policies fields: "trading", "steam", "proxies", "analytics", "csfloat", "csfloat-wallets" or "administration".
permissions?array<string>The permissions the policy grants.
Value in"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_"PERMISSION_
application/json
The request was malformed, such as a missing required field or an unparseable cursor.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request lacks a valid API key in the Authorization header.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The API key is not allowed to perform this action on this workspace.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
The request was rate limited. Slow down and retry later.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
application/json
An internal server error occurred.
codestringThe Connect error code, such as "not_found".
details?array<object>Optional machine-readable error details.
messagestringA human-readable description of the error.
curl -X POST "https://api.goldmine.to/accounts.v1.Accounts/ListPolicies" \
-H "Authorization: Bearer $CSTRADER_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch("https://api.goldmine.to/accounts.v1.Accounts/ListPolicies", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.CSTRADER_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const data = await res.json();body := strings.NewReader(`{}`)
req, err := http.NewRequestWithContext(ctx, http.MethodPost, "https://api.goldmine.to/accounts.v1.Accounts/ListPolicies", body)
if err != nil {
return err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("CSTRADER_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)import os, requests
res = requests.post(
"https://api.goldmine.to/accounts.v1.Accounts/ListPolicies",
headers={"Authorization": f"Bearer {os.environ['CSTRADER_API_KEY']}"},
json={},
)
data = res.json(){
"policies": [
{
"name": "trading",
"permissions": [
"PERMISSION_VIEW_CONTRACTS",
"PERMISSION_MANAGE_CONTRACTS",
"PERMISSION_VIEW_PURCHASES",
"PERMISSION_MANAGE_PURCHASES"
]
},
{
"name": "analytics",
"permissions": [
"PERMISSION_VIEW_ANALYTICS"
]
}
]
}{
"code": "invalid_argument",
"message": "The request was malformed, such as a missing required field or an unparseable cursor."
}{
"code": "unauthenticated",
"message": "The request lacks a valid API key in the Authorization header."
}{
"code": "permission_denied",
"message": "The API key is not allowed to perform this action on this workspace."
}{
"code": "resource_exhausted",
"message": "The request was rate limited. Slow down and retry later."
}{
"code": "internal",
"message": "An internal server error occurred."
}