Skip to content

Commit

Permalink
More updates to http client - and updated gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
dwolfson committed Jan 3, 2024
1 parent 28ca1b6 commit 3f1741f
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 94 deletions.
41 changes: 41 additions & 0 deletions open-metadata-distribution/omag-server-platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,11 @@ distributions {
from { "$rootProject.projectDir/open-metadata-distribution/omag-server-platform/docs/postman-collections" }
fileMode = 0755
}
into('assembly/opt/http-client-collections') {
// Describe the sample-clients layout
from { "$rootProject.projectDir/open-metadata-distribution/omag-server-platform/docs/http-client-collections" }
fileMode = 0755
}
into('assembly/opt/postman-collections') {
from { "$rootProject.projectDir/open-metadata-resources/open-metadata-samples/postman-rest-samples" }
{
Expand All @@ -344,6 +349,20 @@ distributions {
}
fileMode = 0755
}
into('assembly/opt/http-client-collections') {
from { "$rootProject.projectDir/open-metadata-resources/open-metadata-samples/postman-rest-samples" }
{
include 'Egeria*.http'
}
from { "$rootProject.projectDir/open-metadata-implementation" }
{
include 'admin-services/Egeria*.http'
include 'repository-services/Egeria*.http'
include 'platform-services/Egeria*.http'
include 'access-services/*/Egeria*.http'
}
fileMode = 0755
}
into('assembly/opt/postman-collections/framework-services') {
from { "$rootProject.projectDir/open-metadata-implementation/framework-services/ocf-metadata-management" }
{
Expand All @@ -359,13 +378,35 @@ distributions {
}
fileMode = 0755
}
into('assembly/opt/http-client-collections/framework-services') {
from { "$rootProject.projectDir/open-metadata-implementation/framework-services/ocf-metadata-management" }
{
include 'Egeria*.http'
}
from { "$rootProject.projectDir/open-metadata-implementation/framework-services/oif-metadata-management" }
{
include 'Egeria*.http'
}
from { "$rootProject.projectDir/open-metadata-implementation/framework-services/gaf-metadata-management" }
{
include 'Egeria*.http'
}
fileMode = 0755
}
into('assembly/opt/postman-collections/sample-configs') {
from { "$rootProject.projectDir/open-metadata-resources/open-metadata-deployment" }
{
include 'Egeria*.json'
}
fileMode = 0755
}
into('assembly/opt/http-client-collections/sample-configs') {
from { "$rootProject.projectDir/open-metadata-resources/open-metadata-deployment" }
{
include 'http-client.env.json'
}
fileMode = 0755
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
<!-- Copyright Contributors to the Egeria project. -->

# Sample Jetbrains HTTP Scripts

The Jetbrains HTTP Client is a useful utility for testing REST APIs that is both integrated into the Jetbrains tooling
and freely available to be run standalone. Further information can be found at
[Jebrains HTTP Client](https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html).


It captures, stores and executes specific REST API calls so you do not have to keep typing the URL and parameters
each time you want to issue a request.

## Sample Collections

Collections help to group related REST API calls together.

In order to run these, you should have a set of environment variables configured as detailed in the [next section](#environment-variables).



## Environment variables

The HTTP Client supports the definition of variables like hostname, kafka queue, userId, etc. These can then be used in
specific HTTP Client commands. This makes it easier for them to be used by multiple users, or with different
configurations.

A superset of all the potential variables that we use in our samples (along with default values) are provided in:
[Egeria.postman_environment.json](Egeria.postman_environment.json).


You will most likely want to override some of these values (such as `baseURL` or `kafkaep`) depending on your
own environment's configuration; or you may even want to make several copies of this with different settings in each
one to be able to quickly change between different environments you have running at the same time.

Note that many of the variables are optional, depending on your particular configuration. The mandatory variables are
the following:

- `baseURL`: the base URL of your Egeria OMAG Server Platform, including the 'https://' prefix
- `user`: the user name of the user carrying out operations within the Egeria OMAG Server Platform
- `server`: the name of the server within the Platform in which to carry out operations
- `cohort`: the name of the cohort with which the server should interact
- `kafkaep`: the Apache Kafka endpoint (hostname:port) to use for Egeria's event bus

[Learn more about Postman Environments](https://learning.getpostman.com/docs/postman/environments-and-globals/intro-to-environments-and-globals/).


----
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
Copyright Contributors to the Egeria project.
82 changes: 0 additions & 82 deletions open-metadata-implementation/http-client.env.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,25 +1,76 @@
{
"Egeria": {
"access_service": "stewardship-action",
"adminUserId": "garygeeke",
"assetGUID": "an asset guid",
"assetType": "an asset type",
"baseURL": "https://localhost:9443",
"user": "me",
"cohort": "myCohort",
"connectionName": "aConnection",
"connectionProfileClassName": "aConnectionProfileClassName",
"guid": "a guid",
"intDaemon": "an integration daemon",
"kafkaep": "localhost:9092",
"max_page_size": "100",
"mc_name": "myMetadataCollection",
"mdrServer": "a metadata repository server",
"name": "a name",
"organization_name": "myOrg",
"password": "a password",
"user": "erinoverview",
"search-criteria": "some search criteria",
"server": "myserver",
"server-user": "myserverUserId",
"server-password": "myserverPassword",
"cohort": "myCohort",
"kafkaep": "localhost:9092",
"igc_host": "ibm-infosvr",
"igc_port": "9445",
"igc_user": "isadmin",
"igc_password": "isadmin",
"igc_kafka": "ibm-infosvr:59092",
"atlas_host": "apache-atlas",
"atlas_port": "21000",
"atlas_user": "admin",
"atlas_password": "admin",
"atlas_kafka": "localhost:9026",
"max_page_size": "100",
"access_service": "stewardship-action",
"organization_name": "myOrg",
"mc_name": "myMetadataCollection"
"callerId": "aCaller",
"classificationName": "aClassification",
"databaseGUID": "a-databaseGUID",
"databaseSchemaGUID": "a-databaseSchemaGUID",
"databaseTableGUID": "a-databaseTableGUID",
"elementGUID": "an-element GUID",
"externalSourceGUID": "an external source guid",
"externalSourceName": "an external source name",
"glossaryCategoryGUID": "a glossary category GUID",
"glossaryGUID": "a glossary guid",
"glossaryTermGUID": "a term guid",
"glossaryTermRevisionLogGUID": "a revision guid",
"limit": "a limit",
"parentElementGUID": "a parent element guid",
"parentElementTypeName": "a parent element type",
"reportGUID": "a report guid",
"relationshipType": "a relationship type",
"schemaTypeGUID": "a schema type guid",
"serviceURLName": "a service URL Name",
"templateGUID": "a template guid",
"tutPlatformURLroot": "URL root for test platform",
"tutServer": "server for test",
"type": "a type",
"typeName": "name of type",
"useExternalSourceProvenance": "use External",
"validValueSetGUID": "a valid value set guid",
"validValueGUID": "a valid value guid"
},
"atlasConfig": {
"atlasGlossary": "a-glossary",
"atlasHost": "https://localhost",
"atlasKafka": "localhost:9026",
"atlasPassword": "admin",
"atlasPort": "21000",
"atlas_sub_category": "an atlas sub-category",
"atlas_term": "an atlas term",
"atlas_top_category": "an atlas top category",
"atlasUser": "admin"
},
"glossaryEnv": {
"baseURL": "https://localhost:9443",
"mdrServer": "a metadata repository server",
"server": "myserver",
"viewServer": "a view server",
"user": "erinoverview"
}
}

0 comments on commit 3f1741f

Please sign in to comment.