...
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:
|
Create a new asset with an unbounded table
...
POST /governance/<asset_short_name_s> <payload>
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: "Artifact Type", version: “Version Number", Attribute-N: “Attribute-N” value } |
...
Code Block | ||
---|---|---|
| ||
POST https://localhost:9443 /governance/restservices { name: "TestRESTService", type: "restservice", context: "/test", version: "1.0.0" } |
...
Code Block | ||
---|---|---|
| ||
curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{
"name":"TestRESTService",
"type":"restservice",
"context":"/test",
"version":"1.0.0"
}' "https://localhost:9443/governance/restservices" -i -k |
...
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:
HTTP 200
Location: https://localhost:9443/governance/restservices/3ec1dcd9-66d8-41da-a0d2-ec171df64cc3
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. |
...