Internal Metadata API
A Collection of CRUD API endpoints used for interacting with SAGE’s Internal Metdatum resource.
Get All Internal Metadata
A GET
to the /internal/metadata
endpoint which will return a list all Internal Metadata in SAGE.
Sample Request
GET /internal/metadata HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Content-Length: 213
{"meta":{"status":"SUCCESS","action":null,"message":"Your request was successful","id":null},"payload":{"ArrayList<InternalMetadata>":[{"id":4,"gloss":"Test Metadatum","field":"test_metadatum","required":false}]}}
Example Curl Request
$ curl 'http://localhost:8080/internal/metadata' -i -X GET \
-H 'Content-Type: application/json;charset=UTF-8'
Create Internal Metadatum
A POST
to the /internal/metadata
endpoint which will result in the creation of a new Internal Metadatum in SAGE.
Sample Request
POST /internal/metadata HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 78
Host: localhost:8080
{"id":null,"gloss":"Test Metadatum","field":"test_metadatum","required":false}
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Content-Length: 200
{"meta":{"status":"SUCCESS","action":null,"message":"Your request was successful","id":null},"payload":{"InternalMetadata":{"id":1,"gloss":"Test Metadatum","field":"test_metadatum","required":false}}}
Example Curl Request
$ curl 'http://localhost:8080/internal/metadata' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{"id":null,"gloss":"Test Metadatum","field":"test_metadatum","required":false}'
Update Internal Metadatum
A PUT
request to the /internal/metadata
endpoint which will result in the updating of the specified Internal Metadatum resource in SAGE.
Sample Request
PUT /internal/metadata HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 91
Host: localhost:8080
{"id":2,"gloss":"Test Metadatum Updated","field":"test_metadatum_updated","required":false}
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Content-Length: 216
{"meta":{"status":"SUCCESS","action":null,"message":"Your request was successful","id":null},"payload":{"InternalMetadata":{"id":2,"gloss":"Test Metadatum Updated","field":"test_metadatum_updated","required":false}}}
Example Curl Request
$ curl 'http://localhost:8080/internal/metadata' -i -X PUT \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{"id":2,"gloss":"Test Metadatum Updated","field":"test_metadatum_updated","required":false}'
Delete Internal Metadatum
A DELETE
request to the /internal/metadata
endpoint which will result in the deletion of the specified Internal Metadatum resource in SAGE.
Sample Request
DELETE /internal/metadata HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 75
Host: localhost:8080
{"id":3,"gloss":"Test Metadatum","field":"test_metadatum","required":false}
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Content-Length: 106
{"meta":{"status":"SUCCESS","action":null,"message":"Your request was successful","id":null},"payload":{}}
Example Curl Request
$ curl 'http://localhost:8080/internal/metadata' -i -X DELETE \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{"id":3,"gloss":"Test Metadatum","field":"test_metadatum","required":false}'
Operators API
A Collection of CRUD API endpoints used for interacting with SAGE’s Operator resource.
Get All Operators
A GET
to the /operators
endpoint which will return a list all Operators in SAGE.
Sample Request
GET /operators HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Content-Length: 353
{"meta":{"status":"SUCCESS","action":null,"message":"Your request was successful","id":null},"payload":{"ArrayList<ConstantOp>":[{"id":1,"type":"CONSTANT_OP","name":"Test Constant Op","field":"test_constant_op","value":"Test Constant Value"},{"id":2,"type":"DEFAULT_OP","name":"Test Default Op","field":"test_default_op","value":"Test Default Value"}]}}
Example Curl Request
$ curl 'http://localhost:8080/operators' -i -X GET \
-H 'Content-Type: application/json;charset=UTF-8'
Get Operator Types
A GET
to the /operators/types
endpoint which will return a list all Operator types in SAGE.
Sample Request
GET /operators/types HTTP/1.1
Content-Type: application/json;charset=UTF-8
Host: localhost:8080
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Content-Length: 542
{"meta":{"status":"SUCCESS","action":null,"message":"Your request was successful","id":null},"payload":{"ArrayList<OperatorType>":[{"name":"APPLICATION_TYPE_OP","entity":"ApplicationTypeOp"},{"name":"BASE_64_ENCODE_OP","entity":"Base64EncodeOp"},{"name":"CONSTANT_OP","entity":"ConstantOp"},{"name":"DATE_NORMALIZATION_OP","entity":"DateNormalizationOp"},{"name":"DEFAULT_OP","entity":"DefaultOp"},{"name":"MAPPING_OP","entity":"MappingOp"},{"name":"REGEX_REPLACE_OP","entity":"RegexReplaceOp"},{"name":"TEMPLATE_OP","entity":"TemplateOp"}]}}
Example Curl Request
$ curl 'http://localhost:8080/operators/types' -i -X GET \
-H 'Content-Type: application/json;charset=UTF-8'
Create Operator
A POST
to the /operators
endpoint which will result in the creation of a new Operator in SAGE.
Sample Request
POST /operators HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 115
Host: localhost:8080
{"id":null,"type":"CONSTANT_OP","name":"Test Constant Op","field":"test_constant_op","value":"Test Constant Value"}
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Content-Length: 231
{"meta":{"status":"SUCCESS","action":null,"message":"Your request was successful","id":null},"payload":{"ConstantOp":{"id":4,"type":"CONSTANT_OP","name":"Test Constant Op","field":"test_constant_op","value":"Test Constant Value"}}}
Example Curl Request
$ curl 'http://localhost:8080/operators' -i -X POST \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{"id":null,"type":"CONSTANT_OP","name":"Test Constant Op","field":"test_constant_op","value":"Test Constant Value"}'
Update Operator
A PUT
request to the /operators
endpoint which will result in the updating of the specified Operator resource in SAGE.
Sample Request
PUT /operators HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 136
Host: localhost:8080
{"id":3,"type":"CONSTANT_OP","name":"Test Constant Op Updated","field":"test_constant_op_updated","value":"Test Constant Value Updated"}
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Content-Length: 255
{"meta":{"status":"SUCCESS","action":null,"message":"Your request was successful","id":null},"payload":{"ConstantOp":{"id":3,"type":"CONSTANT_OP","name":"Test Constant Op Updated","field":"test_constant_op_updated","value":"Test Constant Value Updated"}}}
Example Curl Request
$ curl 'http://localhost:8080/operators' -i -X PUT \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{"id":3,"type":"CONSTANT_OP","name":"Test Constant Op Updated","field":"test_constant_op_updated","value":"Test Constant Value Updated"}'
Delete Operator
A DELETE
request to the /operators
endpoint which will result in the deletion of the specified Operator resource in SAGE.
Sample Request
DELETE /operators HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 112
Host: localhost:8080
{"id":5,"type":"CONSTANT_OP","name":"Test Constant Op","field":"test_constant_op","value":"Test Constant Value"}
Sample Response
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
Content-Length: 106
{"meta":{"status":"SUCCESS","action":null,"message":"Your request was successful","id":null},"payload":{}}
Example Curl Request
$ curl 'http://localhost:8080/operators' -i -X DELETE \
-H 'Content-Type: application/json;charset=UTF-8' \
-d '{"id":5,"type":"CONSTANT_OP","name":"Test Constant Op","field":"test_constant_op","value":"Test Constant Value"}'