{"id":20915084,"url":"https://github.com/microcks/microcks-java-client","last_synced_at":"2025-10-25T11:07:59.496Z","repository":{"id":253965674,"uuid":"845075752","full_name":"microcks/microcks-java-client","owner":"microcks","description":"Java client for accessing and using Microcks API","archived":false,"fork":false,"pushed_at":"2025-10-21T09:50:50.000Z","size":164,"stargazers_count":5,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-21T11:41:17.702Z","etag":null,"topics":["api-client","contract-testing","java","microcks","mocking"],"latest_commit_sha":null,"homepage":"https://microcks.io","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microcks.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY-INSIGHTS.yml","support":null,"governance":"GOVERNANCE.md","roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":"MAINTAINERS.md","copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"microcks","patreon":null,"open_collective":"microcks","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2024-08-20T14:31:49.000Z","updated_at":"2025-10-21T09:50:51.000Z","dependencies_parsed_at":"2024-09-10T02:47:30.878Z","dependency_job_id":"7ecca17a-8dd6-4971-8e6c-dcdf985060fe","html_url":"https://github.com/microcks/microcks-java-client","commit_stats":{"total_commits":38,"total_committers":3,"mean_commits":"12.666666666666666","dds":0.4736842105263158,"last_synced_commit":"2ce779aed84b54707ca4ded312e0d725f23ce7b4"},"previous_names":["microcks/microcks-java-client"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/microcks/microcks-java-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcks%2Fmicrocks-java-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcks%2Fmicrocks-java-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcks%2Fmicrocks-java-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcks%2Fmicrocks-java-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microcks","download_url":"https://codeload.github.com/microcks/microcks-java-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcks%2Fmicrocks-java-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280943394,"owners_count":26417747,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","contract-testing","java","microcks","mocking"],"created_at":"2024-11-18T16:12:57.538Z","updated_at":"2025-10-25T11:07:59.491Z","avatar_url":"https://github.com/microcks.png","language":"Java","readme":"# Microcks Java Client\n\nA Java Client or SDK that allows you to interact with the Microcks API. It has minimal dependencies and is easy to use.\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/microcks/microcks-java-client/build-verify.yml?logo=github\u0026style=for-the-badge)](https://github.com/microcks/microcks-java-client/actions)\n[![Version](https://img.shields.io/maven-central/v/io.github.microcks/microcks-java-client?color=blue\u0026style=for-the-badge)]((https://search.maven.org/artifact/io.github.microcks/microcks-java-client))\n[![License](https://img.shields.io/github/license/microcks/microcks-java-client?style=for-the-badge\u0026logo=apache)](https://www.apache.org/licenses/LICENSE-2.0)\n[![Project Chat](https://img.shields.io/badge/discord-microcks-pink.svg?color=7289da\u0026style=for-the-badge\u0026logo=discord)](https://microcks.io/discord-invite/)\n[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/microcks\u0026style=for-the-badge)](https://artifacthub.io/packages/search?repo=microcks)\n[![CNCF Landscape](https://img.shields.io/badge/CNCF%20Landscape-5699C6?style=for-the-badge\u0026logo=cncf)](https://landscape.cncf.io/?item=app-definition-and-development--application-definition-image-build--microcks)\n\n## Build Status\n\nLatest released version is `0.0.7`.\n\nCurrent development version is `0.0.8-SNAPSHOT`.\n\n#### Fossa license and security scans\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmicrocks%2Fmicrocks-java-client.svg?type=shield\u0026issueType=license)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Fmicrocks-java-client?ref=badge_shield\u0026issueType=license)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmicrocks%2Fmicrocks-java-client.svg?type=shield\u0026issueType=security)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Fmicrocks-java-client?ref=badge_shield\u0026issueType=security)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fmicrocks%2Fmicrocks-java-client.svg?type=small)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmicrocks%2Fmicrocks-java-client?ref=badge_small)\n\n#### OpenSSF best practices on Microcks core\n\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/7513/badge)](https://bestpractices.coreinfrastructure.org/projects/7513)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/microcks/microcks/badge)](https://securityscorecards.dev/viewer/?uri=github.com/microcks/microcks)\n\n## Community\n\n* [Documentation](https://microcks.io/documentation/tutorials/getting-started/)\n* [Microcks Community](https://github.com/microcks/community) and community meeting\n* Join us on [Discord](https://microcks.io/discord-invite/), on [GitHub Discussions](https://github.com/orgs/microcks/discussions) or [CNCF Slack #microcks channel](https://cloud-native.slack.com/archives/C05BYHW1TNJ)\n\nTo get involved with our community, please make sure you are familiar with the project's [Code of Conduct](./CODE_OF_CONDUCT.md).\n\n## Versions\n\n| Java Client | Microcks Version |\n|-------------|------------------|\n| `0.0.x`     | `1.10.0` and +   |\n\n## How to use it?\n\n### Include it into your project dependencies\n\nIf you're using Maven:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.microcks\u003c/groupId\u003e\n  \u003cartifactId\u003emicrocks-java-client\u003c/artifactId\u003e\n  \u003cversion\u003e0.0.7\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nor if you're using Gradle:\n```groovy  \ndependencies {\n    implementation 'io.github.microcks:microcks-java-client:0.0.7'\n}\n```\n\n### Use it in your code\n\nThe API endpoints available on Microcks backend are split in different classes in the `io.github.microcks.client` package.\nEach class represents a different part of the API but needs a common client configuration that is named `ApiClient`.\n\nHere's the basic usage of the client where you configure the base URI of the Microcks API:\n\n```java\nApiClient apiClient = new ApiClient();\napiClient.updateBaseUri(\"http://localhost:8585/api\");\n```\n\nYou can then easily use the client to interact with the different part of the API:\n\n```java\nConfigApi configApi = new ConfigApi(apiClient);\nKeycloakConfig config = configApi.getKeycloakConfig();\n```\n\nCheck the [Microcks' OpenAPI reference](https://microcks.io/documentation/references/apis/open-api/) for comprehensive\nlist of available endpoints and their parameters.\n\n### Access to authenticated endpoints\n\nIf your Microcks backend instance has enabled AuthN and AUthZ and if you need to access authenticated endpoints, \nwe provide a `KeycloakClient` to first retrieve an oAuth token to use in following requests. You'll additionally need\nthe service account name and credentials to retrieve the token (see our documentation on \n[how Microcks is using Service Accounts](https://microcks.io/documentation/explanations/service-account/)).\n\nThe flow is as follows:\n\n```java\nKeycloakConfig keycloak = configApi.getKeycloakConfig();\n\n// If Keycloak is enabled on target backend.\nif (config.isEnabled()) {\n   // Build the OAuth token endpoint - here using Keycloak public url but it could be another private one.\n   String tokenEndpoint = keycloak.getAuthServerUrl() + \"/realms/\" + keycloak.getRealm() + \"/protocol/openid-connect/token\";\n   final String oauthToken = KeycloakClient.connectAndGetOAuthToken(\"\u003cservice-account\u003e\", \"\u003cservice-account-credentials\u003e\", tokenEndpoint);\n   \n   // Set a new interceptor to add the Authorization header with the OAuth token.\n   apiClient.setRequestInterceptor(request -\u003e request.header(\"Authorization\", \"Bearer \" + oauthToken));\n}\n\n// Now you can use the client to create a protected resource.\nJobApi jobApi = new JobApi(apiClient);\n\nImportJob importJob = new ImportJob();\nimportJob.setName(\"Hello Soap Service\");\nimportJob.setRepositoryUrl(\"https://raw.githubusercontent.com/microcks/microcks/master/samples/HelloService-soapui-project.xml\");\n\nImportJob result = jobApi.createImportJob(importJob);\n```\n","funding_links":["https://github.com/sponsors/microcks","https://opencollective.com/microcks"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrocks%2Fmicrocks-java-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrocks%2Fmicrocks-java-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrocks%2Fmicrocks-java-client/lists"}