AppSuite API Specifications
AppSuite API Common Specifications
For common specifications of desknet's NEO API, please refer to: Desknet's NEO Common API Specifications > Common Specifications
Module
Part Identifier/Part Name
Check "Get/set data with part identifier" in [App Settings > API Settings] to be used part identifier instead of part name when part values are gotten/set.
- To get part values, the only parts which have part identifiers will be gotten.
- To set part values, the parts will be specified with part identifiers.
Request
| Parameter Name | The Specified Value | Description |
| app_id | [App] |
Be sure to specify it. Specify app either following forms.
|
Data List API
Overview
Get a list of app data.
Request
| Parameter Name | The Specified Value | Description |
| action | list_data | Fixed value |
| app_id | [App] | Please refer to: AppSuite API Common Specifications |
| fields | [Part Settings JSON] |
Specify parts to be acquired in the response. If omitted, the values of up to 50 parts will be acquired in order from the top. (The part count does not include "\\permissions" but includes "revision".) Specify as JSON object array. Specify field_name or field_alias in each object item. |
| filter | [Narrowing Conditions] | Specify it to the data will be narrowed down by that condition. For the format for specifying the narrowing condition, please refer to: Narrowing Conditions |
| keyword | [Keyword] |
Specify it to the data will be narrowed down by that keyword. The parts that will be searched for when narrowing down are as follows.(Excludes parts that are not Part Types to Be Searched by Keyword.)
|
| sort_field_id | [Part ID] | Specify the part that will be the key of the order. You can check the Part ID in [App Settings > Part Management]. |
| sort_order | [asc | desc] | Specify the order in which the values of the parts specified by sort_field_id are sorted. asc means ascending order, desc means descending order. If omitted, the order is ascending. |
| offset | [Start position] | Specify the number of items to get (0 at the beginning). If omitted, it will be acquired from the beginning. |
| limit | [Maximum number of acquisitions] |
Specify the maximum number of items to be acquired. If omitted, a maximum of 5000 items will be acquired.
* Regardless of the value specified here, the maximum number of items that can be acquired is 5000.
|
Response
| Key | Value | Description |
| list | [Data list] |
The data list is set in item. The format of each data is almost the same as record under data reference API. For the difference with the data reference API, please refer to: Part Types That Can Be Displayed on a List or Calendar Screen |
Example
- curl(bash)
- PowerShell
- Python
- JavaScript
curl 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' \
-H 'X-Desknets-Auth: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-d action=list_data \
--data-urlencode app_id=@sample_app \
--data-urlencode 'fields=[{"field_name":"Charge"},{"field_alias":"customer"}]' \
--data-urlencode 'filter={"item":[{"field_id":"105","operator":"=","value":"-1 months:*"}]}' \
--data-urlencode keyword=Smith \
-d sort_field_id=101 \
-d sort_order=asc \
-d offset=0 \
-d limit=100
$response = Invoke-WebRequest -Uri 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' `
-Headers @{'X-Desknets-Auth'='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'} `
-Method Post `
-Body @{
'action' = 'list_data'
'app_id' = '@sample_app'
'fields' = '[{"field_name":"Charge"},{"field_alias":"customer"}]'
'filter' = '{"item":[{"field_id":"105","operator":"=","value":"-1 months:*"}]}'
'keyword' = 'Smith'
'sort_field_id' = '101'
'sort_order' = 'asc'
'offset' = '0'
'limit' = '100'
}
$response.Content
import json
import httpx
URL = "https://local.yourdomain/cgi-bin/dneo/appsr.cgi"
ACCESS_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
headers = {
"X-Desknets-Auth": ACCESS_KEY,
}
fields = [
{ "field_name": "Charge" },
{ "field_alias": "customer" },
]
filter = {
"item": [
{ "field_id": "105", "operator": "=", "value": "-1 months:*" },
],
}
payload = {
"action": "list_data",
"app_id": "@sample_app",
"fields": json.dumps(fields),
"filter": json.dumps(filter),
"keyword": "Smith",
"sort_field_id": "101",
"sort_order": "asc",
"offset": "0",
"limit": "100",
}
response = httpx.post(URL, headers=headers, data=payload)
print(response.json())
const url = 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi';
const access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const headers = {
'X-Desknets-Auth': access_key,
};
const fields = [
{ field_name: 'Charge' },
{ field_alias: 'customer' },
];
const filter = {
item: [
{ field_id: '105', operator: '=', value: '-1 months:*' },
],
};
const payload = {
action: 'list_data',
app_id: '@sample_app',
fields: JSON.stringify(fields),
filter: JSON.stringify(filter),
keyword: 'Smith',
sort_field_id: '101',
sort_order: 'asc',
offset: '0',
limit: '100',
};
fetch(url, {
method: 'POST',
headers,
body: new URLSearchParams(payload),
})
.then(response => {
return response.json();
})
.then(json => {
console.log(json);
});
Data Count Acquisition API
Overview
Request
| Parameter Name | The Specified Value | Description |
| action | count_data | Fixed value |
| app_id | [App ID | @App identifier] | Please refer to: AppSuite API Common Specifications |
| fields | [Part Settings JSON] |
Specify the target part for keyword search. For details, see keyword explanation. The format is same as fields of data list API. |
| filter | [Narrowing Conditions] | Specify it to the data will be narrowed down by that condition. For the format for specifying the narrowing condition, please refer to: Narrowing Conditions |
| keyword | [Keyword] | Specify it to the data will be narrowed down by that keyword. The parts that will be searched for when narrowing down are as follows.(Excludes parts that are not Part Types to Be Searched by Keyword.)
|
Response
| Key | Value | Description |
| allcnt | [Number of Data] | The number of application data. If you specify a condition, the number will be narrowed down by that condition. |
Example
- curl(bash)
- PowerShell
- Python
- JavaScript
curl 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' \
-H 'X-Desknets-Auth: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-d action=count_data \
--data-urlencode app_id=@sample_app \
--data-urlencode 'fields=[{"field_alias":"customer"}]' \
--data-urlencode 'filter={"item":[{"field_id":"105","operator":"=","value":"-1 months:*"}]}' \
--data-urlencode keyword=Smith
$response = Invoke-WebRequest -Uri 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' `
-Headers @{'X-Desknets-Auth'='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'} `
-Method Post `
-Body @{
'action' = 'count_data'
'app_id' = '@sample_app'
'fields' = '[{"field_alias":"customer"}]'
'filter' = '{"item":[{"field_id":"105","operator":"=","value":"-1 months:*"}]}'
'keyword' = 'Smith'
}
$response.Content
import json
import httpx
URL = "https://local.yourdomain/cgi-bin/dneo/appsr.cgi"
ACCESS_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
headers = {
"X-Desknets-Auth": ACCESS_KEY,
}
fields = [
{ "field_alias": "customer" },
]
filter = {
"item": [
{ "field_id": "105", "operator": "=", "value": "-1 months:*" },
],
}
payload = {
"action": "count_data",
"app_id": "@sample_app",
"fields": json.dumps(fields),
"filter": json.dumps(filter),
"keyword": "Smith",
}
response = httpx.post(URL, headers=headers, data=payload)
print(response.json())
const url = 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi';
const access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const headers = {
'X-Desknets-Auth': access_key,
};
const fields = [
{ field_alias: 'customer' },
];
const filter = {
item: [
{ field_id: '105', operator: '=', value: '-1 months:*' },
],
};
const payload = {
action: 'count_data',
app_id: '@sample_app',
fields: JSON.stringify(fields),
filter: JSON.stringify(filter),
keyword: 'Smith',
};
fetch(url, {
method: 'POST',
headers,
body: new URLSearchParams(payload),
})
.then(response => {
return response.json();
})
.then(json => {
console.log(json);
});
Data Reference API
Overview
Request
| Parameter Name | The Specified Value | Description |
| action | get_data | Fixed value |
| app_id | [App ID | @App identifier] | Please refer to: AppSuite API Common Specifications |
| data_id | [Data ID] | Be sure to specify it. Specify the data ID of the data to be acquired. |
| load_rel_list | [on | off] | When specify "on" or omitted, reference list values will be actual value. Otherwise, reference list values will be empty. |
Response
For more details of "Part Identifier/Part Name", please refer to: AppSuite API Common Specifications
| Key | Value | Description |
| allow_write | [Update Right of Data] | on if this data can be modified, off otherwise. |
| allow_delete | [Delete Right of Data] | on if this data can be deleted, off otherwise. |
| revision | [Revision Number] | This is the revision number of this data, which prevents confliction when users update at same time. |
| val | [Part Value] | Please refer to: JSON Object Value of Part Value |
| deny_write | on | deny_write is set to on if this part value cannot be changed, do not display deny_write otherwise. |
| type | [Calculation Result Type] | The type of calculation result is set. (Only when parts are auto calculation) |
| hint | [Calculation Error Content] | In case of a calculation error, the error content is set. (Only when parts are auto calculation) |
| error | [Error Code] |
If the part value is an error, the following error code will be set.
|
| Part | Value Format |
| Text (1 Line), Text (Multi Line), Radio Button, Pull Down, Number, Rich Text, ID | The value is set as is. |
| Check Box, List Box | Chosen values are set with tab delimiters. |
| Date | The value is set in the format of yyyy-MM-dd. |
| Time | The value is set in seconds since 00:00:00. |
| Date/Time | The value is set in the format of yyyy-MM-ddTHH:mm. |
| Attachment Files |
|
| Auto Calculation | The value of the calculation result is set. |
| Select User, User |
|
| Select Group |
|
| Table Part |
For more details of "Part Identifier/Part Name", please refer to: AppSuite API Common Specifications |
| Reference List | The format is same as table part one. For "Part Identifier/Part Name", the settings of the self app are applied. |
Example
- curl(bash)
- PowerShell
- Python
- JavaScript
curl 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' \
-H 'X-Desknets-Auth: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-d action=get_data \
--data-urlencode app_id=@sample_app \
-d data_id=1
$response = Invoke-WebRequest -Uri 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' `
-Headers @{'X-Desknets-Auth'='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'} `
-Method Post `
-Body @{
'action' = 'get_data'
'app_id' = '@sample_app'
'data_id' = '1'
}
$response.Content
import httpx
URL = "https://local.yourdomain/cgi-bin/dneo/appsr.cgi"
ACCESS_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
headers = {
"X-Desknets-Auth": ACCESS_KEY,
}
payload = {
"action": "get_data",
"app_id": "@sample_app",
"data_id": "1",
}
response = httpx.post(URL, headers=headers, data=payload)
print(response.json())
const url = 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi';
const access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const headers = {
'X-Desknets-Auth': access_key,
};
const payload = {
action: 'get_data',
app_id: '@sample_app',
data_id: '1',
};
fetch(url, {
method: 'POST',
headers,
body: new URLSearchParams(payload),
})
.then(response => {
return response.json();
})
.then(json => {
console.log(json);
});
Data Download API
Overview
Request
Response
Example
- curl(bash)
- PowerShell
- Python
- JavaScript
curl 'https://local.yourdomain/cgi-bin/dneo/appsuite.cgi?action=download_data_file&app_id=1&field_id=104&id=1' \
-H 'X-Desknets-Auth: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--output documents.zip
Invoke-WebRequest -Uri 'https://local.yourdomain/cgi-bin/dneo/appsuite.cgi?action=download_data_file&app_id=1&field_id=104&id=1' `
-Headers @{'X-Desknets-Auth'='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'} `
-OutFile documents.zip
import httpx
URL = "https://local.yourdomain/cgi-bin/dneo/appsuite.cgi"
ACCESS_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
headers = {
"X-Desknets-Auth": ACCESS_KEY,
}
payload = {
"action": "download_data_file",
"app_id": "1",
"field_id": "104",
"id": "1",
}
response = httpx.post(URL, headers=headers, data=payload)
with open("documents.zip", "wb") as fp:
fp.write(response.content)
const fs = require('fs')
const url = 'https://local.yourdomain/cgi-bin/dneo/appsuite.cgi';
const access_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const headers = {
'X-Desknets-Auth': access_key,
};
const payload = {
action: 'download_data_file',
app_id: '1',
field_id: '104',
id: '1',
};
fetch(url, {
method: 'POST',
headers,
body: new URLSearchParams(payload),
})
.then(response => {
return response.arrayBuffer();
})
.then(buffer => {
fs.writeFile('documents.zip', Buffer.from(buffer), err => {
if (err) {
console.log('fail');
}
else {
console.log('success');
}
});
});
Data Addition API
Overview
Request
| Parameter Name | The Specified Value | Description |
| action | insert_data | Fixed value |
| app_id | [App ID | @App identifier] | Please refer to: AppSuite API Common Specifications |
| relookup_key_field | [Part ID] |
Specify part ID of key parts to copy values to duplicate parts. (Multiple entry available) The key parts must be specified in the parameter: {{Part Identifier/Part Name}} |
| auto_action | [on | off] | Specify off to prevent to run the add/update actions with the API. Specify on or omit to run them. |
| {{Part Identifier/Part Name}} | [Part Value] |
Specify value for part. Value format for part types is following.
For more details of "Part Identifier/Part Name", please refer to: AppSuite API Common Specifications |
| {{Table Part}}Row.{{Attachment Files}} | [File] | Upload file to attachment files part of specified row (0 at the beginning) of the table part. Send with "multipart/form-data" at that time. |
Response
| Key | Value | Description |
| ID | [Data ID] | Data ID of the added data. |
Example
- curl(bash)
- PowerShell
- Python
- JavaScript
curl 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' \
-H 'X-Desknets-Auth: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-d action=insert_data \
--data-urlencode app_id=@sample_app \
-d relookup_key_field=101 \
-d relookup_key_field=112 \
--data-urlencode '{{charge}}=1' \
--data-urlencode '{{customer}}=Mary Smith' \
--data-urlencode '{{details}}=[{"use":"Hotel Expenses","price":"10000"},{"use":"Entertainment Expenses"","price":"8000"}]'
Invoke-WebRequest -Uri 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' `
-Headers @{'X-Desknets-Auth'='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'} `
-Method Post `
-Body @{
'action' = 'insert_data'
'app_id' = '@sample_app'
'relookup_key_field' = '101'
'{{charge}}' = '1'
'{{customer}}' = 'Mary Smith'
'{{details}}' = '[{"use":"Hotel Expenses","price":"10000"},{"use":"Entertainment Expenses"","price":"8000"}]'
}
$response.Content
import json
import httpx
URL = "https://local.yourdomain/cgi-bin/dneo/appsr.cgi"
ACCESS_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
headers = {
"X-Desknets-Auth": ACCESS_KEY,
}
details = [
{ "use": "Hotel Expenses", "price": "10000" },
{ "use": "Entertainment Expenses", "price": "8000" },
]
payload = {
"action": "insert_data",
"app_id": "@sample_app",
"relookup_key_field": "101",
"{{charge}}": "1",
"{{customer}}": "Mary Smith",
"{{details}}": json.dumps(details),
}
response = httpx.post(URL, headers=headers, data=payload)
print(response.json())
const url = 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi';
const access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const headers = {
'X-Desknets-Auth': access_key,
};
const details = [
{ use: 'Hotel Expenses', price: '10000' },
{ use: 'Entertainment Expenses', price: '8000' },
];
const payload = {
action: 'insert_data',
app_id: '@sample_app',
relookup_key_field: '101',
'{{charge}}': '1',
'{{customer}}': 'Mary Smith',
'{{details}}': JSON.stringify(details),
};
fetch(url, {
method: 'POST',
headers,
body: new URLSearchParams(payload),
})
.then(response => {
return response.json();
})
.then(json => {
console.log(json);
});
- curl(bash)
- PowerShell
- Python
- JavaScript
curl 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' \
-H 'X-Desknets-Auth: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--form-string action=insert_data \
--form-string app_id=@sample_app \
--form-string '{{charge}}=1' \
--form-string '{{customer}}=Mary Smith' \
-F '{{document}}=@documents.zip' \
--form-string '{{details}}=[{"use":"Hotel Expenses","price":"10000"},{"use":"Entertainment Expenses","price":"8000"}]' \
-F '{{details}}0.{{document}}=@receipt.png'
Add-Type -AssemblyName 'System.Net.Http'
$formData = New-Object System.Net.Http.MultipartFormDataContent
$action = New-Object System.Net.Http.StringContent('insert_data')
$action.Headers.Clear()
$action.Headers.Add('Content-Disposition', 'form-data; name="action"')
$formData.Add($action)
$app_id = New-Object System.Net.Http.StringContent('@sample_app')
$app_id.Headers.Clear()
$app_id.Headers.Add('Content-Disposition', 'form-data; name="app_id"')
$formData.Add($app_id)
$charge = New-Object System.Net.Http.StringContent('1')
$charge.Headers.Clear()
$charge.Headers.Add('Content-Disposition', 'form-data; name="{{charge}}"')
$formData.Add($charge)
$customer = New-Object System.Net.Http.StringContent('Mary Smith')
$customer.Headers.Clear()
$customer.Headers.Add('Content-Disposition', 'form-data; name="{{customer}}"')
$formData.Add($customer)
$document = New-Object System.Net.Http.StreamContent([System.IO.File]::OpenRead('./documents.zip'))
$document.Headers.Add('Content-Disposition', 'form-data; name="{{document}}"; filename="documents.zip"');
$document.Headers.Add('Content-Type', 'application/zip');
$formData.Add($document)
$details = New-Object System.Net.Http.StringContent('[{"use":"Hotel Expenses","price":"10000"},{"use":"Entertainment Expenses"","price":"8000"}]')
$details.Headers.Clear()
$details.Headers.Add('Content-Disposition', 'form-data; name="{{details}}"')
$formData.Add($details)
$detailsAdd = New-Object System.Net.Http.StreamContent([System.IO.File]::OpenRead('./receipt.png'))
$detailsAdd.Headers.Add('Content-Disposition', 'form-data; name="{{details}}0.{{document}}"; filename="receipt.png"');
$detailsAdd.Headers.Add('Content-Type', 'image/png');
$formData.Add($detailsAdd)
$headers = @{
'X-Desknets-Auth' = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
'Content-Type' = $formData.Headers.ContentType
}
$body = $formData.ReadAsByteArrayAsync().Result
$response = Invoke-WebRequest -Uri 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' -Headers $headers -Method Post -Body $body
$response.Content
import json
import httpx
URL = "https://local.yourdomain/cgi-bin/dneo/appsr.cgi"
ACCESS_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
headers = {
"X-Desknets-Auth": ACCESS_KEY,
}
details = [
{ "use": "Hotel Expenses", "price": "10000" },
{ "use": "Entertainment Expenses", "price": "8000" },
]
payload = {
"action": "insert_data",
"app_id": "@sample_app",
"{{charge}}": "1",
"{{customer}}": "Mary Smith",
"{{details}}": json.dumps(details),
}
with open("documents.zip", "rb") as fp_zip, open("receipt.png", "rb") as fp_png:
response = httpx.post(URL, headers=headers, data=payload, files={
"{{document}}": fp_zip,
"{{details}}0.{{document}}": fp_png,
})
print(response.json())
const fs = require('fs');
const url = 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi';
const access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const headers = {
'X-Desknets-Auth': access_key,
};
const fp_zip = fs.readFileSync('documents.zip');
const fp_png = fs.readFileSync('receipt.png');
const details = [
{ use: 'Hotel Expenses', price: '10000' },
{ use: 'Entertainment Expenses', price: '8000' },
];
const payload = new FormData();
payload.append('action', 'insert_data');
payload.append('app_id', '@sample_app');
payload.append('{{charge}}', '1');
payload.append('{{customer}}', 'Mary Smith');
payload.append('{{document}}', new Blob([fp_zip]), 'documents.zip');
payload.append('{{details}}', JSON.stringify(details));
payload.append('{{details}}0.{{document}}', new Blob([fp_png]), 'receipt.png');
fetch(url, {
method: 'POST',
headers,
body: new URLSearchParams(payload),
})
.then(response => {
return response.json();
})
.then(json => {
console.log(json);
});
Data Update API
Overview
Request
| Parameter Name | The Specified Value | Description |
| action | update_data | Fixed value |
| app_id | [App ID | @App identifier] | Please refer to: AppSuite API Common Specifications |
| data_id | [Data ID] | Be sure to specify it. Specify the data ID of the data to be changed. |
| relookup_key_field | [Part ID] | Same as one of data addition API. |
| auto_action | [on | off] | Specify off to prevent to run the add/update actions with the API. Specify on or omit to run them. |
| {{revision}} | [Revision Number] | Be sure to specify it. It is verified whether the specified value and the revision number of the data match. If you specify 0, it is not verified. |
| {{Part Identifier/Part Name}} | [Part Value] |
Same as one of data addition API except for following.
For more details of "Part Identifier/Part Name", please refer to: AppSuite API Common Specifications |
| {{Attachment Files}}.del_attachment_id | [File System ID] | Delete the file with specfied file system ID. |
| {{Table Part}}Row.{{Attachment Files}} | [File] | Upload file to attachment files part of specified row (0 at the beginning) of the table part. Send with "multipart/form-data" at that time. |
| {{Table Part}}Row.{{Attachment Files}}.del_attachment_id | [File System ID] | Delete the file with specfied file system ID of specified row (0 at the beginning) of the table part. |
Response
| Key | Value | Description |
| ID | [Data ID] | Data ID of the added data. |
Example
- curl(bash)
- PowerShell
- Python
- JavaScript
curl 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' \
-H 'X-Desknets-Auth: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-d action=update_data \
--data-urlencode app_id=@sample_app \
-d data_id=1 \
--data-urlencode '{{revision}}=1' \
--data-urlencode '{{charge}}=1' \
--data-urlencode '{{details}}=[{"data_id":"1","use":"Hotel Expenses","price":"10000"},{"use":"Entertainment Expenses","price":"8000"}]'
$response = Invoke-WebRequest -Uri 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' `
-Headers @{'X-Desknets-Auth'='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'} `
-Method Post `
-Body @{
'action' = 'update_data'
'app_id' = '@sample_app'
'data_id' = '1'
'relookup_key_field' = '101'
'{{revision}}' = '1'
'{{charge}}' = '1'
'{{details}}' = '[{"data_id":"1","use":"Hotel Expenses","price":"10000"},{"use":"Entertainment Expenses","price":"8000"}]'
}
$response.Content
import json
import httpx
URL = "https://local.yourdomain/cgi-bin/dneo/appsr.cgi"
ACCESS_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
headers = {
"X-Desknets-Auth": ACCESS_KEY,
}
details = [
{ "data_id": "1", "use": "Hotel Expenses", "price": "10000" },
{ "use": "Entertainment Expenses", "price": "8000" },
]
payload = {
"action": "update_data",
"app_id": "@sample_app",
"data_id": "1",
"{{revision}}": "1",
"{{charge}}": "1",
"{{details}}": json.dumps(details),
}
response = httpx.post(URL, headers=headers, data=payload)
print(response.json())
const url = 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi';
const access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const headers = {
'X-Desknets-Auth': access_key,
};
const details = [
{ data_id: '1', use: 'Hotel Expenses', price: '10000' },
{ use: 'Entertainment Expenses', price: '8000' },
];
const payload = {
action: 'update_data',
app_id: '@sample_app',
data_id: '1',
'{{revision}}': '1',
'{{charge}}': '1',
'{{details}}': JSON.stringify(details),
};
fetch(url, {
method: 'POST',
headers,
body: new URLSearchParams(payload),
})
.then(response => {
return response.json();
})
.then(json => {
console.log(json);
});
- curl(bash)
- PowerShell
- Python
- JavaScript
curl 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' \
-H 'X-Desknets-Auth: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
--form-string action=update_data \
--form-string app_id=@sample_app \
--form-string data_id=1 \
--form-string '{{revision}}=1' \
--form-string '{{charge}}=1' \
-F '{{document}}=@documents.zip' \
--form-string '{{document}}.del_attachment_id=10' \
--form-string '{{details}}=[{"data_id":"1","use":"Hotel Expenses","price":"10000"},{"use":"Entertainment Expenses","price":"8000"}]' \
-F '{{details}}0.{{document}}=@receipt.png' \
--form-string '{{details}}0.{{document}}.del_attachment_id=10'
Add-Type -AssemblyName 'System.Net.Http'
$formData = New-Object System.Net.Http.MultipartFormDataContent
$action = New-Object System.Net.Http.StringContent('update_data')
$action.Headers.Clear()
$action.Headers.Add('Content-Disposition', 'form-data; name="action"')
$formData.Add($action)
$app_id = New-Object System.Net.Http.StringContent('@sample_app')
$app_id.Headers.Clear()
$app_id.Headers.Add('Content-Disposition', 'form-data; name="app_id"')
$formData.Add($app_id)
$data_id = New-Object System.Net.Http.StringContent('1')
$data_id.Headers.Clear()
$data_id.Headers.Add('Content-Disposition', 'form-data; name="data_id"')
$formData.Add($data_id)
$revision = New-Object System.Net.Http.StringContent('1')
$revision.Headers.Clear()
$revision.Headers.Add('Content-Disposition', 'form-data; name="{{revision}}"')
$formData.Add($revision)
$charge = New-Object System.Net.Http.StringContent('1')
$charge.Headers.Clear()
$charge.Headers.Add('Content-Disposition', 'form-data; name="{{charge}}"')
$formData.Add($charge)
$document = New-Object System.Net.Http.StreamContent([System.IO.File]::OpenRead('./documents.zip'))
$document.Headers.Add('Content-Disposition', 'form-data; name="{{document}}"; filename="documents.zip"');
$document.Headers.Add('Content-Type', 'application/zip');
$formData.Add($document)
$details = New-Object System.Net.Http.StringContent('[{"use":"Hotel Expenses","price":"10000"},{"use":"Entertainment Expenses","price":"8000"}]')
$details.Headers.Clear()
$details.Headers.Add('Content-Disposition', 'form-data; name="{{details}}"')
$formData.Add($details)
$detailsAdd = New-Object System.Net.Http.StreamContent([System.IO.File]::OpenRead('./receipt.png'))
$detailsAdd.Headers.Add('Content-Disposition', 'form-data; name="{{details}}0.{{document}}"; filename="receipt.png"');
$detailsAdd.Headers.Add('Content-Type', 'image/png');
$formData.Add($detailsAdd)
$detailsDelete = New-Object System.Net.Http.StringContent('10')
$detailsDelete.Headers.Clear()
$detailsDelete.Headers.Add('Content-Disposition', 'form-data; name="{{details}}0.{{document}}.del_attachment_id"')
$formData.Add($detailsDelete)
$headers = @{
'X-Desknets-Auth' = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
'Content-Type' = $formData.Headers.ContentType
}
$body = $formData.ReadAsByteArrayAsync().Result
$response = Invoke-WebRequest -Uri 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' -Headers $headers -Method Post -Body $body
$response.Content
import json
import httpx
URL = "https://local.yourdomain/cgi-bin/dneo/appsr.cgi"
ACCESS_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
headers = {
"X-Desknets-Auth": ACCESS_KEY,
}
details = [
{ "data_id": "1", "use": "Hotel Expenses", "price": "10000" },
{ "use": "Entertainment Expenses", "price": "8000" },
]
payload = {
"action": "update_data",
"app_id": "@sample_app",
"data_id": "1",
"{{revision}}": "1",
"{{charge}}": "1",
"{{document}}.del_attachment_id": "10",
"{{details}}": json.dumps(details),
"{{details}}0.{{document}}.del_attachment_id": "10",
}
with open("documents.zip", "rb") as fp_zip, open("receipt.png", "rb") as fp_png:
response = httpx.post(URL, headers=headers, data=payload, files={
"{{document}}": fp_zip,
"{{details}}0.{{document}}": fp_png,
})
print(response.json())
const fs = require('fs');
const url = 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi';
const access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const headers = {
'X-Desknets-Auth': access_key,
};
const fp_zip = fs.readFileSync('documents.zip');
const fp_png = fs.readFileSync('receipt.png');
const details = [
{ data_id: '1', use: 'Hotel Expenses', price: '10000' },
{ use: 'Entertainment Expenses', price: '8000' },
];
const payload = new FormData();
payload.append('action', 'udpate_data');
payload.append('app_id', '@sample_app');
payload.append('data_id', '1');
payload.append('{{revision}}', '1');
payload.append('{{charge}}', '1');
payload.append('{{document}}', new Blob([fp_zip]), 'documents.zip');
payload.append('{{document}}.del_attachment_id', '10');
payload.append('{{details}}', JSON.stringify(details));
payload.append('{{details}}0.{{document}}', new Blob([fp_png]), 'receipt.png');
payload.append('{{details}}0.{{document}}.del_attachment_id', '10');
fetch(url, {
method: 'POST',
headers,
body: new URLSearchParams(payload),
})
.then(response => {
return response.json();
})
.then(json => {
console.log(json);
});
Data Deletion API
Overview
Request
| Parameter Name | The Specified Value | Description |
| action | delete_data | Fixed value |
| app_id | [App ID | @App identifier] | Please refer to: AppSuite API Common Specifications |
| data_id | [Data ID] | Specify the data ID of the data to be deleted. Send as comma separated parameter or multiple parameters to delete the multiple data. |
Response
| Key | Value | Description |
| delete_count | [Number of Deleted Data] | The number of actually deleted data. |
Example
- curl(bash)
- PowerShell
- Python
- JavaScript
curl 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' \
-H 'X-Desknets-Auth: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-d action=delete_data \
--data-urlencode app_id=@sample_app \
-d data_id=1,2
$response = Invoke-WebRequest -Uri 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' `
-Headers @{'X-Desknets-Auth'='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'} `
-Method Post `
-Body @{
'action' = 'delete_data'
'app_id' = '@sample_app'
'data_id' = '1,2'
}
$response.Content
import httpx
URL = "https://local.yourdomain/cgi-bin/dneo/appsr.cgi"
ACCESS_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
headers = {
"X-Desknets-Auth": ACCESS_KEY,
}
payload = {
"action": "delete_data",
"app_id": "@sample_app",
"data_id": "1,2",
}
response = httpx.post(URL, headers=headers, data=payload)
print(response.json())
const url = 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi';
const access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const headers = {
'X-Desknets-Auth': access_key,
};
const payload = {
action: 'delete_data',
app_id: '@sample_app',
data_id: '1,2',
};
fetch(url, {
method: 'POST',
headers,
body: new URLSearchParams(payload),
})
.then(response => {
return response.json();
})
.then(json => {
console.log(json);
});
- curl(bash)
- PowerShell
- Python
- JavaScript
curl 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' \
-H 'X-Desknets-Auth: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-d action=delete_data \
--data-urlencode app_id=@sample_app \
-d data_id=1 \
-d data_id=2
$response = Invoke-WebRequest -Uri 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' `
-Headers @{'X-Desknets-Auth'='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'} `
-Method Post `
-Body 'action=delete_data&app_id=@sample_app&data_id=1&data_id=2'
$response.Content
import httpx
URL = "https://local.yourdomain/cgi-bin/dneo/appsr.cgi"
ACCESS_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
headers = {
"X-Desknets-Auth": ACCESS_KEY,
}
payload = "action=delete_data&app_id=@sample_app&data_id=1&data_id=2"
response = httpx.post(URL, headers=headers, data=payload)
print(response.json())
const url = 'https://local.yourdomain/cgi-bin/dneo/appsuite.cgi';
const access_key = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const headers = {
'X-Desknets-Auth': access_key,
};
const payload = 'action=delete_data&app_id=@sample_app&data_id=1&data_id=2';
fetch(url, {
method: 'POST',
headers,
body: payload,
})
.then(response => {
return response.json();
})
.then(json => {
console.log(json);
});
App Label List API
Overview
Request
| Parameter Name | The Specified Value | Description |
| action | list_applabels | Fixed value |
Response
| Key | Value | Description |
| id | [Label ID] | A ID of each label. |
| name | [Label name] | A name of each label. |
| color | [Label color] | A color of each label. The color is specified to blue, green, yellow, pink, red or gray. |
| parent_id | [Label ID] | A ID of a parent label of each label. A label without parent label is specified to empty. |
Example
- curl(bash)
- PowerShell
- Python
- JavaScript
curl 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' \
-H 'X-Desknets-Auth: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-d action=list_applabels
$response = Invoke-WebRequest -Uri 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' `
-Headers @{'X-Desknets-Auth'='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'} `
-Method Post `
-Body @{
'action' = 'list_applabels'
}
$response.Content
import httpx
URL = "https://local.yourdomain/cgi-bin/dneo/appsr.cgi"
ACCESS_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
headers = {
"X-Desknets-Auth": ACCESS_KEY,
}
payload = {
"action": "list_applabels",
}
response = httpx.post(URL, headers=headers, data=payload)
print(response.json())
const url = 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi';
const access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const headers = {
'X-Desknets-Auth': access_key,
};
const payload = {
action: 'list_applabels',
};
fetch(url, {
method: 'POST',
headers,
body: new URLSearchParams(payload),
})
.then(response => {
return response.json();
})
.then(json => {
console.log(json);
});
App List API
Overview
Request
| Parameter Name | The Specified Value | Description |
| action | list_apps | Fixed value |
| label_id | [Label ID | all | self | favorite] |
Specify a label ID to get only apps with the label. Omit it to get apps regardless of labels. Addtionally, the following values can be specified.
|
| keyword | [Keyword] | Specify it to get only apps with the keyword in the name or description. |
| offset | [Start position] | Specify the number of items to get (0 at the beginning). If omitted, it will be acquired from the beginning. |
| limit | [Maximum number of acquisitions] |
Specify the maximum number of items to be acquired. If omitted, a maximum of 5000 items will be acquired.
|
Response
| Key | Value | Description |
| id | [App ID] | A ID of each app. |
| name | [App name] | A name of each app. |
| app_status | [App status] |
A status of each app which is specified following values.
|
| overview_text | [Description] | A text extracted from a description of each app. It is up to 256 chracters. |
| portal_icon | [Icon URL for the portal] | A icon URL for the portal of each app. |
| pallet_menu_icon | [Icon URL for the palette menu] | A icon URL for the palette menu of each app. |
Example
- curl(bash)
- PowerShell
- Python
- JavaScript
curl 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' \
-H 'X-Desknets-Auth: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-d action=list_apps \
-d label_id=3 \
--data-urlencode keyword=Inventory \
-d offset=0 \
-d limit=100
$response = Invoke-WebRequest -Uri 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' `
-Headers @{'X-Desknets-Auth'='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'} `
-Method Post `
-Body @{
'action' = 'list_apps'
'label_id' = '3'
'keyword' = 'Inventory'
'offset' = '0'
'limit' = '100'
}
$response.Content
import httpx
URL = "https://local.yourdomain/cgi-bin/dneo/appsr.cgi"
ACCESS_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
headers = {
"X-Desknets-Auth": ACCESS_KEY,
}
payload = {
"action": "list_apps",
"label_id": "3",
"keyword": "Inventory",
"offset": "0",
"limit": "100",
}
response = httpx.post(URL, headers=headers, data=payload)
print(response.json())
const url = 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi';
const access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const headers = {
'X-Desknets-Auth': access_key,
};
const payload = {
action: 'list_apps',
label_id: '3',
keyword: 'Inventory',
offset: '0',
limit: '100',
};
fetch(url, {
method: 'POST',
headers,
body: new URLSearchParams(payload),
})
.then(response => {
return response.json();
})
.then(json => {
console.log(json);
});
App Details API
Overview
Request
| Parameter Name | The Specified Value | Description |
| action | get_app | Fixed value |
| app_id | [App] | Please refer to: AppSuite API Common Specifications |
Response
| Key | Value | Description |
| id | [App ID] | The ID of the app. |
| name | [App name] | The name of the app. |
| app_status | [App status] |
The app status of the app which is specified following values.
|
| overview_text | [Description] | The HTML style description of the app. |
| portal_icon | [Icon URL for the portal] | The icon URL for the portal of the app. |
| pallet_menu_icon | [Icon URL for the palette menu] | The icon URL for the palette menu of the app. |
| fields | [Parts] | The created part list is set in item. The format of each part is descripted in JSON object value of part. |
| Key | Value | Description |
| id | [Part ID] | A ID of each part. |
| name | [Part name] | A name of each part. |
| field_alias | [Part identifier] | A identifier of each part. |
| is_ref | [on | off] | on if the part is reference part, off otherwise. |
| readonly | [on | off] | on if the part is read only, off if it is writable. |
| system | [on | off] | on if the part is system part, off otherwise. A value of a reference part is one of its source part. |
| type | [Part type] |
A type of each part. The types are following.
|
| options | [Selections] | A tab separeted selections of each part. A value of a reference part is one of its source part. |
| allow_other | [on | off] | on if the part is allowed to input value not in selections, off otherwise. A value of a reference part is one of its source part. |
| time_unit | [Unit of time entry] | An Unit of time entry with minutes of each part. A value of a reference part is one of its source part. |
| child | [Parts in table part | Parts in reference list] | The part list in each table part or reference list is set in list > item. |
Example
- curl(bash)
- PowerShell
- Python
- JavaScript
curl 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' \
-H 'X-Desknets-Auth: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
-d action=get_app \
-d app_id=@sample_app
$response = Invoke-WebRequest -Uri 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi' `
-Headers @{'X-Desknets-Auth'='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'} `
-Method Post `
-Body @{
'action' = 'get_app'
'app_id' = '@sample_app'
}
$response.Content
import httpx
URL = "https://local.yourdomain/cgi-bin/dneo/appsr.cgi"
ACCESS_KEY = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
headers = {
"X-Desknets-Auth": ACCESS_KEY,
}
payload = {
"action": "get_app",
"app_id": "@sample_app",
}
response = httpx.post(URL, headers=headers, data=payload)
print(response.json())
const url = 'https://local.yourdomain/cgi-bin/dneo/appsr.cgi';
const access_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
const headers = {
'X-Desknets-Auth': access_key,
};
const payload = {
action: 'get_app',
app_id: '@sample_app',
};
fetch(url, {
method: 'POST',
headers,
body: new URLSearchParams(payload),
})
.then(response => {
return response.json();
})
.then(json => {
console.log(json);
});
