Update an access-grid rule
const url = 'https://gpu-kitchen.example.lan/api/v1/access-grid/rules/1';const options = { method: 'PUT', headers: {cookie: 'gpuk_session=<gpuk_session>', 'Content-Type': 'application/json'}, body: '{"scope_team_id":"example","subject_type":"all","subject_id":"","resource_type":"all","resource_id":"example","access":"allow","rpm_limit":"","tpm_limit":"","monthly_budget":"example","note":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://gpu-kitchen.example.lan/api/v1/access-grid/rules/1 \ --header 'Content-Type: application/json' \ --cookie gpuk_session=<gpuk_session> \ --data '{ "scope_team_id": "example", "subject_type": "all", "subject_id": "", "resource_type": "all", "resource_id": "example", "access": "allow", "rpm_limit": "", "tpm_limit": "", "monthly_budget": "example", "note": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”Success.
object
Example
{ "subject_type": "all", "resource_type": "all", "access": "allow"}Error codes: validation_error.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: auth_required.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: enterprise_required, forbidden, management_key_read_only, team_lead_required.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: access_grid_rule_not_found.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: access_grid_rule_exists.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: payload_too_large.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}Error codes: rate_limited.
object
object
Stable snake_case code to branch on.
A sentence to show a person.
Optional structured context.
Optional place where the problem is fixed.
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example", "fix": "example" }}