OpenAI 更新工作负载身份提供商
2026-11-18 13:49 更新
更新工作负载身份提供商
post /organization/workload_identity_providers/{workload_identity_provider_id}
更新请求中指定的提供商字段,未提供的字段保留原值。
路径参数
workload_identity_provider_id: string
minLength: 1
请求体参数
内容类型为 application/json。
attribute_transformations: optional array of object { attribute, expression }
maxItems: 20
attribute: string
minLength: 1, maxLength: 256
expression: string
minLength: 1, maxLength: 4096
audience: optional string
minLength: 1
description: optional string or null
enabled: optional boolean
issuer: optional string
minLength: 1
name: optional string
minLength: 1
verification: optional DiscoveryVerificationParam { discovery_url, type } or UploadedJwksVerificationParam { jwks, type }
DiscoveryVerificationParam object { discovery_url, type }
discovery_url: string or null
type: "discovery" (default: "discovery")
"discovery"
UploadedJwksVerificationParam object { jwks, type }
jwks: map[unknown]
type: "uploaded_jwks" (default: "uploaded_jwks")
"uploaded_jwks"
返回值
WorkloadIdentityProvider object { id, attribute_transformations, audience, 9 more }
id: string
attribute_transformations: array of object { attribute, expression }
attribute: string
expression: string
audience: string
created_at: integer
description: string or null
enabled: boolean
issuer: string
name: string
object: "organization.workload_identity_provider" (default: "organization.workload_identity_provider")
"organization.workload_identity_provider"
type: "oidc" (default: "oidc")
"oidc"
updated_at: integer
verification: DiscoveryVerification { discovery_url, type } or UploadedJwksVerification { jwks, type }
DiscoveryVerification object { discovery_url, type }
discovery_url: string or null
type: "discovery" (default: "discovery")
"discovery"
UploadedJwksVerification object { jwks, type }
jwks: map[unknown]
type: "uploaded_jwks" (default: "uploaded_jwks")
"uploaded_jwks"
示例
## 从环境变量读取管理员密钥。核对目标资源 ID 和更新字段(身份提供商)
curl "https://api.openai.com/v1/organization/workload_identity_providers/$WORKLOAD_IDENTITY_PROVIDER_ID" \
-X POST \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY"
200 — 通用响应示例
{
"id": "id",
"attribute_transformations": [
{
"attribute": "attribute",
"expression": "expression"
}
],
"audience": "audience",
"created_at": 0,
"description": "description",
"enabled": true,
"issuer": "issuer",
"name": "name",
"object": "organization.workload_identity_provider",
"type": "oidc",
"updated_at": 0,
"verification": {
"discovery_url": "discovery_url",
"type": "discovery"
}
}
示例
## 从环境变量读取管理员密钥。核对目标资源 ID 和更新字段(身份提供商)
curl -X POST "https://api.openai.com/v1/organization/workload_identity_providers/wip_example" \
-H "Authorization: Bearer $OPENAI_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": false
}'
响应示例
{
"object": "organization.workload_identity_provider",
"id": "wip_example",
"type": "oidc",
"name": "CI provider",
"issuer": "https://issuer.example.com",
"audience": "openai",
"verification": {
"type": "discovery",
"discovery_url": null
},
"description": null,
"attribute_transformations": [],
"enabled": false,
"created_at": 1793664000,
"updated_at": 1793664000
}以上内容是否对您有帮助:

TRAE-AI编程


更多建议: