action apicurio_create_artifact { label: "Create artifact" description: "Creates a new artifact by posting the artifact content. The body of the request should\nbe the raw content of the artifact. This is typically in JSON format for *most* of the \nsupported types, but may be in another format for a few (for example, `PROTOBUF`).\n\nThe registry attempts to figure out what kind of artifact is being added from the\nfollowing supported list:\n\n* Avro (`AVRO`)\n* Protobuf (`PROTOBUF`)\n* JSON Schema (`JSON`)\n* Kafka Connect (`KCONNECT`)\n* OpenAPI (`OPENAPI`)\n* AsyncAPI (`ASYNCAPI`)\n* GraphQL (`GRAPHQL`)\n* Web Services Description Language (`WSDL`)\n* XML Schema (`XSD`)\n\nAlternatively, you can specify the artifact type using the `X-Registry-ArtifactType` \nHTTP request header, or include a hint in the request's `Content-Type`. For example:\n\n```\nContent-Type: application/json; artifactType=AVRO\n```\n\nAn artifact is created using the content provided in the body of the request. This\ncontent is created under a unique artifact ID that can be provided in the request\nusing the `X-Registry-ArtifactId` request header. If not provided in the request,\nthe server generates a unique ID for the artifact. It is typically recommended\nthat callers provide the ID, because this is typically a meaningful identifier, \nand for most use cases should be supplied by the caller.\n\nIf an artifact with the provided artifact ID already exists, the default behavior\nis for the server to reject the content with a 409 error. However, the caller can\nsupply the `ifExists` query parameter to alter this default behavior. The `ifExists`\nquery parameter can have one of the following values:\n\n* `FAIL` (*default*) - server rejects the content with a 409 error\n* `UPDATE` - server updates the existing artifact and returns the new metadata\n* `RETURN` - server does not create or add content to the server, but instead \nreturns the metadata for the existing artifact\n* `RETURN_OR_UPDATE` - server returns an existing **version** that matches the \nprovided content if such a version exists, otherwise a new version is created\n\nThis operation may fail for one of the following reasons:\n\n* An invalid `ArtifactType` was indicated (HTTP error `400`)\n* No `ArtifactType` was indicated and the server could not determine one from the content (HTTP error `400`)\n* Provided content (request body) was empty (HTTP error `400`)\n* An artifact with the provided ID already exists (HTTP error `409`)\n* The content violates one of the configured global rules (HTTP error `409`)\n* A server error occurred (HTTP error `500`)\n" provider: apicurio method: POST path: "/groups/{groupId}/artifacts" encoding: json input: { type: "object" properties: { "X-Registry-ArtifactId": { type: "string" } "X-Registry-ArtifactType": { type: "string" } "X-Registry-Content-Hash": { type: "string" } "X-Registry-Description": { type: "string" description: "Description of the artifact." } "X-Registry-Description-Encoded": { type: "string" description: "Base64 encoded description of the artifact." } "X-Registry-Hash-Algorithm": { type: "string" enum: ["SHA256", "MD5"] } "X-Registry-Name": { type: "string" description: "Name of the artifact." } "X-Registry-Name-Encoded": { type: "string" description: "Base64 encoded name of the artifact." } "X-Registry-Version": { type: "string" description: "A single version of an artifact. Can be provided by the client when creating a new version,\nor it can be server-generated. The value can be any string unique to the artifact, but it is\nrecommended to use a simple integer or a semver value." } canonical: { type: "boolean" } ifExists: { type: "string" enum: ["FAIL", "UPDATE", "RETURN", "RETURN_OR_UPDATE"] } } additionalProperties: false } output: { type: "object" required: ["contentId", "createdBy", "createdOn", "globalId", "group", "id", "modifiedBy", "modifiedOn", "state", "type", "version"] properties: { contentId: { type: "integer" format: "int64" } createdBy: { type: "string" } createdOn: { type: "string" format: "date-time" } description: { type: "string" } globalId: { type: "integer" format: "int64" } groupId: { type: "string" description: "An ID of a single artifact group." } id: { type: "string" } labels: { type: "array" items: { type: "string" } } modifiedBy: { type: "string" } modifiedOn: { type: "string" format: "date-time" } name: { type: "string" } properties: { type: "object" } references: { type: "array" items: { type: "object" description: "A reference to a different artifact. Typically used with artifact types that can have dependencies like Protobuf." required: ["artifactId", "groupId", "name"] properties: { artifactId: { type: "string" } groupId: { type: "string" } name: { type: "string" } version: { type: "string" } } } } state: { type: "string" enum: ["ENABLED", "DISABLED", "DEPRECATED"] } type: { type: "string" } version: { type: "string" } } } }