...
Get an asset of a certain type
Syntax | GET /governance/<asset_short_name_s>/UUID |
---|---|
Example | GET https://localhost:9443/ /governance/restservices/3245se24553 |
Sample cURL Command |
|
...
...
...
...
...
...
Create a new asset
Syntax |
|
---|
...
Here the payload should be in JSON format. Following are the required attributes.
Payload format is as follows:
|
...
Example |
| |||||
---|---|---|---|---|---|---|
Sample cURL Command |
|
...
|
...
|
...
|
...
|
...
| |
Response | If the artifact creation is successful, the server will return HTTP 200 code along with the “location” header pointing to the newly created artifact. If there is an issue creating a new artifact, it will return an appropriate error code. For example, the above example may return the following:
|
---|
Update an existing asset
Syntax |
|
---|
...
Here the payload should be in JSON format. Following are the required attributes.
Payload format is as follows:
|
...
Example |
| |||||
---|---|---|---|---|---|---|
Sample cURL Command |
|
...
|
...
|
...
|
...
|
...
|
...
| |
Response | If 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. |
---|
Delete an asset
...
Syntax | DELETE |
---|
...
/governance/<asset_short_name_s>/UUID | |
Example |
|
---|
...
| |
Sample cURL Command | curl -X DELETE -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" "https://localhost:9443/governance/restservices/97bdb275-2b09-4744-b29f-125cf2c8e387" -i -k |
---|
Get lifecycle state of an asset
...
Syntax |
|
---|---|
Example(s) |
|
Sample cURL Command(s) |
|
Update lifecycle
...
state of an
...
asset
Syntax |
|
---|
...
|
Payload format
{
The payload format is as follows:
|
...
|
...
|
...
|
...
Example |
---|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
| ||||||
Sample cURL Command |
|
---|
...
|
...
|
...
|
...
|
...
|
...
|
Endpoints
- Get all endpoints
Syntax GET /governance/endpoints Example GET https://localhost:9443/governance/endpoints Sample cURL Command curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" "https://localhost:9443/governance/endpoints" -i -k - Get an individual endpoint
Syntax GET /governance/endpoints/UUID Example GET https://localhost:9443/governance/endpoints/c7d6ed67-f2f5-409f-97f2-ddff9b6bc07b
Sample cURL Command curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" "https://localhost:9443/governance/endpoints/c413e38b-16fa-4c49-ac03-927f878e8e59" -i -k - Create new endpoint
Syntax Syntax 1: GET /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:
- GET /governance/endpoints/restservices/<UUID> <payload>
- GET /governance/endpoints/restservices?Query <payload>
Example Here the payload should be in JSON format.Following are the required attributes: - name
- version
- type
Payload format is as follows:
Code Block { name: "Artifact Name", type: "endpoint", version: “Version Number", Attribute-N: “Attribute-N” value }
Code Block language java title Example 1 POST https://localhost:9443/governance/endpoints/ { name: "endpoint-1", type: "endpoint", version: "1.0.0", address: "https://localhost:9443", environment: "QA" }
Example 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"
}
Example 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 Sample cURL Command 1:
Code Block language java 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" }
Sample cURL Command 2:
Code Block language java 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
Sample cURL Command 3:
Code Block language java 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
Response If 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. - Delete an endpoint
Syntax -
Example -
Syntax DELETE /governance/endpoints/uuid Example DELETE https://localhost:9443/governance/endpoints/73cc7077-d723-44a5-98e5-945795e518e8 Sample cURL Command curl -X DELETE -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" "https://localhost:9443/governance/endpoints/6652d672-d7f5-4a13-9d6f-9a6eb85675a5"-i -k
- Get an endpoint status
Syntax GET /governance/endpoints/<uuid>/states Example GET https://localhost:9443/governance/endpoints/c7d6ed67-f2f5-409f-97f2-ddff9b6bc07b/states
Sample cURL Command curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" "https://localhost:9443/governance/endpoints/6652d672-d7f5-4a13-9d6f-9a6eb85675a5/states" -i -k
- Activate an endpoint
Syntax POST /governance/endpoints/activate/<uuid> Example POST https://localhost:9443/governance/endpoints/activate/c7d6ed67-f2f5-409f-97f2-ddff9b6bc07b
Sample cURL Command curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" "https://localhost:9443/governance/endpoints/activate/6652d672-d7f5-4a13-9d6f-9a6eb85675a5" -i -k
- Deactivate an endpoint
Syntax POST /governance/endpoints/deactivate/<uuid> Example POST https://localhost:9443/governance/endpoints/deactivate/c7d6ed67-f2f5-409f-97f2-ddff9b6bc07b Sample cURL Command curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" "https://localhost:9443/governance/endpoints/deactivate/6652d672-d7f5-4a13-9d6f-9a6eb85675a5" -i -k
- Get an endpoint belong to a certain artifact instance
Syntax GET /governance/<asset_short_name_s>/<id>/endpoints Example GET https://localhost:9443/governance/restservices/cea0c482-4280-4837-8126-3fd97cdc0a41/endpoints Sample cURL Command curl -X GET -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" "https://localhost:9443/governance/restservices/cae93ba9-9543-43be-9f30-bb96cec3c443/endpoints" -i -k
...