Skip to content

TableApi Class ​

Definition ​

Wrapper methods for calling Table API methods against arbitrary table names

  • Namespace: JASE.ServiceNow
  • Assembly: JASE.ServiceNow.dll

Properties ​

NameDescription
MaxQueryResultsLimits the result set from the Service Now instance to an asbolute limit

Methods ​

NameDescription
TableApiResult AppendWorkNotes(string table, string sys_id, string workNotes, ConnectionContext context = null)Appends a work note to the record (tables that extend task, such as incident or change_request).
Task<TableApiResult> AppendWorkNotesAsync(string table, string sys_id, string workNotes, ConnectionContext context = null, CancellationToken cancellationToken = null)Appends a work note to the record (tables that extend task, such as incident or change_request).
long Count(string table, string query = null)Synchronously returns the count of records matching a query
Task<long> CountAsync(string table, string query = null, ConnectionContext context = null)Asynchronously returns the count of records matching a query
TableApiResult Create(string table, IDictionary<string, object> fields, ConnectionContext context = null)Creates a row in the specified ServiceNow table.
Task<TableApiResult> CreateAsync(string table, IDictionary<string, object> fields, ConnectionContext context = null, CancellationToken cancellationToken = null)Creates a row in the specified ServiceNow table.
Task<TableApiResult> GetAllAsync(string table, TableReadOptions options, ConnectionContext context = null, CancellationToken cancellationToken = null)Returns all pages matching options, following Link headers until exhausted.
Task<TableApiResult> GetAllAsync(string table, string query = null, IEnumerable<string> fields = null)Return all entries matching the query from the SNOW table in a loop
Task<TableApiResult> GetAllAsync(string table, string query, IEnumerable<string> fields, ConnectionContext context, CancellationToken cancellationToken = null)Return all entries matching the query from the SNOW table in a loop
Task<TableApiResult> GetAsync(string table, TableReadOptions options, ConnectionContext context = null, CancellationToken cancellationToken = null)Returns entries matching options from the ServiceNow table. Prefer Lean for field-projected, display-value reads.
Task<TableApiResult> GetAsync(string table, string query, int limit, IEnumerable<string> fields, ConnectionContext context = null, CancellationToken cancellationToken = null)Return entries matching the query from the ServiceNow table
Task<IDictionary<string, object>> GetBySysID(string table, string sys_id, IEnumerable<string> fields = null)Return all entries matching the query from the SNOW table in a loop
Task<IDictionary<string, object>> GetBySysID(string table, string sys_id, IEnumerable<string> fields, ConnectionContext context = null, bool suppressCaching = null, CancellationToken cancelToken = null)Returns a Table entry based on it's sys_id property
Task<IDictionary<string, object>> GetBySysIdAsync(string table, string sysId, TableReadOptions options, ConnectionContext context = null, CancellationToken cancellationToken = null)Returns a single row via resource GET (/api/now/table/{table}/{sys_id}) using options. Prefer this overload with Lean over query-by-sys_id.
TableApiResult Update(string table, string sys_id, IDictionary<string, object> fields, ConnectionContext context = null)Updates the row identified by sys_id in the specified table (partial update).
Task<TableApiResult> UpdateAsync(string table, string sys_id, IDictionary<string, object> fields, ConnectionContext context = null, CancellationToken cancellationToken = null)Updates the row identified by sys_id in the specified table (partial update).