DataSets
The following API calls apply to DataSets.
- DataSetList
- DataSetAdd
- DataSetEdit
- DataSetDelete
- DataSetColumnList
- DataSetColumnAdd
- DataSetColumnEdit
- DataSetColumnDelete
- DataSetDataList
- DataSetDataAdd
- DataSetDataEdit
- DataSetDataDelete
- DataSetSecurityList
- DataSetSecurityAdd
- DataSetSecurityDelete
- DataSetImportCsv
DataSetList
Get a list of DataSets that the authenticated user has view permission to see. Each DataSet will be returned with its details and a flag to indicate the permissions the user has against it.
Parameters
There are no parameters
Response
{ "dataset": [ { "datasetid": "1", "dataset": "Test", "description": "", "ownerid": "1", "view": 1, "edit": 1, "del": 1, "modifyPermissions": 1 }, { "datasetid": "2", "dataset": "Test2", "description": "", "ownerid": "2", "view": 1, "edit": 1, "del": 1, "modifyPermissions": 1 } ], "status": "ok" }
Errors
General Errors Only.
DataSetAdd
Parameters
- dataSet
- The Name for this DataSet. Required.
- description
- A description for this DataSet.
Response
{ "dataset": { "id": "3" }, "status": "ok" }
Errors
General Errors Only.
DataSetEdit
Parameters
- dataSetId
- The ID for this DataSet. Required.
- dataSet
- The Name for this DataSet. Required.
- description
- A description for this DataSet.
Response
{ "success": { "id": true }, "status": "ok" }
Errors
General Errors Only.
DataSetDelete
Parameters
- dataSetId
- The ID for this DataSet. Required.
Response
{ "success": { "id": true }, "status": "ok" }
Errors
General Errors Only.
DataSetColumnList
Parameters
- dataSetId
- The ID for this DataSet. Required.
Response
{ "datasetcolumn": [ { "datasetcolumnid": "3", "heading": "API Column 1", "listcontent": "", "columnorder": "1", "datatype": "String", "datasetcolumntype": "Value" } ], "status": "ok" }
Errors
General Errors Only.
DataSetColumnAdd
Parameters
- dataSetId
- The ID for this DataSet. Required.
- heading
- The Column Heading
- listContent
- A comma separated list to appear as a select list for data entry.
- columnOrder
- The order this column should appear
- dataTypeId
- The data type. See DataTypeList.
- datasetColumnTypeId
- The Column Type for this Column. Either `value` or `formula`. See DataSetColumnTypeList.
- formula
- A formula (in MySQL syntax) to apply to this column
Response
{ "datasetcolumn": { "id": "3" }, "status": "ok" }
Errors
General Errors Only.
DataSetColumnEdit
Parameters
- dataSetId
- The ID for this DataSet. Required.
- dataSetColumnId
- The ID for this DataSet Column. Required.
- heading
- The Column Heading
- listContent
- A comma separated list to appear as a select list for data entry.
- columnOrder
- The order this column should appear
- dataTypeId
- The data type. See DataTypeList.
- datasetColumnTypeId
- The Column Type for this Column. Either `value` or `formula`. See DataSetColumnTypeList.
- formula
- A formula (in MySQL syntax) to apply to this column
Response
{ "success": { "id": true }, "status": "ok" }
Errors
General Errors Only.
DataSetColumnDelete
Parameters
- dataSetId
- The ID for this DataSet. Required.
- dataSetColumnId
- The ID for this DataSet Column. Required.
Response
{ "success": { "id": true }, "status": "ok" }
Errors
General Errors Only.
DataSetDataList
Parameters
- dataSetId
- The ID for this DataSet. Required.
Response
{ "datasetdata": [ { "datasetcolumnid": "1", "rownumber": "1", "value": "Row1-1" }, { "datasetcolumnid": "1", "rownumber": "2", "value": "Row2-1" } ], "status": "ok" }
Errors
General Errors Only.
DataSetDataAdd
Parameters
- dataSetId
- The ID for this DataSet. Required.
- dataSetColumnId
- The ID for this DataSet Column. Required.
- rowNumber
- The Row Number this data should be added with
- value
- The Value to Save in this Row/Column
Response
{ "datasetdata": { "id": 1 }, "status": "ok" }
Errors
General Errors Only.
DataSetDataEdit
Parameters
- dataSetId
- The ID for this DataSet. Required.
- dataSetColumnId
- The ID for this DataSet Column. Required.
- rowNumber
- The Row Number this data should be added with
- value
- The Value to Save in this Row/Column
Response
{ "success": { "id": true }, "status": "ok" }
Errors
General Errors Only.
DataSetDataDelete
Parameters
- dataSetId
- The ID for this DataSet. Required.
- dataSetColumnId
- The ID for this DataSet Column. Required.
- rowNumber
- The Row Number this data should be added with
Response
{ "success": { "id": true }, "status": "ok" }
Errors
General Errors Only.
DataSetSecurityList
Parameters
- dataSetId
- The ID for this DataSet. Required.
Response
{ "datasetgroupsecurity": [ { "groupid": "2", "group": "Everyone", "view": 0, "edit": "1", "del": 0, "isuserspecific": 0 }, { "groupid": "1", "group": "Users", "view": "1", "edit": 0, "del": 0, "isuserspecific": 0 }, { "groupid": "4", "group": "username", "view": 0, "edit": 0, "del": 0, "isuserspecific": "1" } ], "status": "ok" }
Errors
General Errors Only.
DataSetSecurityAdd
Parameters
- dataSetId
- The ID for this DataSet. Required.
- groupId
- The ID for this Group. Required.
- view
- View Permissions (0 = no, 1 = yes). Required.
- edit
- Edit Permissions (0 = no, 1 = yes). Required.
- delete
- Delete Permissions (0 = no, 1 = yes). Required.
Response
{ "success": { "id": true }, "status": "ok" }
Errors
General Errors Only.
DataSetSecurityDelete
Parameters
- dataSetId
- The ID for this DataSet. Required.
- groupId
- The ID for this Group. Required.
Response
{ "success": { "id": true }, "status": "ok" }
Errors
General Errors Only.
DataSetImportCsv
Parameters
- dataSetId
- The ID for this DataSet. Required.
- fileId
- The ID of the CSV file uploaded by LibraryMediaFileUpload. Required.
- spreadSheetMapping
- A JSON object that represents the column mapping. `{"zero based column number":"dataSetColumnId"}`. For example: `{"0":"1","2":"5"}` would be CSV column 1, dataSetColumnId 1 and CSV column 1, dataSetColumnId 5.
- overwrite
- Should the DataSet be cleared first. (0 = No, 1 = Yes) Required.
- ignoreFirstRow
- Should the first row of the CSV file be treated as a Header and ignored. (0 = No, 1 = Yes) Required.
Response
{ "success": { "id": true }, "status": "ok" }
Errors
General Errors Only.
DataTypeList
Parameters
None
Response
{ "datatype": [ { "datatypeid": "1", "0": "1", "datatype": "String", "1": "String" }, { "datatypeid": "2", "0": "2", "datatype": "Number", "1": "Number" }, { "datatypeid": "3", "0": "3", "datatype": "Date", "1": "Date" } ], "status": "ok" }
Errors
General Errors Only.
DataSetColumnTypeList
Parameters
None
Response
{ "datasetcolumntype": [ { "datasetcolumntypeid": "1", "0": "1", "datasetcolumntype": "Value", "1": "Value" }, { "datasetcolumntypeid": "2", "0": "2", "datasetcolumntype": "Formula", "1": "Formula" } ], "status": "ok" }
Errors
General Errors Only.