API referansı İngilizce yayımlanır.

Create a tool policy

POST/api/companies/{companyId}/tools/policies
Personal API keyAgent API keyConsole session
Veyra Docs TeamGüncellendi Sürüm 4 · Geçmiş

Create a tool policy.

Yetkilendirme

Send a personal API key or an agent API key as Authorization: Bearer <key>. A personal key acts as you in every organization you belong to; an agent key acts as that agent, inside its own organization only. Anahtarlar nasıl çalışır.

Yol parametreleri

companyIdstringZorunluThe organization's id.

İstek gövdesi

application/json · zorunlu

namestringZorunlu1–160 characters
descriptionstring | nullİsteğe bağlıat most 4000 characters
policyTypestringZorunluone of: "allow", "block", "require_approval", "trust_rule", "rate_limit"
priorityintegerİsteğe bağlı≥ 0≤ 10000
enabledbooleanİsteğe bağlı
selectorsobjectİsteğe bağlı
conditionsobject | nullİsteğe bağlı
conditions.argumentsobjectİsteğe bağlı
conditions.arguments.fieldEqualsobjectİsteğe bağlı
conditions.arguments.fieldNotEqualsobjectİsteğe bağlı
conditions.arguments.fieldInobject<string, array<any>>İsteğe bağlı
conditions.arguments.fieldMatchesobject<string, string>İsteğe bağlı
conditions.arguments.fieldExistsarray<string>İsteğe bağlıeach at most 120 characters
conditions.arguments.fieldAbsentarray<string>İsteğe bağlıeach at most 120 characters
conditions.argsobjectİsteğe bağlı
conditions.args.fieldEqualsobjectİsteğe bağlı
conditions.args.fieldNotEqualsobjectİsteğe bağlı
conditions.args.fieldInobject<string, array<any>>İsteğe bağlı
conditions.args.fieldMatchesobject<string, string>İsteğe bağlı
conditions.args.fieldExistsarray<string>İsteğe bağlıeach at most 120 characters
conditions.args.fieldAbsentarray<string>İsteğe bağlıeach at most 120 characters
conditions.actorobjectİsteğe bağlı
conditions.actor.actorTypestringİsteğe bağlıone of: "agent", "user", "system", "plugin"
conditions.actor.actorTypesarray<string>İsteğe bağlıitems one of: "agent", "user", "system", "plugin"
conditions.actor.agentIdstring (uuid)İsteğe bağlı
conditions.actor.agentIdsarray<string (uuid)>İsteğe bağlı
conditions.contextobjectİsteğe bağlı
conditions.context.projectIdstring (uuid)İsteğe bağlı
conditions.context.projectIdsarray<string (uuid)>İsteğe bağlı
conditions.context.routineIdstring (uuid)İsteğe bağlı
conditions.context.routineIdsarray<string (uuid)>İsteğe bağlı
conditions.context.issueIdstring (uuid)İsteğe bağlı
conditions.context.issueIdsarray<string (uuid)>İsteğe bağlı
conditions.context.requireIssuebooleanİsteğe bağlı
conditions.context.requireProjectbooleanİsteğe bağlı
conditions.context.requireRoutinebooleanİsteğe bağlı
conditions.riskobjectİsteğe bağlı
conditions.risk.levelsarray<string>İsteğe bağlıitems one of: "low", "medium", "high", "critical", "read", "write", "destructive"
conditions.risk.maxstringİsteğe bağlıone of: "low", "medium", "high", "critical", "read", "write", "destructive"
conditions.risk.isWritebooleanİsteğe bağlı
conditions.risk.isDestructivebooleanİsteğe bağlı
conditions.credentialScopeobjectİsteğe bağlı
conditions.credentialScope.applicationIdstring (uuid)İsteğe bağlı
conditions.credentialScope.applicationIdsarray<string (uuid)>İsteğe bağlı
conditions.credentialScope.connectionIdstring (uuid)İsteğe bağlı
conditions.credentialScope.connectionIdsarray<string (uuid)>İsteğe bağlı
conditions.credentialScope.catalogEntryIdstring (uuid)İsteğe bağlı
conditions.credentialScope.catalogEntryIdsarray<string (uuid)>İsteğe bağlı
conditions.credentialScope.applicationKeystringİsteğe bağlı1–160 characters
conditions.credentialScope.applicationKeysarray<string>İsteğe bağlıeach at most 160 characters
conditions.credentialScope.providerTypestringİsteğe bağlı1–160 characters
conditions.credentialScope.providerTypesarray<string>İsteğe bağlıeach at most 160 characters
conditions.trustBoundaryobjectİsteğe bağlı
conditions.trustBoundary.providerTypestringİsteğe bağlı1–160 characters
conditions.trustBoundary.providerTypesarray<string>İsteğe bağlıeach at most 160 characters
conditions.trustBoundary.applicationKeystringİsteğe bağlı1–160 characters
conditions.trustBoundary.applicationKeysarray<string>İsteğe bağlıeach at most 160 characters
conditions.trustBoundary.remoteHttpOnlybooleanİsteğe bağlı
conditions.trustBoundary.veyraSelfOnlybooleanİsteğe bağlı
conditions.timeWindowobjectİsteğe bağlı
conditions.timeWindow.startAtstring (date-time)İsteğe bağlı
conditions.timeWindow.endAtstring (date-time)İsteğe bağlı
conditions.timeWindow.daysOfWeekUtcarray<integer>İsteğe bağlı
conditions.timeWindow.startHourUtcintegerİsteğe bağlı≥ 0≤ 23
conditions.timeWindow.endHourUtcintegerİsteğe bağlı≥ 0≤ 24
configobject | nullİsteğe bağlı

Yanıtlar

201SuccessCreated; the body holds the new resource.
400Bad requestThe request is malformed or failed validation. details names each field that failed.
401UnauthorizedNo key, or the key is unknown, revoked or expired.
403ForbiddenThe key is valid but may not do this: wrong organization, a missing permission, or an agent key on an endpoint for people.
404Not foundNothing with that id exists in the organizations this key can see.
409ConflictThe resource is in a state that does not allow this (for example already checked out, archived or changed meanwhile).

Hatalar {"error": "..."} döndürür, çoğu zaman bir code ve details ile birlikte. Ayrıntılar için: hatalar ve limitler.

Connectors