Update a check
PATCH
https://api.vercel.com/v1/deployments/{deploymentId}/checks/{checkId}Update an existing check. This endpoint must be called with an OAuth2 or it will produce a 400 error.
This endpoint is deprecated
Request
package main
import( "os" "github.com/vercel/vercel" "context" "github.com/vercel/vercel/models/operations" "log")
func main() { s := vercel.New( vercel.WithSecurity(os.Getenv("VERCEL_BEARER_TOKEN")), )
ctx := context.Background() res, err := s.Checks.UpdateCheck(ctx, operations.UpdateCheckRequest{ DeploymentID: "dpl_2qn7PZrx89yxY34vEZPD31Y9XVj6", CheckID: "check_2qn7PZrx89yxY34vEZPD31Y9XVj6", RequestBody: &operations.UpdateCheckRequestBody{ Name: vercel.String("Performance Check"), Path: vercel.String("/"), DetailsURL: vercel.String("https://example.com/check/run/1234abc"), Output: &operations.Output{ Metrics: &operations.Metrics{ Fcp: operations.Fcp{ Value: vercel.Float64(1200), PreviousValue: vercel.Float64(900), Source: operations.UpdateCheckSourceWebVitals, }, Lcp: operations.Lcp{ Value: vercel.Float64(1200), PreviousValue: vercel.Float64(1000), Source: operations.UpdateCheckChecksSourceWebVitals, }, Cls: operations.Cls{ Value: vercel.Float64(4), PreviousValue: vercel.Float64(2), Source: operations.UpdateCheckChecksRequestSourceWebVitals, }, Tbt: operations.Tbt{ Value: vercel.Float64(3000), PreviousValue: vercel.Float64(3500), Source: operations.UpdateCheckChecksRequestRequestBodySourceWebVitals, }, VirtualExperienceScore: &operations.VirtualExperienceScore{ Value: vercel.Int64(30), PreviousValue: vercel.Int64(35), Source: operations.UpdateCheckChecksRequestRequestBodyOutputSourceWebVitals, }, }, }, ExternalID: vercel.String("1234abc"), }, }) if err != nil { log.Fatal(err) } if res.Object != nil { // handle response }}Response
{ "blocking": "false", "completedAt": "123", "conclusion": "canceled", "createdAt": "123", "deploymentId": "example_id", "detailsUrl": "https://example.com", "externalId": "example_id", "id": "icfg_1234567890", "integrationId": "example_id", "name": "Example Name", "output": { "metrics": { "CLS": { "previousValue": "123", "source": "web-vitals", "value": "123" }, "FCP": { "previousValue": "123", "source": "web-vitals", "value": "123" }, "LCP": { "previousValue": "123", "source": "web-vitals", "value": "123" }, "TBT": { "previousValue": "123", "source": "web-vitals", "value": "123" }, "virtualExperienceScore": { "previousValue": "123", "source": "web-vitals", "value": "123" } } }, "path": "string", "rerequestable": "false", "startedAt": "123", "status": "completed", "updatedAt": "123"}AuthorizationbearerToken
Default authentication mechanism
application/json
200Success
400One of the provided values in the request body is invalid.
One of the provided values in the request query is invalid.
The provided token is not from an OAuth2 Client
401The request is not authorized.
403You do not have permission to access this resource.
404Check was not found
The deployment was not found
410Error
413The output provided is too large