Class ArtifactsRequestBuilder.PostQueryParameters
java.lang.Object
io.apicurio.registry.rest.client.v2.groups.item.artifacts.ArtifactsRequestBuilder.PostQueryParameters
- All Implemented Interfaces:
com.microsoft.kiota.QueryParameters
- Enclosing class:
ArtifactsRequestBuilder
@Generated("com.microsoft.kiota")
public class ArtifactsRequestBuilder.PostQueryParameters
extends Object
implements com.microsoft.kiota.QueryParameters
Creates a new artifact by posting the artifact content. The body of the request shouldbe 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 registry attempts to figure out what kind of artifact is being added from thefollowing supported list:* Avro (`AVRO`)* Protobuf (`PROTOBUF`)* JSON Schema (`JSON`)* Kafka Connect (`KCONNECT`)* OpenAPI (`OPENAPI`)* AsyncAPI (`ASYNCAPI`)* GraphQL (`GRAPHQL`)* Web Services Description Language (`WSDL`)* XML Schema (`XSD`)Alternatively, you can specify the artifact type using the `X-Registry-ArtifactType` HTTP request header, or include a hint in the request's `Content-Type`. For example:```Content-Type: application/json; artifactType=AVRO```An artifact is created using the content provided in the body of the request. Thiscontent is created under a unique artifact ID that can be provided in the requestusing the `X-Registry-ArtifactId` request header. If not provided in the request,the server generates a unique ID for the artifact. It is typically recommendedthat callers provide the ID, because this is typically a meaningful identifier, and for most use cases should be supplied by the caller.If an artifact with the provided artifact ID already exists, the default behavioris for the server to reject the content with a 409 error. However, the caller cansupply the `ifExists` query parameter to alter this default behavior. The `ifExists`query parameter can have one of the following values:* `FAIL` (*default*) - server rejects the content with a 409 error* `UPDATE` - server updates the existing artifact and returns the new metadata* `RETURN` - server does not create or add content to the server, but instead returns the metadata for the existing artifact* `RETURN_OR_UPDATE` - server returns an existing **version** that matches the provided content if such a version exists, otherwise a new version is createdThis operation may fail for one of the following reasons:* An invalid `ArtifactType` was indicated (HTTP error `400`)* No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`)* Provided content (request body) was empty (HTTP error `400`)* An artifact with the provided ID already exists (HTTP error `409`)* The content violates one of the configured global rules (HTTP error `409`)* A server error occurred (HTTP error `500`)
-
Field Summary
FieldsModifier and TypeFieldDescriptionUsed only when the `ifExists` query parameter is set to `RETURN_OR_UPDATE`, this parameter can be set to `true` to indicate that the server should "canonicalize" the content when searching for a matching version.Set this option to instruct the server on what to do if the artifact already exists. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExtracts the query parameters into a map for the URI template parsing.
-
Field Details
-
canonical
Used only when the `ifExists` query parameter is set to `RETURN_OR_UPDATE`, this parameter can be set to `true` to indicate that the server should "canonicalize" the content when searching for a matching version. The canonicalization algorithm is unique to each artifact type, but typically involves removing extra whitespace and formatting the content in a consistent manner. -
ifExists
Set this option to instruct the server on what to do if the artifact already exists.
-
-
Constructor Details
-
PostQueryParameters
public PostQueryParameters()
-
-
Method Details