All these apis require username and password to process your request. You should supply password in basic authentication form. Just add ‘Authorization’ header with value ‘Basic {base64 encoding of text username:password}’
CURL command to get type definition by name
curl --location --request GET 'http://localhost:21000/api/atlas/v2/types/typedef/name/rdbms_column' \
--header 'Authorization: Basic YWRtaW46YWRtaW4='
Java snippet to get type definition by name
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
Request request = new Request.Builder()
.url("http://localhost:21000/api/atlas/v2/types/typedef/name/rdbms_column")
.method("GET", null)
.addHeader("Authorization", "Basic YWRtaW46YWRtaW4=")
.build();
Response response = client.newCall(request).execute();
Python snippet to get type definition by name
import requests
url = "http://localhost:21000/api/atlas/v2/types/typedef/name/rdbms_column"
payload={}
headers = {
'Authorization': 'Basic YWRtaW46YWRtaW4='
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
Previous Next Home
No comments:
Post a Comment