curl --request PUT \
--url https://api.portkey.ai/v1/integrations/{slug}/workspaces \
--header 'Content-Type: application/json' \
--header 'x-portkey-api-key: <api-key>' \
--data '
{
"workspaces": [
{
"id": "ws-my-team-1234",
"enabled": true,
"usage_limits": [
{
"credit_limit": 10,
"periodic_reset": "monthly",
"alert_threshold": 8
}
],
"rate_limits": [
{
"type": "requests",
"unit": "rpd",
"value": 123
}
],
"reset_usage": true
}
],
"global_workspace_access": {
"enabled": true,
"usage_limits": [
{
"credit_limit": 10,
"periodic_reset": "monthly",
"alert_threshold": 8
}
],
"rate_limits": [
{
"type": "requests",
"unit": "rpd",
"value": 123
}
]
},
"override_existing_workspace_access": true
}
'{}Updates workspace access permissions, usage limits, and rate limits for an integration. Can configure global workspace access or per-workspace settings.
curl --request PUT \
--url https://api.portkey.ai/v1/integrations/{slug}/workspaces \
--header 'Content-Type: application/json' \
--header 'x-portkey-api-key: <api-key>' \
--data '
{
"workspaces": [
{
"id": "ws-my-team-1234",
"enabled": true,
"usage_limits": [
{
"credit_limit": 10,
"periodic_reset": "monthly",
"alert_threshold": 8
}
],
"rate_limits": [
{
"type": "requests",
"unit": "rpd",
"value": 123
}
],
"reset_usage": true
}
],
"global_workspace_access": {
"enabled": true,
"usage_limits": [
{
"credit_limit": 10,
"periodic_reset": "monthly",
"alert_threshold": 8
}
],
"rate_limits": [
{
"type": "requests",
"unit": "rpd",
"value": 123
}
]
},
"override_existing_workspace_access": true
}
'{}Show child attributes
Workspace ID
"ws-my-team-1234"
Whether to enable workspace access
1Show child attributes
Credit Limit. Used for tracking usage
x >= 1Type of credit limit
cost, tokens Alert Threshold. Used for alerting when usage reaches more than this
x >= 1Reset the usage periodically.
monthly, weekly Whether to reset current usage. If the current status is exhausted, this will change it back to active.
Show child attributes
Whether global workspace access is enabled. When enabled, the integration will be enabled for all workspaces that are created in future.
1Show child attributes
Credit Limit. Used for tracking usage
x >= 1Type of credit limit
cost, tokens Alert Threshold. Used for alerting when usage reaches more than this
x >= 1Reset the usage periodically.
monthly, weekly Whether to override existing workspace access settings
Workspace access updated successfully
The response is of type object.
Was this page helpful?