Tally Platform API
audit-configuration
Create audit configuration
1 min
code examples curl location 'https //api b preview\ loyaltyservices io/api/v3/audit/configurations?async=boolean' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "schemaname" "dbo", "tablename" "", "columnname" "", "isactive" true }'require "uri" require "json" require "net/http" url = uri("https //api b preview\ loyaltyservices io/api/v3/audit/configurations?async=boolean") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "schemaname" "dbo", "tablename" "", "columnname" "", "isactive" true }) response = https request(request) puts response read body import requests import json url = "https //api b preview\ loyaltyservices io/api/v3/audit/configurations?async=boolean" payload = json dumps({ "schemaname" "dbo", "tablename" "", "columnname" "", "isactive" true }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) okhttpclient client = new okhttpclient() newbuilder() build(); mediatype mediatype = mediatype parse("application/json"); requestbody body = requestbody create(mediatype, "{\n \\"schemaname\\" \\"dbo\\",\n \\"tablename\\" \\"\\",\n \\"columnname\\" \\"\\",\n \\"isactive\\" true\n}"); request request = new request builder() url("https //api b preview\ loyaltyservices io/api/v3/audit/configurations?async=boolean") method("post", body) addheader("accept", "application/json") addheader("content type", "application/json") build(); response response = client newcall(request) execute(); responses // created { "auditconfigurationid" "", "schemaname" "", "tablename" "", "columnname" "", "tabledisplayname" "", "columndisplayname" "", "isactive" false, "createdate" "", "updatedate" "" }// accepted { "asynctaskid" "", "tasktypecode" "platformapi", "taskcode" "enrollmember", "requestdate" "", "requestdata" {}, "statuscode" "", "responsedate" "", "responsedata" {}, "filename" "", "linenumber" 0, "filedata" "" }// bad request { "errors" \[ { "code" "", "fieldname" "", "message" "", "messageparameters" \[ {} ] } ] }// unauthorized // forbidden // conflict configuration already exists { "errors" \[ { "code" "", "fieldname" "", "message" "", "messageparameters" \[ {} ] } ] }// internal error