Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Syntax  

Syntax 1:   POST /governance/endpoints <payload>  

Tip

It is also possible to create an endpoint and associate it with other types of artifacts such as REST services or SOAP services as presented in Syntax 2 below.

Syntax 2:

  • POST /governance/endpoints/restservices/<UUID> <payload> 
  • POST /governance/endpoints/restservices?Query <payload> 

Here the payload should be in JSON format.Following are the required attributes:

  • name
  • version
  • type

Payload format is as follows:


Code Block
languagejava
{name: "endpoint-1",
type: "endpoint",
version: "1.0.0",
address: "https://localhost:9443",
environment: "QA"
}
Example(s)
Code Block
languagejava
titleExample 1
POST https://localhost:9443/governance/endpoints/ { name: "endpoint-1", type: "endpoint", version: "1.0.0", address: "https://localhost:9443", environment: "QA" }
Code Block
languagejava
titleExample 2
POST https://localhost:9443/governance/endpoints/restservices/cea0c482-4280-4837-8126-3fd97cdc0a41
{
name: "endpoint-2",
type: "endpoint",
version: "1.0.0",
address: "https://localhost:9443",
environment: "QA"
}
Code Block
languagejava
titleExample 3
POST https://localhost:9443/governance/endpoints/restservices?name=TestRESTService2&version=1.0.0  
{
name: "endpoint-3",
type: "endpoint",
version: "1.0.0",
address: "https://localhost:9443",
environment: "QA"
}
Sample cURL Command(s)
Code Block
languagejava
titleSample cURL Command 1
curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "name":"endpoint-1", "type":"endpoint", "version":"1.0.0", "address":"https://localhost:9443", "environment":"QA" }
Code Block
languagejava
titleSample cURL Command 2
curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "name":"endpoint-2", "type":"endpoint", "version":"1.0.0", "address":"https://localhost:9443", "environment":"QA" }' "https://localhost:9443/governance/endpoints/restservices/cae93ba9-9543-43be-9f30-bb96cec3c443" -i -k
Code Block
languagejava
titleSample cURL Command 3
curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{ "name":"endpoint-2", "type":"endpoint", "version":"1.0.0", "address":"https://localhost:9443", "environment":"QA" }' "https://localhost:9443/governance/endpoints/restservices?name=TestRESTService4" -i -k
ResponseIf the artifact creation is successful, the server will return HTTP 201 code along with the “location” header pointing to the newly created artifact. If there is an issue creating the new artifact, it will return an appropriate error code.  

...