Skip to content

Instantly share code, notes, and snippets.

@luan-cestari
Created April 16, 2015 18:52
Show Gist options
  • Save luan-cestari/b6b4b24d0009ce633dfd to your computer and use it in GitHub Desktop.
Save luan-cestari/b6b4b24d0009ce633dfd to your computer and use it in GitHub Desktop.
audit example
$ curl -H Content-Type:application/json -X PUT -d @meta.json https://$HOST:$PORT/rest/metadata/cy/1.0.0 --insecure --cert x -v | tee out.json
$ cat meta.json
{
"entityInfo": {
"name": "cy",
"hooks": [
{
"name": "auditHook",
"configuration": {
"entityName": "audit",
"version": "1.0.0"
},
"actions": [
"insert",
"update",
"delete"
]
}
],
"datastore": {
"backend": "mongo",
"datasource": "mongodata",
"collection": "cy"
}
},
"schema": {
"name": "cy",
"version": {
"value": "1.0.0",
"changelog": "Initial version"
},
"status": {
"value": "active"
},
"access": {
"insert": ["anyone"],
"find": ["anyone"],
"update": ["anyone"],
"delete": ["anyone"]
},
"fields": {
"name": {
"type": "string"
},
"iso2Code": {
"type": "string"
},
"iso3Code": {
"type": "string"
},
"lastUpdatedBy": {
"type": "string"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment