|
| 1 | +# registry-instance-sdk |
| 2 | + |
| 3 | +Apicurio Registry API [v2] |
| 4 | + |
| 5 | +- API version: 2.2.5.Final |
| 6 | + |
| 7 | +Apicurio Registry is a datastore for standard event schemas and API designs. Apicurio Registry enables developers to manage and share the structure of their data using a REST interface. For example, client applications can dynamically push or pull the latest updates to or from the registry without needing to redeploy. Apicurio Registry also enables developers to create rules that govern how registry content can evolve over time. For example, this includes rules for content validation and version compatibility. |
| 8 | + |
| 9 | +The Apicurio Registry REST API enables client applications to manage the artifacts in the registry. This API provides create, read, update, and delete operations for schema and API artifacts, rules, versions, and metadata. |
| 10 | + |
| 11 | +The supported artifact types include: |
| 12 | +- Apache Avro schema |
| 13 | +- AsyncAPI specification |
| 14 | +- Google protocol buffers |
| 15 | +- GraphQL schema |
| 16 | +- JSON Schema |
| 17 | +- Kafka Connect schema |
| 18 | +- OpenAPI specification |
| 19 | +- Web Services Description Language |
| 20 | +- XML Schema Definition |
| 21 | + |
| 22 | + |
| 23 | +**Important**: The Apicurio Registry REST API is available from `https://MY-REGISTRY-URL/apis/registry/v2` by default. Therefore you must prefix all API operation paths with `../apis/registry/v2` in this case. For example: `../apis/registry/v2/ids/globalIds/{globalId}`. |
| 24 | + |
| 25 | + |
| 26 | + For more information, please visit [https://github.com/apicurio/apicurio-registry](https://github.com/apicurio/apicurio-registry) |
| 27 | + |
| 28 | +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* |
| 29 | + |
| 30 | +## Requirements |
| 31 | + |
| 32 | +Building the API client library requires: |
| 33 | + |
| 34 | +1. Java 1.8+ |
| 35 | +2. Maven/Gradle |
| 36 | + |
| 37 | +## Installation |
| 38 | + |
| 39 | +To install the API client library to your local Maven repository, simply execute: |
| 40 | + |
| 41 | +```shell |
| 42 | +mvn clean install |
| 43 | +``` |
| 44 | + |
| 45 | +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: |
| 46 | + |
| 47 | +```shell |
| 48 | +mvn clean deploy |
| 49 | +``` |
| 50 | + |
| 51 | +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. |
| 52 | + |
| 53 | +### Maven users |
| 54 | + |
| 55 | +Add this dependency to your project's POM: |
| 56 | + |
| 57 | +```xml |
| 58 | +<dependency> |
| 59 | + <groupId>com.redhat.cloud</groupId> |
| 60 | + <artifactId>registry-instance-sdk</artifactId> |
| 61 | + <version>2.2.5.Final</version> |
| 62 | + <scope>compile</scope> |
| 63 | +</dependency> |
| 64 | +``` |
| 65 | + |
| 66 | +### Gradle users |
| 67 | + |
| 68 | +Add this dependency to your project's build file: |
| 69 | + |
| 70 | +```groovy |
| 71 | + repositories { |
| 72 | + mavenCentral() // Needed if the 'registry-instance-sdk' jar has been published to maven central. |
| 73 | + mavenLocal() // Needed if the 'registry-instance-sdk' jar has been published to the local maven repo. |
| 74 | + } |
| 75 | +
|
| 76 | + dependencies { |
| 77 | + implementation "com.redhat.cloud:registry-instance-sdk:2.2.5.Final" |
| 78 | + } |
| 79 | +``` |
| 80 | + |
| 81 | +### Others |
| 82 | + |
| 83 | +At first generate the JAR by executing: |
| 84 | + |
| 85 | +```shell |
| 86 | +mvn clean package |
| 87 | +``` |
| 88 | + |
| 89 | +Then manually install the following JARs: |
| 90 | + |
| 91 | +- `target/registry-instance-sdk-2.2.5.Final.jar` |
| 92 | +- `target/lib/*.jar` |
| 93 | + |
| 94 | +## Getting Started |
| 95 | + |
| 96 | +Please follow the [installation](#installation) instruction and execute the following Java code: |
| 97 | + |
| 98 | +```java |
| 99 | + |
| 100 | +import com.openshift.cloud.api.registry.instance.invoker.*; |
| 101 | +import com.openshift.cloud.api.registry.instance.invoker.auth.*; |
| 102 | +import com.openshift.cloud.api.registry.instance.models.*; |
| 103 | +import com.openshift.cloud.api.registry.instance.AdminApi; |
| 104 | + |
| 105 | +public class AdminApiExample { |
| 106 | + |
| 107 | + public static void main(String[] args) { |
| 108 | + ApiClient defaultClient = Configuration.getDefaultApiClient(); |
| 109 | + defaultClient.setBasePath("http://localhost"); |
| 110 | + |
| 111 | + AdminApi apiInstance = new AdminApi(defaultClient); |
| 112 | + RoleMapping roleMapping = new RoleMapping(); // RoleMapping | |
| 113 | + try { |
| 114 | + apiInstance.createRoleMapping(roleMapping); |
| 115 | + } catch (ApiException e) { |
| 116 | + System.err.println("Exception when calling AdminApi#createRoleMapping"); |
| 117 | + System.err.println("Status code: " + e.getCode()); |
| 118 | + System.err.println("Reason: " + e.getResponseBody()); |
| 119 | + System.err.println("Response headers: " + e.getResponseHeaders()); |
| 120 | + e.printStackTrace(); |
| 121 | + } |
| 122 | + } |
| 123 | +} |
| 124 | + |
| 125 | +``` |
| 126 | + |
| 127 | +## Documentation for API Endpoints |
| 128 | + |
| 129 | +All URIs are relative to *http://localhost* |
| 130 | + |
| 131 | +Class | Method | HTTP request | Description |
| 132 | +------------ | ------------- | ------------- | ------------- |
| 133 | +*AdminApi* | [**createRoleMapping**](docs/AdminApi.md#createRoleMapping) | **POST** /admin/roleMappings | Create a new role mapping |
| 134 | +*AdminApi* | [**deleteRoleMapping**](docs/AdminApi.md#deleteRoleMapping) | **DELETE** /admin/roleMappings/{principalId} | Delete a role mapping |
| 135 | +*AdminApi* | [**exportData**](docs/AdminApi.md#exportData) | **GET** /admin/export | Export registry data |
| 136 | +*AdminApi* | [**getConfigProperty**](docs/AdminApi.md#getConfigProperty) | **GET** /admin/config/properties/{propertyName} | Get the value of a configuration property |
| 137 | +*AdminApi* | [**getLogConfiguration**](docs/AdminApi.md#getLogConfiguration) | **GET** /admin/loggers/{logger} | Get a single logger configuration |
| 138 | +*AdminApi* | [**getRoleMapping**](docs/AdminApi.md#getRoleMapping) | **GET** /admin/roleMappings/{principalId} | Return a single role mapping |
| 139 | +*AdminApi* | [**importData**](docs/AdminApi.md#importData) | **POST** /admin/import | Import registry data |
| 140 | +*AdminApi* | [**listConfigProperties**](docs/AdminApi.md#listConfigProperties) | **GET** /admin/config/properties | List all configuration properties |
| 141 | +*AdminApi* | [**listLogConfigurations**](docs/AdminApi.md#listLogConfigurations) | **GET** /admin/loggers | List logging configurations |
| 142 | +*AdminApi* | [**listRoleMappings**](docs/AdminApi.md#listRoleMappings) | **GET** /admin/roleMappings | List all role mappings |
| 143 | +*AdminApi* | [**removeLogConfiguration**](docs/AdminApi.md#removeLogConfiguration) | **DELETE** /admin/loggers/{logger} | Removes logger configuration |
| 144 | +*AdminApi* | [**resetConfigProperty**](docs/AdminApi.md#resetConfigProperty) | **DELETE** /admin/config/properties/{propertyName} | Reset a configuration property |
| 145 | +*AdminApi* | [**setLogConfiguration**](docs/AdminApi.md#setLogConfiguration) | **PUT** /admin/loggers/{logger} | Set a logger's configuration |
| 146 | +*AdminApi* | [**updateConfigProperty**](docs/AdminApi.md#updateConfigProperty) | **PUT** /admin/config/properties/{propertyName} | Update a configuration property |
| 147 | +*AdminApi* | [**updateRoleMapping**](docs/AdminApi.md#updateRoleMapping) | **PUT** /admin/roleMappings/{principalId} | Update a role mapping |
| 148 | +*ArtifactRulesApi* | [**createArtifactRule**](docs/ArtifactRulesApi.md#createArtifactRule) | **POST** /groups/{groupId}/artifacts/{artifactId}/rules | Create artifact rule |
| 149 | +*ArtifactRulesApi* | [**deleteArtifactRule**](docs/ArtifactRulesApi.md#deleteArtifactRule) | **DELETE** /groups/{groupId}/artifacts/{artifactId}/rules/{rule} | Delete artifact rule |
| 150 | +*ArtifactRulesApi* | [**deleteArtifactRules**](docs/ArtifactRulesApi.md#deleteArtifactRules) | **DELETE** /groups/{groupId}/artifacts/{artifactId}/rules | Delete artifact rules |
| 151 | +*ArtifactRulesApi* | [**getArtifactRuleConfig**](docs/ArtifactRulesApi.md#getArtifactRuleConfig) | **GET** /groups/{groupId}/artifacts/{artifactId}/rules/{rule} | Get artifact rule configuration |
| 152 | +*ArtifactRulesApi* | [**listArtifactRules**](docs/ArtifactRulesApi.md#listArtifactRules) | **GET** /groups/{groupId}/artifacts/{artifactId}/rules | List artifact rules |
| 153 | +*ArtifactRulesApi* | [**testUpdateArtifact**](docs/ArtifactRulesApi.md#testUpdateArtifact) | **PUT** /groups/{groupId}/artifacts/{artifactId}/test | Test update artifact |
| 154 | +*ArtifactRulesApi* | [**updateArtifactRuleConfig**](docs/ArtifactRulesApi.md#updateArtifactRuleConfig) | **PUT** /groups/{groupId}/artifacts/{artifactId}/rules/{rule} | Update artifact rule configuration |
| 155 | +*ArtifactsApi* | [**createArtifact**](docs/ArtifactsApi.md#createArtifact) | **POST** /groups/{groupId}/artifacts | Create artifact |
| 156 | +*ArtifactsApi* | [**deleteArtifact**](docs/ArtifactsApi.md#deleteArtifact) | **DELETE** /groups/{groupId}/artifacts/{artifactId} | Delete artifact |
| 157 | +*ArtifactsApi* | [**deleteArtifactsInGroup**](docs/ArtifactsApi.md#deleteArtifactsInGroup) | **DELETE** /groups/{groupId}/artifacts | Deletes all artifacts in a group |
| 158 | +*ArtifactsApi* | [**getContentByGlobalId**](docs/ArtifactsApi.md#getContentByGlobalId) | **GET** /ids/globalIds/{globalId} | Get artifact by global ID |
| 159 | +*ArtifactsApi* | [**getContentByHash**](docs/ArtifactsApi.md#getContentByHash) | **GET** /ids/contentHashes/{contentHash}/ | Get artifact content by SHA-256 hash |
| 160 | +*ArtifactsApi* | [**getContentById**](docs/ArtifactsApi.md#getContentById) | **GET** /ids/contentIds/{contentId}/ | Get artifact content by ID |
| 161 | +*ArtifactsApi* | [**getLatestArtifact**](docs/ArtifactsApi.md#getLatestArtifact) | **GET** /groups/{groupId}/artifacts/{artifactId} | Get latest artifact |
| 162 | +*ArtifactsApi* | [**listArtifactsInGroup**](docs/ArtifactsApi.md#listArtifactsInGroup) | **GET** /groups/{groupId}/artifacts | List artifacts in group |
| 163 | +*ArtifactsApi* | [**referencesByContentHash**](docs/ArtifactsApi.md#referencesByContentHash) | **GET** /ids/contentHashes/{contentHash}/references | Returns a list with all the references for the artifact with the given hash |
| 164 | +*ArtifactsApi* | [**referencesByContentId**](docs/ArtifactsApi.md#referencesByContentId) | **GET** /ids/contentIds/{contentId}/references | Returns a list with all the references for the artifact with the given content id. |
| 165 | +*ArtifactsApi* | [**referencesByGlobalId**](docs/ArtifactsApi.md#referencesByGlobalId) | **GET** /ids/globalIds/{globalId}/references | Returns a list with all the references for the artifact with the given global id. |
| 166 | +*ArtifactsApi* | [**updateArtifact**](docs/ArtifactsApi.md#updateArtifact) | **PUT** /groups/{groupId}/artifacts/{artifactId} | Update artifact |
| 167 | +*ArtifactsApi* | [**updateArtifactState**](docs/ArtifactsApi.md#updateArtifactState) | **PUT** /groups/{groupId}/artifacts/{artifactId}/state | Update artifact state |
| 168 | +*GlobalRulesApi* | [**createGlobalRule**](docs/GlobalRulesApi.md#createGlobalRule) | **POST** /admin/rules | Create global rule |
| 169 | +*GlobalRulesApi* | [**deleteAllGlobalRules**](docs/GlobalRulesApi.md#deleteAllGlobalRules) | **DELETE** /admin/rules | Delete all global rules |
| 170 | +*GlobalRulesApi* | [**deleteGlobalRule**](docs/GlobalRulesApi.md#deleteGlobalRule) | **DELETE** /admin/rules/{rule} | Delete global rule |
| 171 | +*GlobalRulesApi* | [**getGlobalRuleConfig**](docs/GlobalRulesApi.md#getGlobalRuleConfig) | **GET** /admin/rules/{rule} | Get global rule configuration |
| 172 | +*GlobalRulesApi* | [**listGlobalRules**](docs/GlobalRulesApi.md#listGlobalRules) | **GET** /admin/rules | List global rules |
| 173 | +*GlobalRulesApi* | [**updateGlobalRuleConfig**](docs/GlobalRulesApi.md#updateGlobalRuleConfig) | **PUT** /admin/rules/{rule} | Update global rule configuration |
| 174 | +*MetadataApi* | [**deleteArtifactVersionMetaData**](docs/MetadataApi.md#deleteArtifactVersionMetaData) | **DELETE** /groups/{groupId}/artifacts/{artifactId}/versions/{version}/meta | Delete artifact version metadata |
| 175 | +*MetadataApi* | [**getArtifactMetaData**](docs/MetadataApi.md#getArtifactMetaData) | **GET** /groups/{groupId}/artifacts/{artifactId}/meta | Get artifact metadata |
| 176 | +*MetadataApi* | [**getArtifactVersionMetaData**](docs/MetadataApi.md#getArtifactVersionMetaData) | **GET** /groups/{groupId}/artifacts/{artifactId}/versions/{version}/meta | Get artifact version metadata |
| 177 | +*MetadataApi* | [**getArtifactVersionMetaDataByContent**](docs/MetadataApi.md#getArtifactVersionMetaDataByContent) | **POST** /groups/{groupId}/artifacts/{artifactId}/meta | Get artifact version metadata by content |
| 178 | +*MetadataApi* | [**updateArtifactMetaData**](docs/MetadataApi.md#updateArtifactMetaData) | **PUT** /groups/{groupId}/artifacts/{artifactId}/meta | Update artifact metadata |
| 179 | +*MetadataApi* | [**updateArtifactVersionMetaData**](docs/MetadataApi.md#updateArtifactVersionMetaData) | **PUT** /groups/{groupId}/artifacts/{artifactId}/versions/{version}/meta | Update artifact version metadata |
| 180 | +*SearchApi* | [**searchArtifacts**](docs/SearchApi.md#searchArtifacts) | **GET** /search/artifacts | Search for artifacts |
| 181 | +*SearchApi* | [**searchArtifactsByContent**](docs/SearchApi.md#searchArtifactsByContent) | **POST** /search/artifacts | Search for artifacts by content |
| 182 | +*SystemApi* | [**getResourceLimits**](docs/SystemApi.md#getResourceLimits) | **GET** /system/limits | Get resource limits information |
| 183 | +*SystemApi* | [**getSystemInfo**](docs/SystemApi.md#getSystemInfo) | **GET** /system/info | Get system information |
| 184 | +*UsersApi* | [**getCurrentUserInfo**](docs/UsersApi.md#getCurrentUserInfo) | **GET** /users/me | Get current user |
| 185 | +*VersionsApi* | [**createArtifactVersion**](docs/VersionsApi.md#createArtifactVersion) | **POST** /groups/{groupId}/artifacts/{artifactId}/versions | Create artifact version |
| 186 | +*VersionsApi* | [**getArtifactVersion**](docs/VersionsApi.md#getArtifactVersion) | **GET** /groups/{groupId}/artifacts/{artifactId}/versions/{version} | Get artifact version |
| 187 | +*VersionsApi* | [**getArtifactVersionReferences**](docs/VersionsApi.md#getArtifactVersionReferences) | **GET** /groups/{groupId}/artifacts/{artifactId}/versions/{version}/references | Get artifact version |
| 188 | +*VersionsApi* | [**listArtifactVersions**](docs/VersionsApi.md#listArtifactVersions) | **GET** /groups/{groupId}/artifacts/{artifactId}/versions | List artifact versions |
| 189 | +*VersionsApi* | [**updateArtifactVersionState**](docs/VersionsApi.md#updateArtifactVersionState) | **PUT** /groups/{groupId}/artifacts/{artifactId}/versions/{version}/state | Update artifact version state |
| 190 | + |
| 191 | + |
| 192 | +## Documentation for Models |
| 193 | + |
| 194 | + - [ArtifactMetaData](docs/ArtifactMetaData.md) |
| 195 | + - [ArtifactReference](docs/ArtifactReference.md) |
| 196 | + - [ArtifactSearchResults](docs/ArtifactSearchResults.md) |
| 197 | + - [ArtifactState](docs/ArtifactState.md) |
| 198 | + - [ArtifactType](docs/ArtifactType.md) |
| 199 | + - [ConfigurationProperty](docs/ConfigurationProperty.md) |
| 200 | + - [ContentCreateRequest](docs/ContentCreateRequest.md) |
| 201 | + - [DownloadRef](docs/DownloadRef.md) |
| 202 | + - [EditableMetaData](docs/EditableMetaData.md) |
| 203 | + - [Error](docs/Error.md) |
| 204 | + - [IfExists](docs/IfExists.md) |
| 205 | + - [Limits](docs/Limits.md) |
| 206 | + - [LogConfiguration](docs/LogConfiguration.md) |
| 207 | + - [LogLevel](docs/LogLevel.md) |
| 208 | + - [NamedLogConfiguration](docs/NamedLogConfiguration.md) |
| 209 | + - [NamedLogConfigurationAllOf](docs/NamedLogConfigurationAllOf.md) |
| 210 | + - [RoleMapping](docs/RoleMapping.md) |
| 211 | + - [RoleType](docs/RoleType.md) |
| 212 | + - [Rule](docs/Rule.md) |
| 213 | + - [RuleType](docs/RuleType.md) |
| 214 | + - [RuleViolationCause](docs/RuleViolationCause.md) |
| 215 | + - [RuleViolationError](docs/RuleViolationError.md) |
| 216 | + - [RuleViolationErrorAllOf](docs/RuleViolationErrorAllOf.md) |
| 217 | + - [SearchedArtifact](docs/SearchedArtifact.md) |
| 218 | + - [SearchedVersion](docs/SearchedVersion.md) |
| 219 | + - [SortBy](docs/SortBy.md) |
| 220 | + - [SortOrder](docs/SortOrder.md) |
| 221 | + - [SystemInfo](docs/SystemInfo.md) |
| 222 | + - [UpdateConfigurationProperty](docs/UpdateConfigurationProperty.md) |
| 223 | + - [UpdateRole](docs/UpdateRole.md) |
| 224 | + - [UpdateState](docs/UpdateState.md) |
| 225 | + - [UserInfo](docs/UserInfo.md) |
| 226 | + - [VersionMetaData](docs/VersionMetaData.md) |
| 227 | + - [VersionSearchResults](docs/VersionSearchResults.md) |
| 228 | + |
| 229 | + |
| 230 | +## Documentation for Authorization |
| 231 | + |
| 232 | +All endpoints do not require authorization. |
| 233 | +Authentication schemes defined for the API: |
| 234 | + |
| 235 | +## Recommendation |
| 236 | + |
| 237 | +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. |
| 238 | + |
| 239 | +## Author |
| 240 | + |
| 241 | +apicurio@lists.jboss.org |
| 242 | + |
0 commit comments