Skip to content

Icon Card Related

Through this page's API, you can add and modify icon cards.

Create a Project

URL

/openapi/v1/item/create

Request Content

Parameter Description

Parameter NameExample ValueParameter TypeRequiredParameter Description
onlyNametest_baiduStringNoUnique identifier
iconUrlhttps://xxx.cc/favicon.icoStringNoImage URL
titleBaiduStringNoTitle
urlhttps://xxx.ccStringYesURL
lanUrl-StringNoIntranet URL
description-StringNoDescription
itemGroupID1intNoGroup ID
Either itemGroupID or itemGroupOnlyName
itemGroupID is preferred
Supported from v1.7.*
itemGroupOnlyNamegroup1StringNoGroup unique identifier
Either itemGroupID or itemGroupOnlyName
itemGroupID is preferred
Supported from v1.7.*
isSaveIcontruebooleanNoWhether to save the icon to the project locally
Default: false
If true, it will force save and update
Supported from v1.7.*
Content Example
json
{
    "iconUrl":"",
    "title": "Baidu",
    "onlyName": "test_baidu",
    "url": "https://xxx.cc", 
    "lanUrl": "",
    "description": "",
    "itemGroupID": 100,// Group ID, either with itemGroupOnlyName
    // "itemGroupOnlyName": "sun-app",// Group unique identifier, either with itemGroupID
    "isSaveIcon": true
}

Successful Response

Content Example
javascript
{
    "code": 0,
    "msg": "OK"
}

Error Response

Possible error code: 1202, for specific meanings of error codes, click here

Content Example
javascript
{
    "code": 1202, 
    "msg": "..."
}

Query Project Information by Unique Identifier

URL

/openapi/v1/item/getInfoByOnlyName

Request Content

Parameter Description

Parameter NameExample ValueParameter TypeRequiredParameter Description
onlyNametest_baiduStringYesUnique identifier
Content Example
json
{
    "onlyName": "test_baidu"
}

Successful Response

Parameter Description

Parameter NameExample ValueParameter TypeParameter Description
iconUrl-StringImage URL
titleBaiduStringTitle
onlyNametest_baiduStringUnique identifier
urlhttps://xxx.ccStringURL
lanUrl-StringIntranet URL
description-StringDescription
itemGroupID1intGroup ID Supported from v1.7.*
itemGroupOnlyNamegroup1StringGroup unique identifier Supported from v1.7.*
Content Example
javascript
{
    "code": 0,
    "data": {
        "iconUrl": "",
		"title": "Sun-Panel",
		"onlyName": "sun-panel008",
		"url": "https://sun-panel.top", 
		"lanUrl": "",
		"description": "",
		"itemGroupID": 40,
		"itemGroupOnlyName": "neizhi-app",
    },
    "msg": "OK"
}

Error Response

Possible error code: 1203, for specific meanings of error codes, click here

Content Example
javascript
{
    "code": 1203,
    "msg": "..."
}

Modify a Project

URL

/openapi/v1/item/update

Request Content

Parameter Description

Parameter NameExample ValueParameter TypeRequiredParameter Description
onlyNametest_baiduStringYesUnique identifier
iconUrlhttps://xxx.cc/favicon.icoStringNoImage URL
titleBaiduStringNoTitle
urlhttps://xxx.ccStringNoURL
lanUrl-StringNoIntranet URL
description-StringNoDescription
itemGroupID1intNoGroup ID
Either itemGroupID or itemGroupOnlyName
itemGroupID is preferred
Supported from v1.7.*
itemGroupOnlyNamegroup1StringNoGroup unique identifier
Either itemGroupID or itemGroupOnlyName
itemGroupID is preferred
Supported from v1.7.*
isSaveIcontruebooleanNoWhether to save the icon to the project locally
Default: false
If true, it will force save and update
Supported from v1.7.*
Content Example
json
{
    "iconUrl":"",
    "title": "Baidu",
    "onlyName": "test_baidu",
    "url": "https://xxx.cc", 
    "lanUrl": "",
    "description": "",
    "itemGroupID": 100,// Group ID, either with itemGroupOnlyName
    // "itemGroupOnlyName": "sun-app",// Group unique identifier, either with itemGroupID
    "isSaveIcon": true
}

Successful Response

Content Example
javascript
{
    "code": 0,
    "msg": "OK"
}

Error Response

Possible error codes: 1202, 1203, for specific meanings of error codes, click here

Content Example
javascript
{
    "code": 1202, 
    "msg": "..."
}

Released under the MIT License.