jxAPI Method Reference
This page is about the legacy SOAP-based jxAPI that is no longer updated or recommended for use in new projects. The documentation in this section may be outdated or inaccurate, and is provided for reference purposes only.
Journyx recommends using the REST-based API for new projects in most cases. However, at the current time, there are certain object types that are not available through the REST API.
addAccessControlLists
addAccessControlLists(session_key: string, records: AccessControlList[]) -> string[]
Add multiple full records to the access_control_lists (AccessControlList) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addAccrualEvents
addAccrualEvents(session_key: string, records: AccrualEvent[]) -> string[]
Add multiple full records to the time_banks_log (AccrualEvent) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addAccruals
addAccruals(session_key: string, records: Accrual[]) -> string[]
Add multiple full records to the timebank (Accrual) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addAssignments
addAssignments(session_key: string, records: AssignmentRecord[]) -> string[]
Add multiple full records to the assignments (Assignment) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addAttachment
addAttachment(session_key: string, rectype: string, recid: string, filename: string, data: string, note: string, mimetype: string) -> string
Adds an attachment to a time, expense, or mileage record. A single record may have multiple attachments as long as each has a different filename; you may use the same filename for attachments on different records, however.
This method returns a string which encodes the table, record ID, and filename of
the attachment, which can be treated as a unique ID for the attachment. It can
be used with the
getAttachmentByEncodedId
and
deleteAttachmentByEncodedId
methods.
Permission to add attachments is tied to permission to modify the associated time/expense/mileage record.
-
@param
rectype: One of 'time', 'expense', or 'mileage'. -
@param
recid: The time/expense/mileage record ID to add the attachment to. -
@param
filename: The filename of the attachment (used to distinguish multiple attachments to the same record) -
@param
data: The attachment data, base64 encoded. -
@param
note: A note describing the attachment. -
@param
mimetype: The MIME type of the attachment, e.g. 'image/jpg' or 'application/pdf'. -
@return
: The encoded unique ID of the attachment.
addAttachmentToCell
addAttachmentToCell(session_key: string, sheet_type: string, date: string, row_ids: string[], filename: string, data: string, note: string, mimetype: string) -> string
Adds an attachment to a particular cell of a sheet. This is equivalent to addAttachment, except that you specify where to put the attachment by supplying a sheet type, the record date, and row ID list (the 'combo' - project and codes), and this method decides what actual record to attach to. This can be used in combination with the save_sheet method to handle attachments without needing to know a specific record ID.
@param
sheet_type: 'time', 'expense', or 'mileage'.@param
date: The date to add the attachment to.@param
row_ids: A list of IDs identifying the row; also known as the record 'combo'. As of v12.4 this may now include additional columns as follows: (project, code0, code1, code2, comment, code3, code4, code5, code6, text2, text3)@param
filename: The file name to save in the attachment record.@param
data: The attachment data in base64.@param
note: The note to save in the attachment record.@param
mimetype: The mime type of the attachment.@return
: The attachment ID.
addAttributeType
addAttributeType(session_key: string, object_type: string, pname: string, data_type: string) -> string
This adds a new attribute type (custom field) with the given name to the current domain. Default values will be supplied (ie, it will default to a regular String attribute.)
-
@param
object_type: a valid table name as returned by getAttributeObjectTypes() -
@param
pname: the display name of the new attribute type. -
@param
data_type: this describes what type of data this Attribute Type is allowed to hold, be it a string of characters, a date, or a number. See the general JXAPI Attribute documentation for more information about data-types. -
@return
: the ID of the newly created record, if successful. -
@raise
RuntimeError: raised if the object_type is not valid. -
@raise
TypeError: raised if the data_type parameter is not a valid data-type description for Attribute Types. See the checkAttributeDataType method.
This method requires administrator access.
addAttributeTypeSelectionValue
addAttributeTypeSelectionValue(session_key: string, id_attr_type: string, the_value: string, is_default: boolean) -> string
Adds a selection value to an enumerated attribute type. Attributes with enumerated types are displayed in the user interface as a drop-down list.
Each value is associated internally with a unique ID which will be returned by this method when the value is added successfully. This ID is used by other selection list methods to manipulate individual values.
In untyped endpoints, this method can be used to add any type of value.
In typed endpoints, this method can only add string values. Use
addAttributeTypeSelectionValueInteger
or
addAttributeTypeSelectionValueNumber
to add integer or floating point values, respectively.
-
@param
id_attr_type: The ID of the attribute type. -
@param
the_value: The value to add to the selection list. -
@param
is_default: If true, this value becomes the default selection for the list. -
@return
: the ID of the newly added value -
@raise
TypeError: if the value is inappropriate for the attribute type -
@raise
ValueError: if the attribute type does not exist
This method requires administrator access.
addAttributeTypeSelectionValueInteger
addAttributeTypeSelectionValueInteger(session_key: string, id_attr_type: string, the_value: int, is_default: boolean) -> string
Adds a selection value to an enumerated attribute type. Attributes with enumerated types are displayed in the user interface as a drop-down list.
Each value is associated internally with a unique ID which will be returned by this method when the value is added successfully. This ID is used by other selection list methods to manipulate individual values.
This method is not available in untyped endpoints; use
addAttributeTypeSelectionValue
instead.
In typed endpoints, this method can only add integer values. Use
addAttributeTypeSelectionValue
or
addAttributeTypeSelectionValueNumber
to add string or floating point values, respectively.
-
@param
id_attr_type: The ID of the attribute type. -
@param
the_value: The value to add to the selection list. -
@param
is_default: If true, this value becomes the default selection for the list. -
@return
: the ID of the newly added value -
@raise
TypeError: if the value is inappropriate for the attribute type -
@raise
ValueError: if the attribute type does not exist
This method is a superset of the
addAttributeTypeSelectionValue
method, and
is subject to its access restrictions.
addAttributeTypeSelectionValueNumber
addAttributeTypeSelectionValueNumber(session_key: string, id_attr_type: string, the_value: double, is_default: boolean) -> string
Adds a selection value to an enumerated attribute type. Attributes with enumerated types are displayed in the user interface as a drop-down list.
Each value is associated internally with a unique ID which will be returned by this method when the value is added successfully. This ID is used by other selection list methods to manipulate individual values.
This method is not available in untyped endpoints; use
addAttributeTypeSelectionValue
instead.
In typed endpoints, this method can only add floating point values. Use
addAttributeTypeSelectionValue
or
addAttributeTypeSelectionValueInteger
to add string or integer values, respectively.
-
@param
id_attr_type: The ID of the attribute type. -
@param
the_value: The value to add to the selection list. -
@param
is_default: If true, this value becomes the default selection for the list. -
@return
: the ID of the newly added value -
@raise
TypeError: if the value is inappropriate for the attribute type -
@raise
ValueError: if the attribute type does not exist
This method is a superset of the
addAttributeTypeSelectionValue
method, and
is subject to its access restrictions.
addCodes
addCodes(session_key: string, records: CodeRecord[]) -> string[]
Add multiple full records to the codes_tasks (Code) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addCodesCustom4s
addCodesCustom4s(session_key: string, records: CodesCustom4Record[]) -> string[]
Add multiple full records to the codes_custom_4 (CodesCustom4) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addCodesCustom4ToGroup
addCodesCustom4ToGroup(session_key: string, id: string, group: string) -> int
Add a codes_custom_4 (CodesCustom4) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addCodesCustom5s
addCodesCustom5s(session_key: string, records: CodesCustom5Record[]) -> string[]
Add multiple full records to the codes_custom_5 (CodesCustom5) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addCodesCustom5ToGroup
addCodesCustom5ToGroup(session_key: string, id: string, group: string) -> int
Add a codes_custom_5 (CodesCustom5) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addCodesCustom6s
addCodesCustom6s(session_key: string, records: CodesCustom6Record[]) -> string[]
Add multiple full records to the codes_custom_6 (CodesCustom6) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addCodesCustom6ToGroup
addCodesCustom6ToGroup(session_key: string, id: string, group: string) -> int
Add a codes_custom_6 (CodesCustom6) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addCodesCustom7s
addCodesCustom7s(session_key: string, records: CodesCustom7Record[]) -> string[]
Add multiple full records to the codes_custom_7 (CodesCustom7) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addCodesCustom7ToGroup
addCodesCustom7ToGroup(session_key: string, id: string, group: string) -> int
Add a codes_custom_7 (CodesCustom7) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addCodesExpense4s
addCodesExpense4s(session_key: string, records: CodesExpense4Record[]) -> string[]
Add multiple full records to the codes_expense_4 (CodesExpense4) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addCodesExpense4ToGroup
addCodesExpense4ToGroup(session_key: string, id: string, group: string) -> int
Add a codes_expense_4 (CodesExpense4) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addCodesExpense5s
addCodesExpense5s(session_key: string, records: CodesExpense5Record[]) -> string[]
Add multiple full records to the codes_expense_5 (CodesExpense5) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addCodesExpense5ToGroup
addCodesExpense5ToGroup(session_key: string, id: string, group: string) -> int
Add a codes_expense_5 (CodesExpense5) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addCodesExpense6s
addCodesExpense6s(session_key: string, records: CodesExpense6Record[]) -> string[]
Add multiple full records to the codes_expense_6 (CodesExpense6) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addCodesExpense6ToGroup
addCodesExpense6ToGroup(session_key: string, id: string, group: string) -> int
Add a codes_expense_6 (CodesExpense6) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addCodesExpense7s
addCodesExpense7s(session_key: string, records: CodesExpense7Record[]) -> string[]
Add multiple full records to the codes_expense_7 (CodesExpense7) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addCodesExpense7ToGroup
addCodesExpense7ToGroup(session_key: string, id: string, group: string) -> int
Add a codes_expense_7 (CodesExpense7) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addCodesTime4s
addCodesTime4s(session_key: string, records: CodesTime4Record[]) -> string[]
Add multiple full records to the codes_time_4 (CodesTime4) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addCodesTime4ToGroup
addCodesTime4ToGroup(session_key: string, id: string, group: string) -> int
Add a codes_time_4 (CodesTime4) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addCodesTime5s
addCodesTime5s(session_key: string, records: CodesTime5Record[]) -> string[]
Add multiple full records to the codes_time_5 (CodesTime5) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addCodesTime5ToGroup
addCodesTime5ToGroup(session_key: string, id: string, group: string) -> int
Add a codes_time_5 (CodesTime5) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addCodesTime6s
addCodesTime6s(session_key: string, records: CodesTime6Record[]) -> string[]
Add multiple full records to the codes_time_6 (CodesTime6) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addCodesTime6ToGroup
addCodesTime6ToGroup(session_key: string, id: string, group: string) -> int
Add a codes_time_6 (CodesTime6) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addCodesTime7s
addCodesTime7s(session_key: string, records: CodesTime7Record[]) -> string[]
Add multiple full records to the codes_time_7 (CodesTime7) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addCodesTime7ToGroup
addCodesTime7ToGroup(session_key: string, id: string, group: string) -> int
Add a codes_time_7 (CodesTime7) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addCodeToGroup
addCodeToGroup(session_key: string, id: string, group: string) -> int
Add a codes_tasks (Code) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addColumnDependency
addColumnDependency(session_key: string, parent_table: string, parent_id: string, child_table: string, child_id: string) -> int
Add a column dependency.
This method adds dependencies between code columns. It returns 1 if a dependency was added, and 0 if it already existed.
-
@param
parent_table: The name or printable name of the parent table. -
@param
parent_id: The ID or printable name of the parent item. -
@param
child_table: The name or printable name of the child table. -
@param
child_id: The ID or printable name of the child item. -
@return
: 0 if the dependency already existed, 1 if it was added.
This method requires administrator access.
addCurrencyConversions
addCurrencyConversions(session_key: string, records: CurrencyConversion[]) -> string[]
Add multiple full records to the currency_convert (CurrencyConversion) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addEntryNoteToCell
addEntryNoteToCell(session_key: string, user: string, sheet_type: string, date: string, row_ids: string[], text: string) -> int
Adds an entry note to a particular sheet cell, specified by date and row data. Similar to addAttachmentToCell.
@param
user: The user ID, or the empty string for the current user.@param
sheet_type: The sheet type ('time','expense',or 'mileage').@param
date: The date in YYYYMMDD format.@param
row_ids: A list of (project, code0, code1, code2, comment) IDs.@param
text: The note text to add.@return
: 1.
addExpenseCodes
addExpenseCodes(session_key: string, records: ExpenseCodeRecord[]) -> string[]
Add multiple full records to the codes_expenses (ExpenseCode) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addExpenseCodeToGroup
addExpenseCodeToGroup(session_key: string, id: string, group: string) -> int
Add a codes_expenses (ExpenseCode) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addExpenseCurrencys
addExpenseCurrencys(session_key: string, records: ExpenseCurrencyRecord[]) -> string[]
Add multiple full records to the codes_currencies (ExpenseCurrency) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addExpenseCurrencyToGroup
addExpenseCurrencyToGroup(session_key: string, id: string, group: string) -> int
Add a codes_currencies (ExpenseCurrency) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addExpenseRecords
addExpenseRecords(session_key: string, records: ExpenseRecord[]) -> string[]
Add multiple full records to the expense_recs (ExpenseRecord) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addExpenseRecordsWithNames
addExpenseRecordsWithNames(session_key: string, records: ExpenseRecord[]) -> string[]
Add multiple full records to the expense_recs (ExpenseRecord) table, converting names to IDs.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addExpenseSources
addExpenseSources(session_key: string, records: ExpenseSourceRecord[]) -> string[]
Add multiple full records to the codes_expense_sources (ExpenseSource) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addExpenseSourceToGroup
addExpenseSourceToGroup(session_key: string, id: string, group: string) -> int
Add a codes_expense_sources (ExpenseSource) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addFullAccessControlList
addFullAccessControlList(session_key: string, record: AccessControlList) -> string
Add a full record to the access_control_lists (AccessControlList) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullAccrual
addFullAccrual(session_key: string, record: Accrual) -> string
Add a full record to the timebank (Accrual) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullAccrualEvent
addFullAccrualEvent(session_key: string, record: AccrualEvent) -> string
Add a full record to the time_banks_log (AccrualEvent) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullAssignment
addFullAssignment(session_key: string, record: AssignmentRecord) -> string
Add a full record to the assignments (Assignment) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullAttributeType
addFullAttributeType(session_key: string, new_record: AttributeTypeRecord) -> string
Simply adds a new Attribute Type record to the system.
-
@param
new_record: A new Attribute Type record. See the description elsewhere of that record type. -
@return
: the ID of the newly added record (if successful.) -
@raise
Exception: An exception will be raised if any required fields are missing.
This method requires administrator access.
addFullCode
addFullCode(session_key: string, record: CodeRecord) -> string
Add a full record to the codes_tasks (Code) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullCodesCustom4
addFullCodesCustom4(session_key: string, record: CodesCustom4Record) -> string
Add a full record to the codes_custom_4 (CodesCustom4) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullCodesCustom5
addFullCodesCustom5(session_key: string, record: CodesCustom5Record) -> string
Add a full record to the codes_custom_5 (CodesCustom5) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullCodesCustom6
addFullCodesCustom6(session_key: string, record: CodesCustom6Record) -> string
Add a full record to the codes_custom_6 (CodesCustom6) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullCodesCustom7
addFullCodesCustom7(session_key: string, record: CodesCustom7Record) -> string
Add a full record to the codes_custom_7 (CodesCustom7) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullCodesExpense4
addFullCodesExpense4(session_key: string, record: CodesExpense4Record) -> string
Add a full record to the codes_expense_4 (CodesExpense4) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullCodesExpense5
addFullCodesExpense5(session_key: string, record: CodesExpense5Record) -> string
Add a full record to the codes_expense_5 (CodesExpense5) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullCodesExpense6
addFullCodesExpense6(session_key: string, record: CodesExpense6Record) -> string
Add a full record to the codes_expense_6 (CodesExpense6) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullCodesExpense7
addFullCodesExpense7(session_key: string, record: CodesExpense7Record) -> string
Add a full record to the codes_expense_7 (CodesExpense7) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullCodesTime4
addFullCodesTime4(session_key: string, record: CodesTime4Record) -> string
Add a full record to the codes_time_4 (CodesTime4) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullCodesTime5
addFullCodesTime5(session_key: string, record: CodesTime5Record) -> string
Add a full record to the codes_time_5 (CodesTime5) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullCodesTime6
addFullCodesTime6(session_key: string, record: CodesTime6Record) -> string
Add a full record to the codes_time_6 (CodesTime6) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullCodesTime7
addFullCodesTime7(session_key: string, record: CodesTime7Record) -> string
Add a full record to the codes_time_7 (CodesTime7) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullCurrencyConversion
addFullCurrencyConversion(session_key: string, record: CurrencyConversion) -> string
Add a full record to the currency_convert (CurrencyConversion) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullExpenseCode
addFullExpenseCode(session_key: string, record: ExpenseCodeRecord) -> string
Add a full record to the codes_expenses (ExpenseCode) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullExpenseCurrency
addFullExpenseCurrency(session_key: string, record: ExpenseCurrencyRecord) -> string
Add a full record to the codes_currencies (ExpenseCurrency) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullExpenseRecord
addFullExpenseRecord(session_key: string, record: ExpenseRecord) -> string
Add a full record to the expense_recs (ExpenseRecord) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullExpenseRecordWithNames
addFullExpenseRecordWithNames(session_key: string, record: ExpenseRecord) -> string
Add a full record to the expense_recs (ExpenseRecord) table, converting names to IDs.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullExpenseSource
addFullExpenseSource(session_key: string, record: ExpenseSourceRecord) -> string
Add a full record to the codes_expense_sources (ExpenseSource) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullGroup
addFullGroup(session_key: string, record: GroupRecord) -> string
Add a full record to the groups (Group) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullMileageMeasurement
addFullMileageMeasurement(session_key: string, record: MileageMeasurementRecord) -> string
Add a full record to the codes_travel_measurements (MileageMeasurement) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullMileageReason
addFullMileageReason(session_key: string, record: MileageReasonRecord) -> string
Add a full record to the codes_travel_reasons (MileageReason) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullMileageRecord
addFullMileageRecord(session_key: string, record: MileageRecord) -> string
Add a full record to the travel_recs (MileageRecord) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullMileageRecordWithNames
addFullMileageRecordWithNames(session_key: string, record: MileageRecord) -> string
Add a full record to the travel_recs (MileageRecord) table, converting names to IDs.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullMileageVehicle
addFullMileageVehicle(session_key: string, record: MileageVehicleRecord) -> string
Add a full record to the codes_travel_vehicles (MileageVehicle) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullProject
addFullProject(session_key: string, record: ProjectRecord) -> string
Add a full record to the projects (Project) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullProjectApproval
addFullProjectApproval(session_key: string, record: ProjectApproval) -> string
Add a full record to the project_approval (ProjectApproval) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullProjectApprovalSetting
addFullProjectApprovalSetting(session_key: string, record: ProjectApprovalSetting) -> string
Add a full record to the project_approval_settings (ProjectApprovalSetting) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullProjectApprover
addFullProjectApprover(session_key: string, record: ProjectApprover) -> string
Add a full record to the project_approvers (ProjectApprover) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullProjectCodeRate
addFullProjectCodeRate(session_key: string, record: ProjectCodeRate) -> string
Add a full record to the project_code_rates (ProjectCodeRate) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullProjectPickerItem
addFullProjectPickerItem(session_key: string, record: ProjectPickerItem) -> string
Add a full record to the project_picker (ProjectPickerItem) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullProjectWithNames
addFullProjectWithNames(session_key: string, record: ProjectRecord) -> string
Add a full record to the projects (Project) table, converting names to IDs.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullPS_DV_Assignments
addFullPS_DV_Assignments(session_key: string, record: PS_DV_Assignments) -> string
Add a full record to the PS_DV_Assignments (PS_DV_Assignments) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullPS_DV_Rules
addFullPS_DV_Rules(session_key: string, record: PS_DV_Rules) -> string
Add a full record to the PS_DV_Rules (PS_DV_Rules) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullPSAccrualOverride
addFullPSAccrualOverride(session_key: string, record: PSAccrualOverride) -> string
Add a full record to the PSAccrualOverride (PSAccrualOverride) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullPSAccrualTierManager
addFullPSAccrualTierManager(session_key: string, record: PSAccrualTierManager) -> string
Add a full record to the PSAccrualTierManager (PSAccrualTierManager) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullPSCompensationTierManager
addFullPSCompensationTierManager(session_key: string, record: PSCompensationTierManager) -> string
Add a full record to the PSCompensationTierManager (PSCompensationTierManager) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullPunchRecord
addFullPunchRecord(session_key: string, record: PunchRecord) -> string
Add a full record to the punch_time_recs (PunchRecord) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullPXTeam
addFullPXTeam(session_key: string, record: PXTeamRecord) -> string
Add a full record to the px_teams (PXTeam) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullRateCode
addFullRateCode(session_key: string, record: RateCodeRecord) -> string
Add a full record to the rate_codes (RateCode) table.
Please note that the availability of this record type or certain fields in it may vary depending on if you access a versioned or unversioned endpoint. The unversioned endpoint typically corresponds to the oldest available versioned endpoint.
This field became available in the 10.0 endpoint.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullRecord
addFullRecord(session_key: string, tablename: string, record: Record, withNames: boolean) -> string
Adds a record to the Journyx database.
@param
tablename: The name of the table to add a record to.@param
record: The record to add.@param
withNames: If true, perform name/ID conversion if available for this type.@param
multiple: If true, add multiple records (untyped endpoints only).@return
: The ID of the newly added record.
This method adds a record or records to a table in the Journyx database. All
tables with corresponding jxAPI record types are supported. For untyped
endpoints only, you may add multiple records in one call by setting the
multiple
parameter to True and passing a list of records instead of a single
one.
For some types, name to ID conversion is available. If the withNames
parameter
is True, certain foreign key fields may contain a pretty name instead of an ID,
and the proper ID will be looked up on the server side before adding the record.
Consult the type reference to find out which types support name conversion, and
on which fields.
The ID field of the record passed in should usually be empty; a new ID will be assigned and returned from this method. When adding multiple records, the return will be a list of IDs instead of a single one.
addFullRecords
addFullRecords(session_key: string, tablename: string, records: Record[], withNames: boolean) -> string[]
Adds multiple records to a table in the Journyx database.
@param
tablename: The name of the table to add records to.@param
records: A list of records to add.@param
withNames: If true, perform name/ID conversion if available for this type.@return
: A list of the IDs of the newly added records.
This method is exactly like addFullRecord
except that it takes a list of
records to add, and returns a list of their new IDs. While addFullRecord
can
do this in untyped endpoints, this method is provided to allow the same
functionality in typed endpoints.
addFullRequestRecord
addFullRequestRecord(session_key: string, record: RequestRecord) -> string
Add a full record to the request_recs (RequestRecord) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullSubcode
addFullSubcode(session_key: string, record: SubcodeRecord) -> string
Add a full record to the codes_pay_types (Subcode) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullSubsubcode
addFullSubsubcode(session_key: string, record: SubsubcodeRecord) -> string
Add a full record to the codes_bill_types (Subsubcode) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullTimeRecord
addFullTimeRecord(session_key: string, record: TimeRecord) -> string
Add a full record to the time_recs (TimeRecord) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullTimeRecordWithNames
addFullTimeRecordWithNames(session_key: string, record: TimeRecord) -> string
Add a full record to the time_recs (TimeRecord) table, converting names to IDs.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullUser
addFullUser(session_key: string, record: UserRecord) -> string
Add a full record to the users (User) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullUserRole
addFullUserRole(session_key: string, record: UserRole) -> string
Add a full record to the userroles (UserRole) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullUserSheetNote
addFullUserSheetNote(session_key: string, record: UserSheetNote) -> string
Add a full record to the user_sheet_notes (UserSheetNote) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullUserWithNames
addFullUserWithNames(session_key: string, record: UserRecord) -> string
Add a full record to the users (User) table, converting names to IDs.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullVirtualSheetRecord
addFullVirtualSheetRecord(session_key: string, record: VirtualSheetRecord) -> string
Add a full record to the virtual_sheet_records (VirtualSheetRecord) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addFullVirtualTimeSheet
addFullVirtualTimeSheet(session_key: string, record: VirtualTimeSheet) -> string
Add a full record to the virtual_time_sheets (VirtualTimeSheet) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addGroups
addGroups(session_key: string, records: GroupRecord[]) -> string[]
Add multiple full records to the groups (Group) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addMileageMeasurements
addMileageMeasurements(session_key: string, records: MileageMeasurementRecord[]) -> string[]
Add multiple full records to the codes_travel_measurements (MileageMeasurement) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addMileageMeasurementToGroup
addMileageMeasurementToGroup(session_key: string, id: string, group: string) -> int
Add a codes_travel_measurements (MileageMeasurement) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addMileageReasons
addMileageReasons(session_key: string, records: MileageReasonRecord[]) -> string[]
Add multiple full records to the codes_travel_reasons (MileageReason) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addMileageReasonToGroup
addMileageReasonToGroup(session_key: string, id: string, group: string) -> int
Add a codes_travel_reasons (MileageReason) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addMileageRecords
addMileageRecords(session_key: string, records: MileageRecord[]) -> string[]
Add multiple full records to the travel_recs (MileageRecord) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addMileageRecordsWithNames
addMileageRecordsWithNames(session_key: string, records: MileageRecord[]) -> string[]
Add multiple full records to the travel_recs (MileageRecord) table, converting names to IDs.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addMileageVehicles
addMileageVehicles(session_key: string, records: MileageVehicleRecord[]) -> string[]
Add multiple full records to the codes_travel_vehicles (MileageVehicle) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addMileageVehicleToGroup
addMileageVehicleToGroup(session_key: string, id: string, group: string) -> int
Add a codes_travel_vehicles (MileageVehicle) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addObjectToGroup
addObjectToGroup(session_key: string, group_id_name: string, object_class: string, object_id_name: string) -> int
Adds an object of any supported type to a group.
An exception will be raised if the group or object ID or name cannot be mapped to a single unique group or object. For example, if you try to add an object to the group "Test" and there is more than one group with that name, an exception will be raised. In this case, you should use the ID instead.
An exception will be raised if the object_class parameter does not name one of the supported classes. Use getGroupObjectClasses to obtain a list of acceptable values.
@param
group_id_name: The ID or pretty name of the group.@param
object_class: The name of the class of object to add to the group.@param
object_id_name: The ID or pretty name of the object to add to the group.@return
: zero if the object was successfully added to the group
This method requires any one of the following abilities: "admin", "msp_admin"
addProjectApprovals
addProjectApprovals(session_key: string, records: ProjectApproval[]) -> string[]
Add multiple full records to the project_approval (ProjectApproval) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addProjectApprovalSettings
addProjectApprovalSettings(session_key: string, records: ProjectApprovalSetting[]) -> string[]
Add multiple full records to the project_approval_settings (ProjectApprovalSetting) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addProjectApprover
addProjectApprover(session_key: string, project_id: string, approver_id: string, level: double) -> string
Add an approver to a project.
@param
project_id: The project ID.@param
approver_id: The ID of the approver's user record.@param
level: The level to insert this approver at.@return
: The ID of the new ProjectApproval object.
addProjectApprovers
addProjectApprovers(session_key: string, records: ProjectApprover[]) -> string[]
Add multiple full records to the project_approvers (ProjectApprover) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addProjectBackupApprover
addProjectBackupApprover(session_key: string, project_id: string, approver_id: string, level: double) -> string
Add a backup approver to a project.
@param
project_id: The project ID.@param
approver_id: The ID of the approver's user record.@param
level: The level to insert this approver at.@return
: The ID of the new ProjectApproval object.
addProjectCodeRates
addProjectCodeRates(session_key: string, records: ProjectCodeRate[]) -> string[]
Add multiple full records to the project_code_rates (ProjectCodeRate) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addProjectDependency
addProjectDependency(session_key: string, project_id: string, code_type: string, code_id: string) -> string
-
@param
project_id: The ID of the project. -
@param
code_type: The code type of the new dependency. -
@param
code_id: The ID of the dependent code. -
@return
: A string which may be ignored. -
@raise
ValueError: If the project ID, code ID, or code type is not found.
Adds the given code ID to a project's dependencies.
NOTE: You must have one of the following role abilities to perform this action:
- 'Authority - Administrator'
- 'Project - Add'
- 'Project - Modify'
- 'Project - Delete'
addProjectPickerItems
addProjectPickerItems(session_key: string, records: ProjectPickerItem[]) -> string[]
Add multiple full records to the project_picker (ProjectPickerItem) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addProjects
addProjects(session_key: string, records: ProjectRecord[]) -> string[]
Add multiple full records to the projects (Project) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addProjectsWithNames
addProjectsWithNames(session_key: string, records: ProjectRecord[]) -> string[]
Add multiple full records to the projects (Project) table, converting names to IDs.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addProjectToGroup
addProjectToGroup(session_key: string, id: string, group: string) -> int
Add a projects (Project) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addPS_DV_Assignmentss
addPS_DV_Assignmentss(session_key: string, records: PS_DV_Assignments[]) -> string[]
Add multiple full records to the PS_DV_Assignments (PS_DV_Assignments) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addPS_DV_Ruless
addPS_DV_Ruless(session_key: string, records: PS_DV_Rules[]) -> string[]
Add multiple full records to the PS_DV_Rules (PS_DV_Rules) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addPSAccrualOverrides
addPSAccrualOverrides(session_key: string, records: PSAccrualOverride[]) -> string[]
Add multiple full records to the PSAccrualOverride (PSAccrualOverride) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addPSAccrualTierManagers
addPSAccrualTierManagers(session_key: string, records: PSAccrualTierManager[]) -> string[]
Add multiple full records to the PSAccrualTierManager (PSAccrualTierManager) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addPSCompensationTierManagers
addPSCompensationTierManagers(session_key: string, records: PSCompensationTierManager[]) -> string[]
Add multiple full records to the PSCompensationTierManager (PSCompensationTierManager) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addPunchRecords
addPunchRecords(session_key: string, records: PunchRecord[]) -> string[]
Add multiple full records to the punch_time_recs (PunchRecord) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addPXTeams
addPXTeams(session_key: string, records: PXTeamRecord[]) -> string[]
Add multiple full records to the px_teams (PXTeam) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addPXTeamToGroup
addPXTeamToGroup(session_key: string, id: string, group: string) -> int
Add a px_teams (PXTeam) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addRateCodes
addRateCodes(session_key: string, records: RateCodeRecord[]) -> string[]
Add multiple full records to the rate_codes (RateCode) table.
Please note that the availability of this record type or certain fields in it may vary depending on if you access a versioned or unversioned endpoint. The unversioned endpoint typically corresponds to the oldest available versioned endpoint.
This field became available in the 10.0 endpoint.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addRequestRecords
addRequestRecords(session_key: string, records: RequestRecord[]) -> string[]
Add multiple full records to the request_recs (RequestRecord) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addSubcodes
addSubcodes(session_key: string, records: SubcodeRecord[]) -> string[]
Add multiple full records to the codes_pay_types (Subcode) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addSubcodeToGroup
addSubcodeToGroup(session_key: string, id: string, group: string) -> int
Add a codes_pay_types (Subcode) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addSubsubcodes
addSubsubcodes(session_key: string, records: SubsubcodeRecord[]) -> string[]
Add multiple full records to the codes_bill_types (Subsubcode) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addSubsubcodeToGroup
addSubsubcodeToGroup(session_key: string, id: string, group: string) -> int
Add a codes_bill_types (Subsubcode) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addTimeRecords
addTimeRecords(session_key: string, records: TimeRecord[]) -> string[]
Add multiple full records to the time_recs (TimeRecord) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addTimeRecordsWithNames
addTimeRecordsWithNames(session_key: string, records: TimeRecord[]) -> string[]
Add multiple full records to the time_recs (TimeRecord) table, converting names to IDs.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addUserRoles
addUserRoles(session_key: string, records: UserRole[]) -> string[]
Add multiple full records to the userroles (UserRole) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addUsers
addUsers(session_key: string, records: UserRecord[]) -> string[]
Add multiple full records to the users (User) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addUserSheetNotes
addUserSheetNotes(session_key: string, records: UserSheetNote[]) -> string[]
Add multiple full records to the user_sheet_notes (UserSheetNote) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addUsersWithNames
addUsersWithNames(session_key: string, records: UserRecord[]) -> string[]
Add multiple full records to the users (User) table, converting names to IDs.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addUserToGroup
addUserToGroup(session_key: string, id: string, group: string) -> int
Add a users (User) record to a group.
See coredb for more information about this method.
This method is a superset of the addObjectToGroup
method,
and is subject to its access restrictions.
addVirtualSheetRecords
addVirtualSheetRecords(session_key: string, records: VirtualSheetRecord[]) -> string[]
Add multiple full records to the virtual_sheet_records (VirtualSheetRecord) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
addVirtualTimeSheets
addVirtualTimeSheets(session_key: string, records: VirtualTimeSheet[]) -> string[]
Add multiple full records to the virtual_time_sheets (VirtualTimeSheet) table.
See coredb for more information about this method.
This method is a superset of the addFullRecord
method, and
is subject to its access restrictions.
adminEmail
adminEmail(session_key: string) -> string
Returns the name and contact information of the server administrator.
This method may be called by any logged-in user.
adminName
adminName(session_key: string) -> string
Returns the name and contact information of the server administrator.
This method may be called by any logged-in user.
adminTelephone
adminTelephone(session_key: string) -> string
Returns the name and contact information of the server administrator.
This method may be called by any logged-in user.
apiFeatures
apiFeatures() -> string[]
@return
: A list of string tags for the available jxAPI features.
Returns the features currently available in the jxAPI. A feature is a grouping of methods and tables that provide a set of logical functionality. For example, the 'tables' feature includes the standard access methods for database tables.
Note that features are not just dependent on what the server can do, but also upon the API version, endpoint, etc.
This method does not require a login session, and may be called by any client.
apiVersion
apiVersion() -> int[]
@return
: An array of 4 integers.
Returns the jxAPI version supported by the current endpoint, which may be distinct from the Timesheet server version and/or any other endpoints that may be available.
This method does not require a login session, and may be called by any client.
approveProject
approveProject(session_key: string, sheet_id: string, project_id: string) -> int
Approve a project that is pending approval.
@param
sheet_id: The sheet ID to approve the project in.@param
project_id: The project ID to approve.@return
: A meaningless value.
AssignApprovalPlan
AssignApprovalPlan(session_key: string, id: string, uids: string[]) -> int
-
@param
id: The plan ID to assign. -
@param
uids: A list of user IDs to assign the plan to. -
@return
: 0
Assigns an Approval Plan to one more users. An exception will be raised if either the Plan ID/Name cannot be found, or if one of the users does not exist, or if the caller does not have the authority to do this. Returns a zero (0) if the assignment was successful.
Note that the first parameter can be either the unique ID of the Approval Plan, or it can be the Name as it appears on the Plan Modification screens. The Unique ID changes every time the administrator modifies the Plan, because the record is deleted and re-added, and so it is often convenient to assign Plans based on their name.
Also note that Plans for Time, Expense, and Mileage can all be used with this function. But since each of these types of Plans may have the same name, if you specify an ambiguous name they will be 'resolved' in the order of Time, then Expense, then Mileage. If other words, if you have both Time and Expense Plans named 'My Plan', and call this function as AssignApprovalPlan('My Plan', ['user1', 'user2']), then only the Time Plan will get assigned to the users, not the Expense Plan.
This method requires administrator access.
assignApprovalPlan
assignApprovalPlan(session_key: string, id: string, uids: string[]) -> int
-
@param
id: The plan ID to assign. -
@param
uids: A list of user IDs to assign the plan to. -
@return
: 0
Assigns an Approval Plan to one more users. An exception will be raised if either the Plan ID/Name cannot be found, or if one of the users does not exist, or if the caller does not have the authority to do this. Returns a zero (0) if the assignment was successful.
Note that the first parameter can be either the unique ID of the Approval Plan, or it can be the Name as it appears on the Plan Modification screens. The Unique ID changes every time the administrator modifies the Plan, because the record is deleted and re-added, and so it is often convenient to assign Plans based on their name.
Also note that Plans for Time, Expense, and Mileage can all be used with this function. But since each of these types of Plans may have the same name, if you specify an ambiguous name they will be 'resolved' in the order of Time, then Expense, then Mileage. If other words, if you have both Time and Expense Plans named 'My Plan', and call this function as AssignApprovalPlan('My Plan', ['user1', 'user2']), then only the Time Plan will get assigned to the users, not the Expense Plan.
This method requires administrator access.
assignPeriodToUsers
assignPeriodToUsers(session_key: string, period_id: string, period_type: string, users: string[], remove_old: boolean) -> string[]
Assigns a time period (which must exist) to one or more users.
-
@param
period_id: The period ID. ('default_weekly' is one that exists by default) -
@param
period_type: One of 'time', 'expense', or 'mileage'. -
@param
users: A list of user IDs to assign the period to. -
@param
remove_old: If true, remove ALL the user's old time information including ALL time records and sheets. -
@return
: A list of strings. The first one is a status message, and any additional ones are errors or warnings.
This method requires administrator access.
assignPeriodToUsersByName
assignPeriodToUsersByName(session_key: string, period_name: string, period_type: string, users: string[], remove_old: boolean) -> string[]
Assigns a time period (which must exist) to one or more users, using the pretty name of the period.
-
@param
period_name: The period name. ('weekly' is one that exists by default) -
@param
period_type: One of 'time', 'expense', or 'mileage'. -
@param
users: A list of user IDs to assign the period to. -
@param
remove_old: If true, remove ALL the user's old time information including ALL time records and sheets. -
@return
: A list of strings. The first one is a status message, and any additional ones are errors or warnings.
This method requires administrator access.
assignRoleToUser
assignRoleToUser(session_key: string, name: string, role: string) -> int
-
@param
name: The ID of the user. -
@param
role: The role to assign to the user. -
@return
: 0 -
@raise
ValueError: If the user or role is not found, or the role name is ambiguous.
Assigns a role to a user, which must be specified by its ID (not login). The role may be specified by the role ID or its display name, provided that the name can be unambiguously matched with a single role ID.
This method requires administrator access.
assignRuleSetToUser
assignRuleSetToUser(session_key: string, userid: string, rulesetname: string) -> string
@param
rulesetname: The name of the policy to assign.@param
userid: The ID of the user to assign the policy to.
Assigns a policy to a user. To remove any existing policy from the user, pass an empty string as the policy name.
This method requires administrator access.
availableImporters
availableImporters(session_key: string) -> string[]
Get the names of available importers.
This method returns a list of the names of available importers, suitable for use
with importFile
. Note that the list includes
all importers installed on the server, whether or not the calling user can
actually run them.
This method may be called by any logged-in user.
changePassword
changePassword(session_key: string, newpw: string) -> int
-
@param
newpw: The new password. -
@return
: 0
Changes the password of the currently logged in user. An exception may be raised if the new password does not meet the validity requirements imposed by the server.
This method may be called by any logged-in user.
changePasswordForUser
changePasswordForUser(session_key: string, user: string, newpw: string) -> int
-
@param
user: The ID of the user. -
@param
newpw: The new password to assign. -
@return
: 0
Changes the password of any existing user; only administrators may change the password for any user other than themself. An exception may be raised if the new password does not meet the validity requirements imposed by the server, or if a non-administrator attempts to change someone else's password.
changeProjectApprovalBackupLevels
changeProjectApprovalBackupLevels(session_key: string, project_id: string, recids: string[], newlevels: double[]) -> int
Change the levels of one or more project backup approval records.
@param
project_id: The project ID.@param
recids: The IDs of the ProjectApproval objects to modify.@param
newlevels: The levels to set each ProjectApproval object to.@return
: A meaningless value.
changeProjectApprovalLevels
changeProjectApprovalLevels(session_key: string, project_id: string, recids: string[], newlevels: double[]) -> int
Change the levels of one or more project approval records.
@param
project_id: The project ID.@param
recids: The IDs of the ProjectApproval objects to modify.@param
newlevels: The levels to set each ProjectApproval object to.@return
: A meaningless value.
ChangeSheetStatus
ChangeSheetStatus(session_key: string, sheet_records: SheetStatusRecord[]) -> SheetStatusRecord[]
Change the approval status of one more more sheets.
This method is deprecated. While it is still fully functional, we recommend that
you use the new sheet workflow around :py:func:save_sheet
to do approvals
instead if possible.
-
@param
sheet_records: A list of SheetStatusRecord objects describing the requested changes. -
@return
: A list of SheetStatusRecord objects describing the changes that were made.
A fault will occur if you are not authorized to change the sheet's approval status.
This method may be called by any logged-in user.
changeUserPassword
changeUserPassword(username: string, curpwd: string, newpwd: string) -> int
-
@param
username: The login ID of the user to change the password for. -
@param
curpwd: The user's current password. -
@param
newpwd: The new password to assign to the user. -
@return
: 0 -
@raise
RuntimeError: If the current password provided is not correct, or the new password is not allowed by the server.
Changes the password for an existing user without first logging in. This method can be used to change a password that is expired and thus does not not permit logins; even if expired the current password is validated first, however.
This method does not require a login session, and may be called by any client.
checkAttributeDataType
checkAttributeDataType(session_key: string, data_type: string) -> int
Use this method to determine if a particular string is a valid data-type for AttributeType records. (Here, data-type is a synonym for the attr_type field of AttributeType records.)
-
@param
data_type: the string that you wish to check. -
@return
: This method returns the integer 1 if the given string IS a valid data-type for AttributeType records. -
@raise
TypeError: If it is not a valid data-type.
This method may be called by any logged-in user.
checkAttributeValue
checkAttributeValue(session_key: string, data_type: string, value: string) -> int
Checks a value for conformance to an attribute type.
In untyped endpoints, this method can be used to check values of any type.
In typed endpoints, this method can only be used to check string values. Use
checkAttributeValueInteger
or
checkAttributeValueNumber
to
check integer and floating point values, respectively.
-
@param
data_type: The attribute data type, or the ID of an attribute type. -
@param
value: The value to check. -
@return
: 1 if the value is appropriate for the specified attribute type or attribute data type
This method may be called by any logged-in user.
checkAttributeValueInteger
checkAttributeValueInteger(session_key: string, data_type: string, value: int) -> int
Checks an integer value for conformance to an attribute type.
This method does not exist in untyped endpoints; use
checkAttributeValue
instead.
In typed endpoints, this method can only be used to check integer values. Use
checkAttributeValue
or
checkAttributeValueNumber
to
check string and floating point values, respectively.
-
@param
data_type: The attribute data type, or the ID of an attribute type. -
@param
value: The value to check. -
@return
: 1 if the value is appropriate for the specified attribute type or attribute data type
This method is a superset of the checkAttributeValue
method, and is subject to its access restrictions.
checkAttributeValueNumber
checkAttributeValueNumber(session_key: string, data_type: string, value: double) -> int
Checks a floating point value for conformance to an attribute type.
This method does not exist in untyped endpoints; use
checkAttributeValue
instead.
In typed endpoints, this method can only be used to check floating point values.
Use checkAttributeValue
or
checkAttributeValueInteger
to
check string and integer values, respectively.
-
@param
data_type: The attribute data type, or the ID of an attribute type. -
@param
value: The value to check. -
@return
: 1 if the value is appropriate for the specified attribute type or attribute data type
This method is a superset of the checkAttributeValue
method, and is subject to its access restrictions.
clientLogin
clientLogin(username: string, pwd: string, user_agent: string, keep_old_sessions: int) -> string
Creates a new session, exactly like login
but
allowing a client application to pass a user-agent parameter for logging
purposes.
This method does not require a login session, and may be called by any client.
companyName
companyName(session_key: string) -> string
Returns the company name specified in the server license.
This method may be called by any logged-in user.
countAccessControlLists
countAccessControlLists(session_key: string) -> int
Count visible records in the access_control_lists (AccessControlList) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countAccrualEvents
countAccrualEvents(session_key: string) -> int
Count visible records in the time_banks_log (AccrualEvent) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countAccruals
countAccruals(session_key: string) -> int
Count visible records in the timebank (Accrual) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countAssignments
countAssignments(session_key: string) -> int
Count visible records in the assignments (Assignment) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countCodes
countCodes(session_key: string) -> int
Count visible records in the codes_tasks (Code) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countCodesCustom4s
countCodesCustom4s(session_key: string) -> int
Count visible records in the codes_custom_4 (CodesCustom4) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countCodesCustom5s
countCodesCustom5s(session_key: string) -> int
Count visible records in the codes_custom_5 (CodesCustom5) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countCodesCustom6s
countCodesCustom6s(session_key: string) -> int
Count visible records in the codes_custom_6 (CodesCustom6) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countCodesCustom7s
countCodesCustom7s(session_key: string) -> int
Count visible records in the codes_custom_7 (CodesCustom7) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countCodesExpense4s
countCodesExpense4s(session_key: string) -> int
Count visible records in the codes_expense_4 (CodesExpense4) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countCodesExpense5s
countCodesExpense5s(session_key: string) -> int
Count visible records in the codes_expense_5 (CodesExpense5) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countCodesExpense6s
countCodesExpense6s(session_key: string) -> int
Count visible records in the codes_expense_6 (CodesExpense6) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countCodesExpense7s
countCodesExpense7s(session_key: string) -> int
Count visible records in the codes_expense_7 (CodesExpense7) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countCodesTime4s
countCodesTime4s(session_key: string) -> int
Count visible records in the codes_time_4 (CodesTime4) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countCodesTime5s
countCodesTime5s(session_key: string) -> int
Count visible records in the codes_time_5 (CodesTime5) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countCodesTime6s
countCodesTime6s(session_key: string) -> int
Count visible records in the codes_time_6 (CodesTime6) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countCodesTime7s
countCodesTime7s(session_key: string) -> int
Count visible records in the codes_time_7 (CodesTime7) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countCurrencyConversions
countCurrencyConversions(session_key: string) -> int
Count visible records in the currency_convert (CurrencyConversion) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countExpenseCodes
countExpenseCodes(session_key: string) -> int
Count visible records in the codes_expenses (ExpenseCode) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countExpenseCurrencys
countExpenseCurrencys(session_key: string) -> int
Count visible records in the codes_currencies (ExpenseCurrency) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countExpenseRecords
countExpenseRecords(session_key: string) -> int
Count visible records in the expense_recs (ExpenseRecord) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countExpenseSources
countExpenseSources(session_key: string) -> int
Count visible records in the codes_expense_sources (ExpenseSource) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countGroups
countGroups(session_key: string) -> int
Count visible records in the groups (Group) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableCodes
countLoggableCodes(session_key: string) -> int
Count loggable records in the codes_tasks (Code) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableCodesCustom4s
countLoggableCodesCustom4s(session_key: string) -> int
Count loggable records in the codes_custom_4 (CodesCustom4) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableCodesCustom5s
countLoggableCodesCustom5s(session_key: string) -> int
Count loggable records in the codes_custom_5 (CodesCustom5) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableCodesCustom6s
countLoggableCodesCustom6s(session_key: string) -> int
Count loggable records in the codes_custom_6 (CodesCustom6) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableCodesCustom7s
countLoggableCodesCustom7s(session_key: string) -> int
Count loggable records in the codes_custom_7 (CodesCustom7) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableCodesExpense4s
countLoggableCodesExpense4s(session_key: string) -> int
Count loggable records in the codes_expense_4 (CodesExpense4) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableCodesExpense5s
countLoggableCodesExpense5s(session_key: string) -> int
Count loggable records in the codes_expense_5 (CodesExpense5) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableCodesExpense6s
countLoggableCodesExpense6s(session_key: string) -> int
Count loggable records in the codes_expense_6 (CodesExpense6) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableCodesExpense7s
countLoggableCodesExpense7s(session_key: string) -> int
Count loggable records in the codes_expense_7 (CodesExpense7) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableCodesTime4s
countLoggableCodesTime4s(session_key: string) -> int
Count loggable records in the codes_time_4 (CodesTime4) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableCodesTime5s
countLoggableCodesTime5s(session_key: string) -> int
Count loggable records in the codes_time_5 (CodesTime5) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableCodesTime6s
countLoggableCodesTime6s(session_key: string) -> int
Count loggable records in the codes_time_6 (CodesTime6) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableCodesTime7s
countLoggableCodesTime7s(session_key: string) -> int
Count loggable records in the codes_time_7 (CodesTime7) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableExpenseCodes
countLoggableExpenseCodes(session_key: string) -> int
Count loggable records in the codes_expenses (ExpenseCode) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableExpenseCurrencys
countLoggableExpenseCurrencys(session_key: string) -> int
Count loggable records in the codes_currencies (ExpenseCurrency) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableExpenseSources
countLoggableExpenseSources(session_key: string) -> int
Count loggable records in the codes_expense_sources (ExpenseSource) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableMileageMeasurements
countLoggableMileageMeasurements(session_key: string) -> int
Count loggable records in the codes_travel_measurements (MileageMeasurement) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableMileageReasons
countLoggableMileageReasons(session_key: string) -> int
Count loggable records in the codes_travel_reasons (MileageReason) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableMileageVehicles
countLoggableMileageVehicles(session_key: string) -> int
Count loggable records in the codes_travel_vehicles (MileageVehicle) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableProjects
countLoggableProjects(session_key: string) -> int
Count loggable records in the projects (Project) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableSubcodes
countLoggableSubcodes(session_key: string) -> int
Count loggable records in the codes_pay_types (Subcode) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countLoggableSubsubcodes
countLoggableSubsubcodes(session_key: string) -> int
Count loggable records in the codes_bill_types (Subsubcode) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countMileageMeasurements
countMileageMeasurements(session_key: string) -> int
Count visible records in the codes_travel_measurements (MileageMeasurement) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countMileageReasons
countMileageReasons(session_key: string) -> int
Count visible records in the codes_travel_reasons (MileageReason) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countMileageRecords
countMileageRecords(session_key: string) -> int
Count visible records in the travel_recs (MileageRecord) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countMileageVehicles
countMileageVehicles(session_key: string) -> int
Count visible records in the codes_travel_vehicles (MileageVehicle) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countProjectApprovals
countProjectApprovals(session_key: string) -> int
Count visible records in the project_approval (ProjectApproval) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countProjectApprovalSettings
countProjectApprovalSettings(session_key: string) -> int
Count visible records in the project_approval_settings (ProjectApprovalSetting) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countProjectApprovers
countProjectApprovers(session_key: string) -> int
Count visible records in the project_approvers (ProjectApprover) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countProjectCodeRates
countProjectCodeRates(session_key: string) -> int
Count visible records in the project_code_rates (ProjectCodeRate) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countProjectPickerItems
countProjectPickerItems(session_key: string) -> int
Count visible records in the project_picker (ProjectPickerItem) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countProjects
countProjects(session_key: string) -> int
Count visible records in the projects (Project) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countPS_DV_Assignmentss
countPS_DV_Assignmentss(session_key: string) -> int
Count visible records in the PS_DV_Assignments (PS_DV_Assignments) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countPS_DV_Ruless
countPS_DV_Ruless(session_key: string) -> int
Count visible records in the PS_DV_Rules (PS_DV_Rules) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countPSAccrualOverrides
countPSAccrualOverrides(session_key: string) -> int
Count visible records in the PSAccrualOverride (PSAccrualOverride) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countPSAccrualTierManagers
countPSAccrualTierManagers(session_key: string) -> int
Count visible records in the PSAccrualTierManager (PSAccrualTierManager) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countPSCompensationTierManagers
countPSCompensationTierManagers(session_key: string) -> int
Count visible records in the PSCompensationTierManager (PSCompensationTierManager) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countPunchRecords
countPunchRecords(session_key: string) -> int
Count visible records in the punch_time_recs (PunchRecord) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countPXTeams
countPXTeams(session_key: string) -> int
Count visible records in the px_teams (PXTeam) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countRateCodes
countRateCodes(session_key: string) -> int
Count visible records in the rate_codes (RateCode) table.
Please note that the availability of this record type or certain fields in it may vary depending on if you access a versioned or unversioned endpoint. The unversioned endpoint typically corresponds to the oldest available versioned endpoint.
This field became available in the 10.0 endpoint.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countRequestRecords
countRequestRecords(session_key: string) -> int
Count visible records in the request_recs (RequestRecord) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countSubcodes
countSubcodes(session_key: string) -> int
Count visible records in the codes_pay_types (Subcode) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countSubsubcodes
countSubsubcodes(session_key: string) -> int
Count visible records in the codes_bill_types (Subsubcode) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countTimeRecords
countTimeRecords(session_key: string) -> int
Count visible records in the time_recs (TimeRecord) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countUserRoles
countUserRoles(session_key: string) -> int
Count visible records in the userroles (UserRole) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countUsers
countUsers(session_key: string) -> int
Count visible records in the users (User) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countUserSheetNotes
countUserSheetNotes(session_key: string) -> int
Count visible records in the user_sheet_notes (UserSheetNote) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countVirtualSheetRecords
countVirtualSheetRecords(session_key: string) -> int
Count visible records in the virtual_sheet_records (VirtualSheetRecord) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
countVirtualTimeSheets
countVirtualTimeSheets(session_key: string) -> int
Count visible records in the virtual_time_sheets (VirtualTimeSheet) table.
See coredb for more information about this method.
This method is a superset of the getRecordsList
method, and
is subject to its access restrictions.
create_or_update_suggestions
create_or_update_suggestions(session_key: string, id_user: string, source_category: string, source_data_list: RawSuggestion[], entry_type: string) -> SuggestionRefreshResult
Create new suggestions or update existing ones.
The source_data_list parameter is a list of RawSuggestion objects; each one of these must have either a SuggestionRecord in the source_data field, or a JSON representation of a suggestion in the json_data field. The extra_properties field contains properties that override those in the suggestion.
If the id_suggestion or source_id properties is included in a suggestion and it matches an existing one, it will be updated, otherwise a new suggestion will be created.
@param
id_user: The user to add suggestions for.@param
source_category: The source category (eg. "generic").@param
source_data_list: A list of RawSuggestion objects.@param
entry_type: One of 'time', 'expense', or 'custom'.@return
: A SuggestionRefreshResult object.
This method may be called by any logged-in user.
CreateApprovalPlan
CreateApprovalPlan(session_key: string, new_rec: ApprovalObject) -> int
-
@param
new_rec: The ApprovalObject structure describing the new approval plan. -
@return
: 0
This method creates a new Approval Template for the approvals process and returns 0 (zero) to indicate success. This method raises an exception if the user does not have the authority to add an Approval Template, or if the record format is invalid.
ApprovalObjects have these keys and values:
- type - either time, expense, or mileage
- bizid - the business process ID which defines the approvers structure (how many approvers there are.) Use one of these constants, which correspond to the number of approvers: default1, default2, default3, default4, default5.
- name - the name of the Approval Template.
- Userbefore - number of days before the end of a period to send a reminder email to the user.
- Userafter - number of days after the end of a period before a reminder is sent to the user (if sheet has not been submitted)
- Approverafter - number of days after the end of a period before a notice is sent to the approver (if they user has not submitted a sheet.)
- Backupafter - number of days after the end of a period to notify the backup approver if a sheet has been submitted but not approved.
- Userrejected - a string to send to the user when his sheet is rejected.
- Userapproved - a string to send to the user when his sheet is approved.
- Approversubmitted - a string to send to the approver when a sheet is in his approval queue.
In addition to the above keys, you must add all the approvers to the Template when you create it, as there is no other way to modify an Approval Template through the jxAPI once created. (However, you can modify the Approval Template through the normal web interface.) Backup approvers are optional but you must add a primary approver key (approver_1 for instance) for each "level" of approval.
For instance, if you gave "default2" for the bizid field, this indicates a 2-level approval process. This means that you must give 2 primary approvers, and 0 to 2 backup approvers.
The valid keys for Primary Approvers and Backup approvers are:
- approver_1
- backup_approver_1
- approver_2
- backup_approver_2
- approver_3
- backup_approver_3
- approver_4
- backup_approver_4
- approver_5
- backup_approver_5
Again, the number of primary approvers must correspond exactly to the number of approval levels indicated by the bizid field. It is not possible to create an Approval Template through the jxAPI without specifying all the primary approvers.
You will get a ValueError exception if you are missing a primary approver.
This method requires administrator access.
createApprovalPlan
createApprovalPlan(session_key: string, new_rec: ApprovalObject) -> int
-
@param
new_rec: The ApprovalObject structure describing the new approval plan. -
@return
: 0
This method creates a new Approval Template for the approvals process and returns 0 (zero) to indicate success. This method raises an exception if the user does not have the authority to add an Approval Template, or if the record format is invalid.
ApprovalObjects have these keys and values:
- type - either time, expense, or mileage
- bizid - the business process ID which defines the approvers structure (how many approvers there are.) Use one of these constants, which correspond to the number of approvers: default1, default2, default3, default4, default5.
- name - the name of the Approval Template.
- Userbefore - number of days before the end of a period to send a reminder email to the user.
- Userafter - number of days after the end of a period before a reminder is sent to the user (if sheet has not been submitted)
- Approverafter - number of days after the end of a period before a notice is sent to the approver (if they user has not submitted a sheet.)
- Backupafter - number of days after the end of a period to notify the backup approver if a sheet has been submitted but not approved.
- Userrejected - a string to send to the user when his sheet is rejected.
- Userapproved - a string to send to the user when his sheet is approved.
- Approversubmitted - a string to send to the approver when a sheet is in his approval queue.
In addition to the above keys, you must add all the approvers to the Template when you create it, as there is no other way to modify an Approval Template through the jxAPI once created. (However, you can modify the Approval Template through the normal web interface.) Backup approvers are optional but you must add a primary approver key (approver_1 for instance) for each "level" of approval.
For instance, if you gave "default2" for the bizid field, this indicates a 2-level approval process. This means that you must give 2 primary approvers, and 0 to 2 backup approvers.
The valid keys for Primary Approvers and Backup approvers are:
- approver_1
- backup_approver_1
- approver_2
- backup_approver_2
- approver_3
- backup_approver_3
- approver_4
- backup_approver_4
- approver_5
- backup_approver_5
Again, the number of primary approvers must correspond exactly to the number of approval levels indicated by the bizid field. It is not possible to create an Approval Template through the jxAPI without specifying all the primary approvers.
You will get a ValueError exception if you are missing a primary approver.
This method requires administrator access.
createGroupMemorizedEntry
createGroupMemorizedEntry(session_key: string, mtype: string, group: string, mrec: MemorizedEntry) -> string
-
@param
mtype: The memorized entry type. -
@param
group: The ID of the group to create the entry for. -
@param
mrec: The memorized entry to create. -
@return
: The ID of the newly created memorized entry.
Create a new memorized entry for a group.
This method requires administrator access.
createGroupMemorizedEntryWithNames
createGroupMemorizedEntryWithNames(session_key: string, mtype: string, group: string, mrec: MemorizedEntry) -> string
-
@param
mtype: The memorized entry type. -
@param
group: The ID of the group to create the entry for. -
@param
mrec: The memorized entry to create. -
@return
: The ID of the newly created memorized entry.
Create a new memorized entry for a group, converting group, project, and code names to IDs on the server side.
This method is a superset of the
createGroupMemorizedEntry
method, and is subject
to its access restrictions.
createJournalForProject
createJournalForProject(session_key: string, projectid: string, journalname: string) -> string
-
@param
projectid: The ID of the project to attach the journal to. -
@param
journalname: The name of the journal. -
@return
: The journal ID.
Create a new journal (note set) for a project.
Note that if the specified journal name already exists, the ID of the existing journal will be returned, instead of creating a new one.
createNote
createNote(session_key: string, journalid: string, text: string, entrytype: string, entryid: string) -> int
-
@param
journalid: The journal ID. -
@param
text: The text of the note. -
@param
entrytype: If the note is associated with an entry, one of 'time', 'expense', or 'mileage'. -
@param
entryid: If the note is associated with an entry, the entry ID. -
@return
: 1 if successful.
Create a note in an existing journal.
createRateRule
createRateRule(session_key: string, raterule: RateRule) -> string
-
@param
raterule: The RateRule structure describing the rule to add. -
@return
: The name of the newly added RateRule.
Adds a new rate rule.
This method requires administrator access.
createRuleSet
createRuleSet(session_key: string, ruleset: RuleSet) -> string
-
@param
ruleset: A RuleSet structure describing the policy to add. -
@return
: The name of the newly added policy.
Adds a policy.
This method requires administrator access.
createUserAccrual
createUserAccrual(session_key: string, user: string, accrual: AccrualRecord) -> string
-
@param
user: The ID of the user. -
@param
accrual: The accrual to create. -
@return
: The ID of the newly created accrual.
Creates a new accrual for a user.
Note: This method is deprecated with the changes to accruals in 10.1, as it can only create old-style accruals.
This method requires administrator access.
createUserMemorizedEntry
createUserMemorizedEntry(session_key: string, mtype: string, user: string, mrec: MemorizedEntry) -> string
-
@param
mtype: The memorized entry type. -
@param
user: The ID of the user to create the entry for. -
@param
mrec: The memorized entry to create. -
@return
: The ID of the newly created memorized entry.
Create a new memorized entry for a user.
This method requires administrator access, unless the user specified by the "user" parameter is the current user.
createUserMemorizedEntryWithNames
createUserMemorizedEntryWithNames(session_key: string, mtype: string, user: string, mrec: MemorizedEntry) -> string
-
@param
mtype: The memorized entry type. -
@param
user: The ID of the user to create the entry for. -
@param
mrec: The memorized entry to create. -
@return
: The ID of the newly created memorized entry.
Create a new memorized entry for a user, converting provided group, project, and code names to their corresponding IDs on the server side. If the value of one of these fields cannot be found as a name, it will be assumed to be an ID instead.
This method is a superset of the
createUserMemorizedEntry
method, and is subject
to its access restrictions.
customerNumber
customerNumber(session_key: string) -> string
Returns the customer number specified in the server license.
This method may be called by any logged-in user.
dateFormat
dateFormat(session_key: string) -> string
Returns a string identifying the short date display format used by the server:
- "US1" : MM/DD/YYYY
- "US2" : MM-DD-YYYY
- "US3" : MM.DD.YYYY
- "EU1" : DD/MM/YYYY
- "EU2" : DD-MM-YYYY
- "EU3" : DD.MM.YYYY
- "US1_SHORT" : MM/DD/YY
- "US2_SHORT" : MM-DD-YY
- "US3_SHORT" : MM.DD.YY
- "EU1_SHORT" : DD/MM/YY
- "EU2_SHORT" : DD-MM-YY
- "EU3_SHORT" : DD.MM.YY
- "ISO" : YYYYMMDD
Note that this affects the way dates are displayed in the UI only; dates passed in records or to other jxAPI methods are always YYYYMMDD unless specified otherwise.
This method may be called by any logged-in user.
delete_approval_plan
delete_approval_plan(session_key: string, sheet_type: string, planid: string, reopen_sheets: boolean) -> boolean
Deletes an approval plan.
@param
sheet_type: One of 'time', 'expense', or 'mileage'.@param
planid: The plan ID.@param
reopen_sheets: If true, reopen sheets which are partially approved by this plan.@return
: True if no exception occurred.
This method requires administrator access.
delete_approval_plans
delete_approval_plans(session_key: string, sheet_type: string, planids: string[], reopen_sheets: boolean) -> boolean
Deletes multiple approval plans.
@param
sheet_type: One of 'time', 'expense', or 'mileage'.@param
planids: A list of plan IDs.@param
reopen_sheets: If true, reopen sheets which are partially approved by these plans.@return
: True if no exception occurred.
This method requires administrator access.
delete_suggestion_by_id
delete_suggestion_by_id(session_key: string, id_suggestion: int) -> boolean
Delete a suggestion with a particular suggestion ID.
@param
id_suggestion: The ID of the suggestion to delete.@return
: Always True if no exception is thrown.
This method may be called by any logged-in user.
delete_suggestion_by_source_id
delete_suggestion_by_source_id(session_key: string, id_user: string, source_id: string, source_category: string) -> boolean
Deletes a suggestion with a particular source ID.
@param
id_user: The user who owns the suggestion.@param
source_id: The original source ID of the suggestion.@param
source_category: The source category, eg. "generic".@return
: Always True if no exception is thrown.
This method may be called by any logged-in user.
deleteAllAttachments
deleteAllAttachments(session_key: string, rectype: string, recid: string) -> int
Deletes all attachments from a time, expense, or mileage record.
Permission to delete attachments is tied to permission to modify the underlying time/expense/mileage record.
-
@param
rectype: One of 'time', 'expense', or 'mileage'. -
@param
recid: The ID of the time/expense/mileage record to delete attachments from. -
@return
: 1.
deleteAttachment
deleteAttachment(session_key: string, rectype: string, recid: string, filename: string) -> int
Deletes an attachment from a time, expense, or mileage record.
Permission to delete attachments is tied to permission to modify the underlying time/expense/mileage record.
-
@param
rectype: One of 'time', 'expense', or 'mileage'. -
@param
recid: The ID of the time/expense/mileage record to delete the attachment from. -
@param
filename: The filename of the attachment to delete. -
@return
: 1.
deleteAttachmentByEncodedId
deleteAttachmentByEncodedId(session_key: string, uniqueId: string) -> int
Deletes an attachment given its encoded unique ID.
See deleteAttachment
for more
information.
-
@param
uniqueId: The attachment ID. -
@return
: 1.
This method is a superset of the deleteAttachment
method,
and is subject to its access restrictions.
deleteAttribute
deleteAttribute(session_key: string, object_type: string, object_id: string, id_attr_type: string) -> int
This method causes the specified attribute value (the value at the 'address' of a specific Object Class and ID and an Attribute Type ID) to be 'unset' or deleted. Subsequent calls to getAttribute() with the same parameters would then return None.
-
@param
object_type: must be in the list of valid Object Types as returned by getAttributeObjectTypes. -
@param
object_id: the Journyx database ID of the Object that we are deleting an attribute value for. It should belong to the object class (table) indicated by the first parameter. -
@param
id_attr_type: the ID of the Attribute Type that we are to delete the values of. -
@return
: If deleting the attribute value was successful, then 0 is returned. -
@raise
RuntimeError: Object Type is invalid -
@raise
ValueError: The Object ID does not exist -
@raise
ValueError: The Attribute Type ID does not exist -
@raise
Exception: The Attribute Value cannot be deleted (due to a permissions error or other reasons)
If the Object ID and Attribute Type ID were valid, but no value was previously set, then 0 is returned (no exception is raised.)
NOTE: You must have the 'Authority - Administrator' role ability to perform this action.
This method requires any one of the following abilities: "admin", "msp_admin"
deleteAttributeType
deleteAttributeType(session_key: string, id_attr_type: string) -> int
This method deletes not only the Attribute Type record, but ALL attributes of that type, including any historical time/expense/travel attributes.
WARNING
Since this causes a lot of records to be deleted, it should be used with caution. Only users with administrator privileges may run this command.
-
@param
id_attr_type: The ID of the Attribute Type that you wish to delete. -
@return
: Returns 0 if successful. -
@raise
RuntimError: If you lack the requisite privileges (admin ability). -
@raise
ValueError: If the Attribute Type ID you provide does not exist.
NOTE: You must have the 'Authority - Administrator' role ability to perform this action.
This method requires administrator access.
deleteAttributeTypeSelectionValue
deleteAttributeTypeSelectionValue(session_key: string, id_attr_value: string) -> int
This method deletes the given Selection Value. It will no longer show up in Attribute Selection Lists. Any Objects which already have this Value will retain the value, but the value will not exist in future selection lists.
-
@param
id_attr_value: the Selection Value ID to delete. -
@return
: 0 if successful. -
@raise
ValueError: raised if the Selection Value (ID) does not exist.
This method requires administrator access.
deleteGroupMemorizedEntry
deleteGroupMemorizedEntry(session_key: string, mtype: string, id: string) -> int
-
@param
mtype: The memorized entry type ('time', 'expense', or 'mileage'). -
@param
id: The ID of the memorized entry to delete. -
@return
: 1
Removes a memorized entry from a group. Although it is not necessary to specify the group (since every memorized entry has a unique ID) this method will not remove memorized entries assigned to users, only those assigned to groups.
This method requires administrator access.
deleteJournal
deleteJournal(session_key: string, journalid: string) -> int
@param
journalid: The ID of the journal to delete.
Delete a journal and all of its notes.
This method requires administrator access.
deleteNote
deleteNote(session_key: string, noteid: string) -> int
-
@param
noteid: The ID of the note to delete. -
@return
: 1 if successful.
Delete an existing note.
This method is equivalent to modifying the note text to an empty string.
deleteRateRule
deleteRateRule(session_key: string, rulename: string) -> int
-
@param
rulename: The name of the rate rule to delete. -
@return
: 1 -
@raise
RuntimeError: If the rule is associated with a policy.
Deletes an existing rate rule. Rules that are associated with an existing policy cannot be deleted unless the policy is deleted first.
This method requires administrator access.
deleteRuleSet
deleteRuleSet(session_key: string, setname: string) -> int
-
@param
setname: The name of the policy to delete. -
@return
: 1
Deletes a policy. Does not delete any of the rules that are part of the policy;
if you want to remove those too you must delete them individually with
deleteRateRule
.
This method is a superset of the deleteRateRule
method, and
is subject to its access restrictions.
deleteUserAccrual
deleteUserAccrual(session_key: string, id: string) -> int
-
@param
id: The ID of the accrual to delete. -
@return
: 1
Removes an existing accrual.
Note: This method is deprecated as of Journyx 10.1, even if you request an older API version.
This method requires administrator access.
deleteUserAttributeByLogin
deleteUserAttributeByLogin(session_key: string, object_id: string, id_attr_type: string) -> int
This method causes the specified attribute value (the value at the 'address' of a user ID and an Attribute Type ID) to be 'unset' or deleted. Subsequent calls to getAttribute() with the same parameters would then return None.
-
@param
object_id: the Journyx user login of the user for whom we are deleting an attribute value. -
@param
id_attr_type: the ID of the Attribute Type that we are to delete the values of. -
@return
: If deleting the attribute value was successful, then 0 is returned. -
@raise
ValueError: The Object ID does not exist -
@raise
ValueError: The Attribute Type ID does not exist -
@raise
Exception: The Attribute Value cannot be deleted (due to a permissions error or other reasons)
If the Object ID and Attribute Type ID were valid, but no value was previously set, then 0 is returned (no exception is raised.)
NOTE: You must have the 'Authority - Administrator' role ability to perform this action.
This method requires any one of the following abilities: "admin", "msp_admin"
deleteUserMemorizedEntry
deleteUserMemorizedEntry(session_key: string, mtype: string, id: string) -> int
-
@param
mtype: The memorized entry type ('time', 'expense', or 'mileage'). -
@param
id: The ID of the memorized entry to delete. -
@return
: 1
Deletes a memorized entry. Although it is not necessary to specify the user (since every memorized entry has a unique ID) this method will not remove memorized entries assigned to groups, only those assigned to users.
This method requires administrator access.
doesProjectApprovalStartOver
doesProjectApprovalStartOver(session_key: string, project_id: string) -> boolean
Check whether project approval starts over upon a rejection or modification.
@param
project_id: The project ID.@return
: True if approvals restart, False if not.
This method may be called by any logged-in user.