{"id":19544047,"url":"https://github.com/rpgreen/apigateway-generic-java-sdk","last_synced_at":"2025-05-09T00:21:00.354Z","repository":{"id":57715419,"uuid":"89970992","full_name":"rpgreen/apigateway-generic-java-sdk","owner":"rpgreen","description":"Simple generic Java client SDK for Amazon API Gateway endpoints","archived":false,"fork":false,"pushed_at":"2018-11-03T13:30:28.000Z","size":39,"stargazers_count":24,"open_issues_count":5,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-31T19:44:11.061Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/rpgreen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-01T23:16:17.000Z","updated_at":"2024-07-19T20:09:08.000Z","dependencies_parsed_at":"2022-09-03T08:20:21.600Z","dependency_job_id":null,"html_url":"https://github.com/rpgreen/apigateway-generic-java-sdk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpgreen%2Fapigateway-generic-java-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpgreen%2Fapigateway-generic-java-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpgreen%2Fapigateway-generic-java-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rpgreen%2Fapigateway-generic-java-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rpgreen","download_url":"https://codeload.github.com/rpgreen/apigateway-generic-java-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253167231,"owners_count":21864607,"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","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":[],"created_at":"2024-11-11T03:24:15.549Z","updated_at":"2025-05-09T00:21:00.333Z","avatar_url":"https://github.com/rpgreen.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apigateway-generic-java-sdk\n\n[![CircleCI](https://circleci.com/gh/rpgreen/apigateway-generic-java-sdk.svg?style=svg)](https://circleci.com/gh/rpgreen/apigateway-generic-java-sdk)\n\nThis is a simple generic Java client for Amazon API Gateway endpoints. It is useful when you don't necessarily want to generate a [strongly-typed SDK](https://aws.amazon.com/blogs/developer/api-gateway-java-sdk), such as when prototyping or scripting.\n\nIt is optimized to run from a Lambda function and does not require extra dependencies beyond the AWS SDK, which is already bundled in the Lambda runtime.\n\nIt does not make any assumptions about the wire format of your requests and responses. You are free to parse response bodies as you see fit, and the raw HTTP response data is included in the wrapped response.\n\n## Features\n* AWS SigV4 request signing. Supports APIs authenticated with IAM auth using standard AWSCredentialsProvider interface\n* API Keys\n* Custom headers \n* Throws exceptions for non-2xx response codes\n* Compatibility with existing AWS SDK client configuration (connections, retry policies, etc)\n* Runs in AWS Lambda functions with no additional dependencies\n\n## Install\n\n### Maven\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003eca.ryangreen\u003c/groupId\u003e\n  \u003cartifactId\u003eapigateway-generic-java-sdk\u003c/artifactId\u003e\n  \u003cversion\u003e1.3\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### From source\n```bash\ngit clone https://github.com/rpgreen/apigateway-generic-java-sdk.git\n\n# Optional:\ncd apigateway-generic-java-sdk\nmvn install\n```\n\n## Examples\n```java\nGenericApiGatewayClient client = new GenericApiGatewayClientBuilder()\n        .withClientConfiguration(new ClientConfiguration())\n        .withCredentials(new EnvironmentVariableCredentialsProvider())\n        .withEndpoint(\"https://XXXXXX.execute-api.us-east-1.amazonaws.com\")\n        .withRegion(Region.getRegion(Regions.fromName(\"us-east-1\")))\n        .withApiKey(\"XXXXXXXXXXXXXXX\")\n        .build();\n\nMap\u003cString, String\u003e headers = new HashMap\u003c\u003e();\nheaders.put(\"Content-Type\", \"application/json\");\n\ntry {\n    GenericApiGatewayResponse response = client.execute(\n            new GenericApiGatewayRequestBuilder()\n                    .withBody(new ByteArrayInputStream(\"foo\".getBytes()))\n                    .withHttpMethod(HttpMethodName.POST)\n                    .withHeaders(headers)\n                    .withResourcePath(\"/stage/path\").build());\n    \n    System.out.println(\"Response: \" + response.getBody());\n    System.out.println(\"Status: \" + response.getHttpResponse().getStatusCode());\n    \n} catch (GenericApiGatewayException e) {   // exception thrown for any non-2xx response\n    System.out.println(String.format(\"Client threw exception with message %s and status code %s\", \n            e.getMessage(), e.getStatusCode()));\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpgreen%2Fapigateway-generic-java-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frpgreen%2Fapigateway-generic-java-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frpgreen%2Fapigateway-generic-java-sdk/lists"}