OpenapiIam
Changes a provider's settings or rotates the credentials it holds.
Changes a provider's settings or rotates the credentials it holds.
POST /v1/iam/providers/update
| Address | https://api.hanzo.ai/v1/iam/providers/update |
| Method | POST |
| Operation | updateProvider |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Changes a provider's settings or rotates the credentials it holds. The change takes effect on the next sign-in through it — sessions already issued are unaffected.
A provider that is not there answers "nothing changed" rather than an error, so the call is safe to repeat.
Request
50 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
appId | body | string | — | |
bucket | body | string | — | |
category | body | string | — | |
cert | body | string | — | |
clientId | body | string | — | |
clientId2 | body | string | — | |
clientSecret | body | string | — | |
clientSecret2 | body | string | — | |
content | body | string | — | |
createdAt | body | string (date-time) | — | |
createdTime | body | string | — | |
customAuthUrl | body | string | — | |
customLogo | body | string | — | |
customTokenUrl | body | string | — | |
customUserInfoUrl | body | string | — | |
deleted | body | boolean | — | |
disableSsl | body | boolean | — | |
displayName | body | string | — | |
domain | body | string | — | |
emailRegex | body | string | — | |
enablePkce | body | boolean | — | |
enableProxy | body | boolean | — | |
enableSignAuthnRequest | body | boolean | — | |
endpoint | body | string | — | |
host | body | string | — | |
httpHeaders | body | object | — | |
httpHeaders.* | body | string | — | |
id | body | string | — | |
idP | body | string | — | |
intranetEndpoint | body | string | — | |
issuerUrl | body | string | — | |
metadata | body | string | — | |
method | body | string | — | |
name | body | string | — | |
owner | body | string | — | |
pathPrefix | body | string | — | |
port | body | integer | — | |
providerUrl | body | string | — | |
receiver | body | string | — | |
regionId | body | string | — | |
scopes | body | string | — | |
signName | body | string | — | |
sslMode | body | string | — | |
subType | body | string | — | |
templateCode | body | string | — | |
title | body | string | — | |
type | body | string | — | |
updatedAt | body | string (date-time) | — | |
userMapping | body | object | — | |
userMapping.* | body | string | — |
Response
| Status | Body | Meaning |
|---|---|---|
200 | iam.mutationResult | ok |
200 body — 52 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
affected | body | boolean | — | |
provider | body | iam.Provider | — | |
provider.appId | body | string | — | |
provider.bucket | body | string | — | |
provider.category | body | string | — | |
provider.cert | body | string | — | |
provider.clientId | body | string | — | |
provider.clientId2 | body | string | — | |
provider.clientSecret | body | string | — | |
provider.clientSecret2 | body | string | — | |
provider.content | body | string | — | |
provider.createdAt | body | string (date-time) | — | |
provider.createdTime | body | string | — | |
provider.customAuthUrl | body | string | — | |
provider.customLogo | body | string | — | |
provider.customTokenUrl | body | string | — | |
provider.customUserInfoUrl | body | string | — | |
provider.deleted | body | boolean | — | |
provider.disableSsl | body | boolean | — | |
provider.displayName | body | string | — | |
provider.domain | body | string | — | |
provider.emailRegex | body | string | — | |
provider.enablePkce | body | boolean | — | |
provider.enableProxy | body | boolean | — | |
provider.enableSignAuthnRequest | body | boolean | — | |
provider.endpoint | body | string | — | |
provider.host | body | string | — | |
provider.httpHeaders | body | object | — | |
provider.httpHeaders.* | body | string | — | |
provider.id | body | string | — | |
provider.idP | body | string | — | |
provider.intranetEndpoint | body | string | — | |
provider.issuerUrl | body | string | — | |
provider.metadata | body | string | — | |
provider.method | body | string | — | |
provider.name | body | string | — | |
provider.owner | body | string | — | |
provider.pathPrefix | body | string | — | |
provider.port | body | integer | — | |
provider.providerUrl | body | string | — | |
provider.receiver | body | string | — | |
provider.regionId | body | string | — | |
provider.scopes | body | string | — | |
provider.signName | body | string | — | |
provider.sslMode | body | string | — | |
provider.subType | body | string | — | |
provider.templateCode | body | string | — | |
provider.title | body | string | — | |
provider.type | body | string | — | |
provider.updatedAt | body | string (date-time) | — | |
provider.userMapping | body | object | — | |
provider.userMapping.* | body | string | — |
Failure carries the platform error shape — see Errors.
Examples
hanzo iam providers updateimport { Configuration, IamApi } from 'hanzoai';
const api = new IamApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.updateProvider({ appId: "<appId>", bucket: "<bucket>" });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import IamApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = IamApi(client).update_provider(app_id="<appId>", bucket="<bucket>")cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.IamAPI.UpdateProvider(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, iam_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = iam_api::update_provider(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.IamApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new IamApi(client).updateProvider();curl -X POST https://api.hanzo.ai/v1/iam/providers/update \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"appId": "<appId>",
"bucket": "<bucket>"
}'Tool iam, op updateProvider — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "iam",
"arguments": {
"op": "updateProvider",
"input": {
"appId": "<appId>",
"bucket": "<bucket>"
}
}
}
}'How is this guide?