organisations - bruno-beloff/scs_analysis GitHub Wiki
docs > software repositories > scs_analysis > commands > security relationships
The organisations utility is used to find, create, update or delete organisation records.
The utility supports a parent / child relationship between organisations - a child organisation can be thought of as a subdivision of its parent: users belonging to an organisation have the same rights over child organisation data and devices as they have for data and devices within their own organisation.
The --credentials flag is only required where the user wishes to store multiple identities. Setting the credentials is done interactively using the command line interface.
Usage: organisations.py [-c CREDENTIALS] { -F [{ -l LABEL | -d ID }] [-m] | -C -l LABEL -n LONG_NAME -u URL -o OWNER_EMAIL [-p PARENT_LABEL] | -U LABEL [-l LABEL] [-n LONG_NAME] [-u URL] [-o OWNER_EMAIL] [-p PARENT_LABEL] | -D LABEL } [-i INDENT] [-v]
Options | |
---|---|
--version | show program's version number and exit |
-h, --help | show this help message and exit |
-c CREDENTIALS_NAME, --credentials=CREDENTIALS_NAME | the stored credentials to be presented |
-F, --Find | Find the organisations visible to me |
-C, --Create | Create an organisation |
-U UPDATE, --Update=UPDATE | Update the organisation with the given LABEL |
-D DELETE, --Delete=DELETE | Delete the organisation |
-l LABEL, --label=LABEL | the organisation label |
-d ID, --id=ID | the organisation ID |
-n LONG_NAME, --long-name=LONG_NAME | the organisation long name |
-u URL, --url=URL | the organisation URL |
-o OWNER, --owner=OWNER | the organisation owner email |
-p PARENT_LABEL, --parent=PARENT_LABEL | the label of the parent organisation ('none' to remove) |
-m, --memberships | show organisation's children |
-i INDENT, --indent=INDENT | pretty-print the output with INDENT |
-v, --verbose | report narrative to stderr |
organisations.py -vi4 -c super -U "South Coast Science (Test)" -p "South Coast Science (Dev)"
organisations.py -vi4 -c super -Fl "South Coast Science (Dev)" -m
{ "OrgID": 68, "Label": "South Coast Science (Demo)", "LongName": "a demonstration of South Coast Science air quality monitoring instruments", "URL": "https://www.southcoastscience.com", "Owner": "[email protected]", "ParentID": null }
[ { "organisation": { "OrgID": 69, "Label": "South Coast Science (Dev)", "LongName": "development operations for South Coast Science air quality monitoring instruments", "URL": "https://www.southcoastscience.com", "Owner": "[email protected]", "ParentID": null }, "children": [ { "OrgID": 71, "Label": "South Coast Science (Test)", "LongName": "a test account for South Coast Science customers", "URL": "https://www.southcoastscience.com", "Owner": "[email protected]", "ParentID": 69 } ] } ]