GET
Examples
Function
Extracts data from FirstClass objects at the field level. GET returns a single line of field triplets (fieldID, fieldtype, fieldvalue), one triplet per field ID requested, in a format that matches the PUT command fieldlist. The REPLY command must precede GET. For additional information, see the PUT command. Separate the components of the path with colons. The PATHCHAR command can be used to change the default path character. If objdesc is missing, PATH is assumed.
Syntax
REPLY
GET keyword fieldIDs +d +D +g
When used to retrieve address fields:
REPLY
GET keyword addressID index
Parameters
ABOUT containername |
Info for a conference or calendar. |
ABOUTPATH containername |
Info for a conference or calendar that is not in the Directory. |
CLIENT clientID |
The user information form specified by the client ID. The Directory form of remote names and routes. |
DIRECTORY directorytype |
Directory form of conferences (ODInfo), folders (ODInfo), gateways (ODGateway) and user groups (ODInfo). Directory type keywords are conference, calendar, maillist, and group. |
path |
An object specified by path, relative to the administrator’s Desktop. |
DESKTOP userID path |
An object relative to the user's Desktop. Separate the components of the path with colons. |
PROFILE userID appID.formID |
The application profile of a specific application, based on userID. The application ID and application profile form are joined with a period. |
PROFILE clientID appID.formID |
The application profile of a specific application, based on Client ID. The application ID and application profile form are joined with a period. |
PREFERENCES userid |
A user’s Preferences form and Print Layout form. |
PROPERTIES path |
Used to retrieve information from the Get Info form for Mac or Properties form for Windows. The path is relative to the administrator's Desktop. |
PROPERTIES byindex indexnumber path |
Used to retrieve information from the Get Info form for Mac or Properties form for Windows. |
PROPERTIES byindex indexnumber DESKTOP userID path |
Used to retrieve field information from the Get Info form for Mac or Properties form for Windows. |
PROPERTIES byindex indexnumber path |
Used to retrieve information from the Get Info form for Mac or Properties form for Windows. The DIR command is used to retrieve the index number. The path is relative to the administrator's Desktop. |
PROPERTIES byindex indexnumber DESKTOP userID path |
Used to retrieve field information from the Get Info form for Mac or Properties form for Windows.The DIR command is used to retrieve the index number. |
PERMISSIONS path |
The permission form on a conference, calendar, or contact database The path is relative to the administrator's Desktop. |
PERMISSIONS DESKTOP userID path |
The permission form on a conference, calendar, or contact database The path is relative to the user's Desktop. |
USER userID |
The user information form specified by the user ID. |
USERCONFIG userID |
A user’s Mail Import form. |
RESUME userid |
A user’s profile. |
RULES path rulename |
A container's Rule folder. Path is relative to the administrator's Desktop. |
RULES DESKTOP userid path rulename |
A container's Rule folder. Path is relative to the user's Desktop. |
SYSPROFILE |
The System Profile. |
fieldIDs |
The field IDs of the fields to be retrieved. Field IDs can be obtained from the Example.fc file that installs with FirstClass Designer. |
addressID |
"To" field is 4, "Cc" field is 5, "Bcc" field is 14. The permission's form "Who" field is 29. Do not use the field IDs displayed in FirstClass Designer for these fields. |
index |
Position in the list. Use 0 for the first entry, 1 for the second name and so on. Use -1 to retrieve all address entries. |
+d +D |
Optional and case sensitive. +d will return the time as formatted in the client. +D will return the time formatted to the system default. These options can be used with the "Created" (field 1235) and the "Last logged in" (field 1230) fields on the user information form. |
Examples
Creating a PUT command
The GET command can help you create PUT commands. For example, if you want to add a voice DN (field ID 1255) and voice password (field ID 1256) to all your users, you could use the GET command to help you create the PUT syntax:
1 Open Example.fc using FirstClass Designer.
2 Open the User Data form (form ID 125) and look up the field IDs of the two fields.
3 Fill in the voice DN and voice password of any user.
4 Send a GET command:
reply
GET USER sbram 1255 1256
The server will return the field ID, field type and field value:
1255 0 "9055551212" 1256 0 "1212"
5 Compose the PUT command by replacing the field value with appropriate data. To add a voice DN and voice password to Paul Chu's account:
PUT USER pchu 1255 0 "9055551213" 1256 0 "1213"
Retrieving About form information
Used with container's that are published in the Directory.To retrieve About form's title (field ID 1000) and the body (field ID 6), enter:
REPLY
GET ABOUT "General Conferences:Employee Lounge" 1000 6
A conference uses a form named About (Résumé form ID 97).
To retrieve the title (field ID 1000) and the body (field ID 6) from the About form of a conference or calendar whose name is not in the Directory, enter:
REPLY
GET ABOUTPATH "General Conferences:secret employee lounge" 1000 6
Retrieving user information by user ID
To get user sbram's user ID (field ID 1201), first name (field ID 1202), middle initial (field ID 1203)and last name (field ID 1204) fields, enter:
REPLY
GET USER sbram 1201 1202 1203 1204
The server returns the following information:
1201 0 "sbram" 1202 0 "Susan 1203 0 "A" 1204 0 "Bram"
Asking for the user ID to be included in the reply message will identify to which user the information pertains. Asking for multiple fields in a single command is more efficient than submitting multiple commands.
Only the main admin account can retrieve data from the "Password" field (field ID 1217). To retrieve Susan's password, enter:
REPLY
GET USER sbram 1201 1217
To retrieve the password in the MD5 digest, enter:
REPLY
GET USER sbram 1201 1217 +m
The server returns the following information:
1217 0 "brocoli"
To retrieve the date and time Susan last logged in, enter:
REPLY
GET USER sbram 1201 1230 +d
If the server returns a date of January 1, 1904, the user has never logged into the server.
If you want to know which groups a user is a member of, you need to retrieve data from the "User groups" field. This field is a "To" field, therefore the field ID is 4 and no field type is required.
REPLY
GET USER sbram 4 -1
The server will return the following information:
4 0 "Regular Users"
4 1 "Employee"
4 2 "East Coast"
If you want to know the second group Susan is a member of, enter:
REPLY
GET USER sbram 4 1
For additional field IDs, see the User Info form (FormID 125) in example.fc.
Retrieving user information by client ID
The user ID can be changed by the administrator, however, the client ID can never be changed, nor is the number ever reused.
Susan Bram's client ID is 1602. To get sbram's user ID (field ID 1201), first name (field ID 1202), middle initial (field ID 1203) and last name (field ID 1204) fields based on the client ID, enter:
REPLY
GET CLIENT 1602 1201 1202 1203 1204
The server returns the following information:
1201 0 "sbram" 1202 0 "Susan 1203 0 "A" 1204 0 "Bram"
The client ID can also be used to retreive information from the Directory forms including those supported by the DIRECTORY keyword. The CLIENT keyword allows you to retrieve information from the Directory form of remote names and routes.
To retrieve the mail alias field from a Remote name with the client ID of 1956, enter
REPLY
GET CLIENT 1956 1252
Note
The client ID displayed in remote user's Directory form is that of the remote site. Use the List Directory to obtain the correct client ID for your site.
Retrieving a domain name
To retrieve the primary domain name (field ID 1001) from the Basic Internet Setup form, enter:
REPLY
GET "internet services:basic internet setup" 1001
Retrieving calendar information by index number
Susan Bram posts the majority of events to the Employee Calendar. Most commands work with an object's name but with this calendar, every event has the same name - Susan Bram. The PATHCHAR command can be used to work the subject or description, however this calendar has events with the same description, so the BYINDEX keyword can be used.
The following command is sent to retrieve the index number:
REPLY
DIR "general conferences:employee lounge:employee calendar" +pld
The server would return:
Contents of: "general conferences:employee lounge:employee calendar"
[L:2] "Susan Bram" "All Staff Fire Drill" 2004/05/17 09:06:48
[L:3] "Susan Bram" "Lunch & Learn" 2004/04/17 09:08:28
[L:4] "Susan Bram" "Fund Raising Meeting" 2004/05/17 09:09:24
[L:5] "Susan Bram" "Lunch & Learn" 2004/05/17 09:45:43
To work with the Lunch & Learn event from April, enter the following command:
REPLY
DIR BYINDEX 3 "general conferences:employee lounge:employee calendar" 1009
To work the info form for the same event, enter the following:
REPLY
DIR PROPERTIES BYINDEX 3 "general conferences:employee lounge:employee calendar" 1016
To work with a calendar on Susan Bram's desktop, the command would be:
REPLY
GET PROPERTIES byindex 3 desktop sbram "calendar" 1016
See the DIR command for more information.
Retrieving home page information
To retrieve the body of Susan's Home Page within the My Web Site folder, enter:
REPLY
GET DESKTOP sbram "my web site:home page" 6
Retrieving application profile information
You've created a local application with an ID of 4001. As part of creating your application you also created a custom form for the application profile. You assigned your application profile a form ID of 1001. To retrieve field ID 2001 from an application profile based on a userID, enter:
REPLY
GET PROFILE USER sbram 4001.1001 2001
To retrieve field ID 2001 from an application profile based on a clientID (1706), enter:
REPLY
GET PROFILE CLIENT 1706 4001.1001 2001
Retrieving permissions information
To retrieve the first entry of the Who section of a contact database permission form:
REPLY
GET PERMISSIONS "General Conferences:Employee Lounge:Customer List" 29 0
To retrieve the all entries of the Who section of a contact database permission form:
REPLY
GET PERMISSIONS "General Conferences:Employee Lounge:Customer List" 29 -1
The above examples are applicable to conferences and calendars. The membership list and the "Belongs to" field are not supported by the GET command.
The EXPORT command can be used to retrieve all available field from the permission form. To retrieve the contents of the permission, not including the "Belongs to" field and the membership list, enter:
EXPORT "General Conferences:Employee Lounge:Customer List" +np
Retrieving preferences information
To retrieve the Reply text (field ID 1106), from the Preferences form (127) enter:
REPLY
GET PREFERENCES sbram 1106
Notes
Fields with a value of greater than 10000 cannot be retrieved.
Default values are not stored. For example, if the user's reply preference is the default Automatic, the reply will be empty.
Retrieving properties information
To retrieve the icon ID (field ID 1304), name (field ID 1017), location (field ID 1020), creator (field ID 1043), and determine if the Employee Lounge conference is protected (field ID 1016), enter:
REPLY
GET PROPERTIES "General Conferences:employee lounge" 1304 1017 1020 1043 1016
Susan has created a conference called Presentations on her Desktop. To retrieve the icon ID (field ID 1304), name (field ID 1017), location (field ID 1020), creator (field ID 1043), and determine if the conference is protected (field ID 1016), enter:
REPLY
GET PROPERTIES DESKTOP sbram presentations 1304 1017 1020 1043 1016
For additional field IDs, see the Get Info form (form ID 111).
Retrieving information from a mail import form
To retrieve the icon ID (field ID 2005), mail server (field ID 2000), user name (field ID 2001), password (field ID 2003), and email address (field ID 2004) from Susan Brams' Internet Mail Import form, enter:
REPLY
GET USERCONFIG sbram 2005 2000 2001 2002 2003
For additional field IDs, see Message Import Setup, form ID 68.
Retrieving profile information
To retrieve "Personal email" (field ID 5) and the body (field ID 6) from Susan Bram's profile, enter:
REPLY
GET RESUME sbram 6 5 -1
The -1 will retrieve all entries in "Personal email", instead of just the first entry. For additional field IDs, see the Profile form, ID 20502.
Determining if a rule is enabled
To determine if the File in Folder Rule is enabled or disabled (field ID 13800) enter:
REPLY
GET RULES "General Conferences:employee lounge" "File in Folder Rule" 13800
If the server returns an empty quotation marks the field is enabled. Rules are enabled by default, so the value of 1 is not stored by the server.
Retrieving System Profile information
To retrieve the contents of the "Create users and conferences on this volume" field (field ID 1224) server serial number (field ID 1217) and version number (field ID 1202) from the System Profile, enter:
REPLY
GET SYSPROFILE 1224 1217 1202
For additional field IDs, see the System Profile, form ID 122.
Related commands
To change fields, see the PUT command.
To create objects, see the NEW command.
To work with objects based on the index number, see the DIR command.
To generate a scripts that would all form data, see the EXPORT command.
|