Skip to content

ServiceNow.Core

SNow.Core

ITable<T> Interface

Handle ServiceNow tables API

csharp
public interface ITable<T>
    where T : SNow.Core.Models.ServiceNowBaseModel

Type parameters

T

Derived
Table<T>

Properties
RequestUrl
Methods
AllToListAsync()Makes HTTP requests to get all data (from all pages)
AllToListAsync(CancellationToken)Makes HTTP requests to get all data (from all pages)
CreateAsync(object, CancellationToken)
CreateAsync(object)
DeleteAsync(Guid, CancellationToken)
DeleteAsync(Guid)
GetByIdAsync(Guid, CancellationToken)
GetByIdAsync(Guid)
Limit(int)The maximum number of results returned per page (default: 10,000)
OrderBy(Expression<Func<T,object>>)
OrderByDesc(Expression<Func<T,object>>)
Select(Expression<Func<T,object>>[])List of properties to return, impacts the size of the response
SetHeaders(List<KeyValuePair<string,string>>)
ToListAsync(Nullable<int>)Makes the actual HTTP Request
ToListAsync(CancellationToken, Nullable<int>)Makes the actual HTTP Request
UpdateAsync(Nullable<Guid>, object, bool)
UpdateAsync(Nullable<Guid>, object, CancellationToken, bool)
Where(Expression<Func<T,bool>>)Set query parameters to the API request using Where clause.
Order matters so x => x.id == id works while x => id == x.id don't.
WithQuery(Expression<Func<T,string>>)The query must have only those operators and, or, like, =, !=, startsWith, endsWith see SN Rest Operators

Released under the MIT License.