---
title: "Test update artifact"
method: PUT
path: "/groups/{groupId}/artifacts/{artifactId}/test"
tags: ["Artifact rules"]
---

# Test update artifact

`PUT /groups/{groupId}/artifacts/{artifactId}/test`

Tests whether an update to the artifact's content *would* succeed for the provided content.
Ultimately, this applies any rules configured for the artifact against the given content
to determine whether the rules would pass or fail, but without actually updating the artifact
content.

The body of the request should be the raw content of the artifact.  This is typically in 
JSON format for *most* of the supported types, but may be in another format for a few 
(for example, `PROTOBUF`).

The update could fail for a number of reasons including:

* Provided content (request body) was empty (HTTP error `400`)
* No artifact with the `artifactId` exists (HTTP error `404`)
* The new content violates one of the rules configured for the artifact (HTTP error `409`)
* The provided artifact type is not recognized (HTTP error `404`)
* A server error occurred (HTTP error `500`)

When successful, this operation simply returns a *No Content* response.  This response
indicates that the content is valid against the configured content rules for the 
artifact (or the global rules if no artifact rules are enabled).

## Response `204`

When successful, returns "No Content" to indicate that the rules passed, and the
content was not updated.

## Other responses

- `401` — Common response for all operations that can return a `401` error indicating authentication is required.
- `403` — Common response for all operations that can return a `403` error indicating the user is authenticated but not authorized.
- `404` — Common response for all operations that can return a `404` error.
- `409` — Common response used when an input conflicts with existing data.
- `500` — Common response for all operations that can fail with an unexpected server error.

---

[API](https://skmtc.net/apicurio/apis/apicurio-registry-api-v2.md) · [All operations](https://skmtc.net/apicurio/apis/apicurio-registry-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apicurio/apicurio-registry-api-v2/revisions/f177177d6a5a/schema)
