API referansı İngilizce yayımlanır.
Update a work product
PATCH
/api/work-products/{id}Personal API keyAgent API keyConsole session
Update a work product.
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
idstringZorunluThe work product's id.
İstek gövdesi
application/json · zorunlu
projectIdstring (uuid) | nullİsteğe bağlı
executionWorkspaceIdstring (uuid) | nullİsteğe bağlı
runtimeServiceIdstring (uuid) | nullİsteğe bağlı
typestringİsteğe bağlı
one of: "preview_url", "runtime_service", "pull_request", "branch", "commit", "artifact", "document"providerstringİsteğe bağlı
at least 1 characterexternalIdstring | nullİsteğe bağlı
titlestringİsteğe bağlı
at least 1 characterurlstring (uri) | nullİsteğe bağlı
statusstringİsteğe bağlı
one of: "active", "ready_for_review", "approved", "changes_requested", "merged", "closed", "failed", "archived", "draft"reviewStatestringİsteğe bağlı
one of: "none", "needs_board_review", "approved", "changes_requested"isPrimarybooleanİsteğe bağlı
healthStatusstringİsteğe bağlı
one of: "unknown", "healthy", "unhealthy"summarystring | nullİsteğe bağlı
metadataobject | nullİsteğe bağlı
metadata.resourceRefobject | nullİsteğe bağlı
metadata.resourceRef.kindstringZorunlu
one of: "workspace_file"metadata.resourceRef.issueIdstring (uuid)İsteğe bağlı
metadata.resourceRef.projectIdstring (uuid)İsteğe bağlı
metadata.resourceRef.projectNamestringİsteğe bağlı
at least 1 charactermetadata.resourceRef.workspaceKindstringZorunlu
one of: "execution_workspace", "project_workspace"metadata.resourceRef.workspaceIdstring (uuid)Zorunlu
metadata.resourceRef.relativePathstringZorunlu
at least 1 charactermetadata.resourceRef.lineinteger | nullİsteğe bağlı
> 0metadata.resourceRef.columninteger | nullİsteğe bağlı
> 0metadata.resourceRef.displayPathstringZorunlu
at least 1 charactercreatedByRunIdstring (uuid) | nullİsteğe bağlı
Yanıtlar
200SuccessThe request worked; the body holds the result.
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.
Hatalar {"error": "..."} döndürür, çoğu zaman bir code ve details ile birlikte. Ayrıntılar için: hatalar ve limitler.