|
|
[Return Home](home)
|
|
|
# "config.json" File Parameters
|
|
|
By default, two backups configurations are defined, a merged document file containing emergency student information and also a spreadsheet of the same student data. You can define more or remove ones that you do not want here in this JSON file. All parameters are required unless specified otherwise.
|
|
|
- `powerschool:` Enter information for your PowerSchool server instance here.
|
|
|
- `powerschool:` Enter information for your PowerSchool server instance here. There are several options for authentication, choose only one.
|
|
|
- `api:` Define the API URL and credentials in this section.
|
|
|
- `base_url:` Enter the base url for your PowerSchool server here.
|
|
|
- `credential_file:` Enter the file name containing the "client_id" and "client_secret" in JSON format for authentication.
|
|
|
- `credential_file:` _(Option 1)_ Enter the file name containing the "client_id" and "client_secret" in JSON format for authentication.
|
|
|
- `access_token:` _(Option 2)_ Enter the access token directly, will need to be updated if it expires or regenerated.
|
|
|
- `plugin:` _(Option 3)_ Uses the keyring acme powerschool module feature to store the client_id and client_secret. You must run the script interactively the first time to enter the client_id and client_secret.
|
|
|
- `client_id:` _(Option 4, use with `client_secret`)_ Enter the client_id directly.
|
|
|
- `client_secret:` _(Option 4, use with `client_id`)_ Enter the client_secret directly.
|
|
|
- `google:` _(Optional)_ Use this to configure your connection to the Google API if you will be uploading the documents to Google Drive.
|
|
|
- `credentials:` Name of the JSON file containing the API Service Account Key.
|
|
|
- `folder:` After sharing the Google Drive folder with the API service account, get the sharable link. The Folder ID is found in the URL. This is everything that comes after `“folder/”` in the URL. For example, if the URL was `“https://drive.google.com/drive/folders/1dyUEebJaFnWa3Z4n0BFMVAXQ7mfUH11g”`, then the Folder ID would be `“1dyUEebJaFnWa3Z4n0BFMVAXQ7mfUH11g”`.
|
... | ... | @@ -16,6 +20,8 @@ By default, two backups configurations are defined, a merged document file conta |
|
|
- `powerschool:` Here you will define which query to run and any arguments
|
|
|
- `query:` Use this section to select and define options for the PowerQuery.
|
|
|
- `name:` Enter the query name from the PowerQuery here (for example `"org.psugIL.PowerSchool.Backup.studentsFull"`)
|
|
|
- `kwargs:` _(Optional)_ Use this to define kwargs for the PowerQuery retrieval
|
|
|
- `data:` _(Optional)_ Use this to define the data. The example below uses
|
|
|
- `headers:` _(Optional)_ Use this to re-order or define specific columns to retrieve from the PowerQuery. This is in a dictionary format with the PowerQuery field name on the left and the display name on the right, like so: `"header:" { "first_name": "first", "last_name": "last" }`
|
|
|
- `headers (renaming option)` _(Optional)_ Use this to re-name columns. This is in a dictionary format with the PowerQuery field name on the left and the display name on the right, like so: `"headers (renaming option)": [
|
|
|
{"field1": "new_field_1"},
|
... | ... | @@ -23,7 +29,7 @@ By default, two backups configurations are defined, a merged document file conta |
|
|
{"field3": "new_field_3"}
|
|
|
],`
|
|
|
- `split:` Use this to split the output into multiple files based on one of the columns in the output. Use the display name defined in the header section if you defined one, otherwise use the PowerQuery field name.
|
|
|
- `google:` _(Optional)_ Use this to configure your connection to the Google API if you will be uploading the documents to Google Drive.
|
|
|
- `google:` _(Optional)_ Use this to configure your the file properties if you will be uploading the documents to Google Drive.
|
|
|
- `file:` Define the file name here. If you used a split, the value in the column(s) you are splitting on will be prepended to the file name.
|
|
|
- `sheet:` _(Only if type of "sheet")_ Name of the tab for the sheet in the file to insert the data.
|
|
|
- `clear:` _(Only if type of "sheet")_ Boolean true or false if the sheet should be cleared prior to upload. _Note: Do not surround true or false with quotation marks here._
|
... | ... | @@ -39,12 +45,7 @@ By default, two backups configurations are defined, a merged document file conta |
|
|
"powerschool": {
|
|
|
"api": {
|
|
|
"base_url": "applegrove.powerschool.com",
|
|
|
"one of these": [
|
|
|
"client_id and client_secret",
|
|
|
"access_token",
|
|
|
"credential_file",
|
|
|
"plugin"
|
|
|
]
|
|
|
"credential_file": "ps.json"
|
|
|
}
|
|
|
},
|
|
|
"google": {
|
... | ... | |