Introduction
Introduction
This set of interfaces is in the form of web API provided by Digital Maker, and supports the operation of data such as Document and DataSourceList. The following is a specification for this set of interfaces.
Call Address
Enable signature verification without cookies:
[domain]/[TenantId]/[AppCode]/CustomApi/[MethodName]Note:
Domain is consistent with AppMaker's domain, which distinguishes different environments,
TenantId and AppCode are the data ranges to be accessed by the interface,
CustomApi is fixed content that can be hard-coded,
MethodName indicates which interface is specifically called.
Turn on signature verification using cookies:
[domain]/[TenantId]/[AppCode]/Pages/[PageCode]/InternalApi/[MethodName]OR
[domain]/[TenantId]/[AppCode]/Form/[PageMode]/[FormAlias]/InternalApi/[MethodName]
Code Specification:
json,utf-8
HttpMethod:
Unless otherwise specified, all interfaces are called by POST by default.
Code Sample
JavaScrip Ajax
//The postData parameter should be a serialized value of a JS object. var postData = JSON.stringify({ "QueryAlias": "ewbtlegh2bn", "Index": 0, "Size": 10, "SearchValues": { "@@creator":this.creator }, "StaffCode":"##190111031015539" }); //Note type、contentType $.ajax({ type: 'POST', contentType:"application/json;charset=utf-8", url: '/tenantId/appCode/CustomAPI/GetDocumentsByQuery', data: postData, dataType: 'json', success: function (data) { console.log(data.Data); }, error: function (data) { alert("error"); } })C#
//postData should be an object serialized value var postData=JsonConvert.SerializeObject(new object()); var client = new HttpClient { BaseAddress = new Uri("http://www.ants.com") }; var content = new StringContent(postData); //Note setting the contentType content.Headers.ContentType = new MediaTypeHeaderValue("application/json"); var postResponse = await client.PostAsync("/tenantId/appCode/CustomAPI/GetDocumentsByQuery", content).ConfigureAwait(false); postResponse.EnsureSuccessStatusCode(); var result = await postResponse.Content.ReadAsStringAsync();