For AI agents: visit https://docs.zan.top/llms.txt for an index of all pages formatted in Markdown and endpoints in OpenAPI.
You should get an Access Key before you start.
Access Key is generated from SCR console by yourself. The following picture shows how to genenrate Access Key.
Access Key should be added to the header of your request. Here are some examples about how to use Access Key. You can check API reference for more examples.
Shell
curl --request POST \
--url https://api.zan.top/project \
--header 'Authorization: Bearer {Your Access Key}' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"projectName": "demo",
"serviceType": "Express",
"compilerVersion": "0.8.2",
"srcForm": "FILE",
"ifSofiAudit": "false"
}
'
Java
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"projectName\":\"demo\",\"serviceType\":\"Express\",\"compilerVersion\":\"0.8.2\",\"srcForm\":\"FILE\",\"ifSofiAudit\":\"false\"}");
Request request = new Request.Builder()
.url("https://api.zan.top/project")
.post(body)
.addHeader("accept", "application/json")
.addHeader("Authorization", "Bearer {Your Access Key}")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
Go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zan.top/project"
payload := strings.NewReader("{\"projectName\":\"demo\",\"serviceType\":\"Express\",\"compilerVersion\":\"0.8.2\",\"srcForm\":\"FILE\",\"ifSofiAudit\":\"false\"}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept", "application/json")
req.Header.Add("Authorization", "Bearer {Your Access Key}")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
JavaScript
const options = {
method: 'POST',
headers: {
accept: 'application/json',
Authorization: 'Bearer {Your Access Key}',
'content-type': 'application/json'
},
body: JSON.stringify({
projectName: 'demo',
serviceType: 'Express',
compilerVersion: '0.8.2',
srcForm: 'FILE',
ifSofiAudit: 'false'
})
};
fetch('https://api.zan.top/project', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));