-
Notifications
You must be signed in to change notification settings - Fork 6
Portal beckend API Doc
baseUrl : You can customize your own server baseUrl
Request URL:
-
http://{baseUrl:Port}/api/v1/data-license
Request Method: -
GET application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
type | NO | int | 0:all,1:Data License,2:Data-Specific License,3:DataSource Terms of Use |
pageNum | NO | int | The page number requested |
pageSize | NO | int | The total number of the pages |
token | NO | string | access token |
Request Cases
{
"pageNum":2,
"pageSize":1
}
Return Cases
{
"totalNum":100,
"totalPage":9,
"data":[
{
"id" : 1,
“license_name”:"MIT",
xxxxx
},{
"id" : 2,
“license_name”:"CC BY-SA 4.0",
xxxxx
}
]
}
Request URL:
-
http://{baseUrl:Port}}/api/v1/get_license_basic_by_id
Request Method: -
GET application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
id | NO | int | id |
token | NO | string | access token |
Request Cases
{
"id":2
}
Return Cases
{
"data": {
"id": 1,
"license_name": "MIT License",
"license_type": "License",
"osi_approved": "Yes",
"short_identifier": "MIT"
},
"status": "success"
}
Request URL:
-
http://{baseUrl:Port}}/api/v1/get_license_basic_by_name
Request Method: -
GET application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
name | NO | int | license name |
token | NO | string | access token |
Request Cases
{
"name":"MIT License"
}
Return Cases
{
"data": {
"id": 1,
"license_name": "MIT License",
"license_type": "License",
"osi_approved": "Yes",
"short_identifier": "MIT"
},
"status": "success"
}
Request URL:
-
http://{baseUrl:Port}}/api/v1/search_license_basic_by_name
Request Method: -
GET application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
name | NO | int | license name |
type | NO | int | 0:all,1:Data License,2:Data-Specific License,3:DataSource Terms of Use |
token | NO | string | access token |
Request Cases
{
"name":"MIT License"
}
Return Cases
{
"data": {
"id": 1,
"license_name": "MIT License",
"license_type": "License",
"osi_approved": "Yes",
"short_identifier": "MIT"
},
"status": "success"
}
Request URL:
-
http://{baseUrl:Port}}/api/v1/get_license_data_by_id
Request Method: -
GET application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
id | NO | int | license_id |
token | NO | string | access token |
Request Cases
{
"id":1
}
Return Cases
{
"can":[
{
"id" : 1,
“property”:"Access"
},{
"id" : 2,
“property”:"Modification"
}
]
"cannot":[
{
"id" : 1,
“property”:"Access"
},{
"id" : 2,
“property”:"Modification"
}
]
"obligation":[
{
"id" : 1,
“property”:"Access"
},{
"id" : 2,
“property”:"Modification"
}
]
"limitation":[
{
"id" : 1,
“property”:"Access"
},{
"id" : 2,
“property”:"Modification"
}
]
}
Request URL:
-
http://{baseUrl:Port}}/api/v1/get_license_model_by_id
Request Method: -
GET application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
id | NO | int | license_id |
token | NO | string | access token |
Request Cases
{
"id":1
}
Return Cases
{
"can":[
{
"id" : 1,
“property”:"Access"
},{
"id" : 2,
“property”:"Modification"
}
]
"cannot":[
{
"id" : 1,
“property”:"Access"
},{
"id" : 2,
“property”:"Modification"
}
]
"obligation":[
{
"id" : 1,
“property”:"Access"
},{
"id" : 2,
“property”:"Modification"
}
]
"limitation":[
{
"id" : 1,
“property”:"Access"
},{
"id" : 2,
“property”:"Modification"
}
]
}
Request URL:
-
http://{baseUrl:Port}}/api/v1/get_license_other_by_id
Request Method: -
GET application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
id | NO | int | license_id |
token | NO | string | access token |
Request Cases
{
"id":1
}
Return Cases
{
"data":[
{
"id" : 1,
“property”:"Credit"
"value":xxxxxx
}
{
"id" : 2,
“property”:"license_validity"
"value":xxxxxx
}
{
"id" : 3,
“property”:"Credit"
"value":xxxxxx
}
{
"id" : 4,
“property”:"Credit"
"value":xxxxxx
}
]
}
Request URL:
http://{baseUrl:Port}}/api/v1/add_datalicense
Request Method:
- POST application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
data | NO | json | dataset_name |
token | NO | string | access token |
Request Cases
"data":{
[{
“license_name”:"FFHQ",
"license_type":"MIT"
"short_identifier":xxxxxx
xxxxxx
},
{
“license_name”:"FFHQ",
"license_type":"MIT"
"short_identifier":xxxxxx
xxxxxx
}]
}
Return Cases
{
"affectedRow":"20",
"result":"success",
"data":{
“license_name”:"FFHQ",
"license_type":"MIT"
"short_identifier":xxxxxx
xxxxxx
}
}
Request URL:
-
http://{baseUrl:Port}}/api/v1/dataset
Request Method: -
GET application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
pageNum | NO | int | The page will be displayed |
pageSize | NO | int | how many items in one page |
token | NO | string | access token |
Request Cases
{
"pageNum":2,
"pageSize":1
}
Return Cases
{
"totalNum":100
"totalPage":9
"data":[
{
"id" : 1,
“dataset_name”:"FFHQ",
xxxxx
},{
"id" : 2,
“dataset_name”:"cityscape",
xxxxx
}
]
}
Request URL:
-
http://{baseUrl:Port}}/api/v1/get_dataset_by_id
Request Method: -
GET application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
id | NO | int | dataset_id |
token | NO | string | access token |
Request Cases
{
"id":1
}
Return Cases
{
"data":[
{
"id" : 1,
“dataset_name”:"FFHQ",
"dataset_license":"MIT"
"dataset_license_from":xxxxxx
xxxxxx
}
}
Request URL:
-
http://{baseUrl:Port}}/api/v1/get_dataset_by_name
Request Method: -
GET application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
name | NO | text | dataset_name |
token | NO | string | access token |
Request Cases
{
"name":"FFHQ"
}
Return Cases
{
"data":[
{
"id" : 1,
“dataset_name”:"FFHQ",
"dataset_license":"MIT"
"dataset_license_from":xxxxxx
xxxxxx
}
}
}
Request URL:
-
http://{baseUrl:Port}}/api/v1/search_dataset_by_name
Request Method: -
GET application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
name | NO | text | dataset_name |
token | NO | string | access token |
Request Cases
{
"name":"FFHQ"
}
Return Cases
{
"data":[
{
"id" : 1,
“dataset_name”:"FFHQ",
"dataset_license":"MIT"
"dataset_license_from":xxxxxx
xxxxxx
}
}
}
Request URL:
-
http://{baseUrl:Port}}/api/v1/get_license_index
Request Method: -
GET application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
token | NO | string | access token |
type | NO | int | 0:all,1:license,2:Data-Specific-License,3:DataSource Terms of Use |
Request Cases
{
}
Return Cases
{
"data":[
{
"id" : 1,
“license_name”:"MIT",
}
}
}
Request URL:
-
http://{baseUrl:Port}}/api/v1/get_dataset_index
Request Method: -
GET application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
token | NO | string | access token |
Request Cases
{
}
Return Cases
{
"data":[
{
"id" : 1,
“dataset_name”:"FFHQ",
}
}
}
Request URL:
http://{baseUrl:Port}}/api/v1/add_dataset
Request Method:
- POST application/json Request Params:
Param | Optional | Type | Tips |
---|---|---|---|
data | NO | json | dataset_name |
token | NO | string | access token |
Request Cases
"data":{
[{
“dataset_name”:"FFHQ",
"dataset_license":"MIT"
"dataset_license_from":xxxxxx
xxxxxx
},
{
“dataset_name”:"FFHQ",
"dataset_license":"MIT"
"dataset_license_from":xxxxxx
xxxxxx
}]
}
Return Cases
{
"affectedRow":"20",
"result":"success",
"data":{
“dataset_name”:"FFHQ",
"dataset_license":"MIT"
"dataset_license_from":xxxxxx
xxxxxx
}
}