C# Client Library
A C# Client Library for the AnalyzeRe REST API
|
Parameters that can be added to your REST requests to access additional API features. More...
Static Public Member Functions | |
static RequestParameters | AdvancedSearch (string advancedSearchTerms) |
Can be added to your GET requests to send a field filtering request to the server. If the endpoint supports data filtering, the results will be a filtered subset. Supports key/value search with logical operators. Currently supports the 'meta_data' field. | |
static RequestParameters | DataEntityLength (long totalBytes) |
Creates an HTTP Header RestSharp parameter that specifies the length of an entity to be uploaded in subsequent PATCH requests. | |
static RequestParameters | DataPatchChunk (long offsetBytes, byte[] chunkData, int count) |
Creates the RestSharp HTTP Header parameter required to PATCH a data endpoint with part of a file. | |
static RequestParameters | DataPatchChunk (long offsetBytes, string chunkData) |
Creates the RestSharp HTTP Header parameter required to PATCH a data endpoint with part of a file. | |
static RequestParameters | DataPatchChunk_Object (long offsetBytes, object chunkData, int content_length) |
Creates the RestSharp HTTP Header parameter required to PATCH a data endpoint with part of a file. | |
static RequestParameters | ExpandReferences () |
Can be added to your GET requests to recursively resolve resource references in the response. For example, if included in a Layer GET request, rather than returning a list of loss set reference ids, all properties of the loss sets would appear in the response. | |
static RequestParameters | Fields (IEnumerable< string > fieldNames) |
Can be added to your GET requests to return only the specified fields in the response body. For example, can be used to add the parameter "?fields=id,status" to return only the id and status of a resource. Useful for avoiding large json response bodies when only partial information is desired. Can specify one or more property names. | |
static RequestParameters | Ids (IEnumerable< string > ids) |
Can be added to your collection GET requests to return only the set of resources whose id matches one of the specified ids. | |
static RequestParameters | Omit (IEnumerable< string > fieldNames) |
Similar to Fields, but rather than supplying a "white-list", allows one to specify a list of fields to be excluded from the the response body. This is useful if you wish to exclude certain large and/or expensive properties from being transmitted and serialized. Can specify one or more property names. | |
static RequestParameters | Order (string ordering) |
Can be added to collection GET requests to specify the way items should be ordered. Note: Some properties are not supported, in which case ordering will have no effect. | |
static RequestParameters | Order< T > (Expression< Func< T, object > > propertyExpression, bool ascending=true) |
Helper function to create RequestParameters for ordering by the specified property. Note: Some properties are not supported, in which case ordering will have no effect. | |
static RequestParameters | Page (long offset, long limit) |
When getting a collection of items, these parameters can be added to restrict the number of results you get back and page through them. | |
static RequestParameters | PageNumber (long pageNumber, long resultsPerPage) |
A variation of the 'Page' parameters that achieves the same effect, but by specifying a page number rather than an offset. | |
static RequestParameters | Search (string searchTerms) |
Can be added to your GET requests to send a search request to the server. If the endpoint supports search, the results will be a filtered subset. | |
static RequestParameters | Type (string apiTypeName) |
Can be added to your collection GET requests to filter by a specific sub-type when that resource is polymorphic (has several different sub-types). If the endpoint supports filtering by type, the results will be a filtered subset. | |
static RequestParameters | Type (Type resourceType) |
Can be added to your collection GET requests to filter by a specific sub-type when that resource is polymorphic (has several different sub-types). If the endpoint supports filtering by type, the results will be a filtered subset. | |
Static Public Attributes | |
const string | PATCHContentType = "application/offset+octet-stream" |
The contentType to set when submitting a PATCHED chunk data. | |
Parameters that can be added to your REST requests to access additional API features.
Definition at line 22 of file API.Parameters.cs.
|
inlinestatic |
Can be added to your GET requests to send a field filtering request to the server. If the endpoint supports data filtering, the results will be a filtered subset. Supports key/value search with logical operators. Currently supports the 'meta_data' field.
In short, if you know a (key, value) pair by which you'd like to filter, you can submit the following sample queries as the content of the 'metaquery' GET parameter. (e.g. ?metaquery=<query>)
exact match
substring match
comparison match (lexicographic or numeric)
logical operators
grouping via parentheses
filtering by key presence
case sensitivity
By default, queries are case insensitive. Any value may be prefixed with the symbol
to activate case sensitivity. e.g.
quoting keys and values
Keys and values need not be double-quoted. However, unquoted keys and values may not contain certain characters including but not limited to whitespace. Surround keys and values with double-quotation marks for safety. See below for the full list of characters disallowed in unquoted keys/values.
In greater detail:
The elements of a filtering query follow this format:
Where
Furthermore, query elements may be combined using parentheses and logical operators which include:
Unquoted keys and values may not contain the following tokens:
Quoted keys and values may contain any character except unescaped quotes. Quotes may be escaped by repetition. e.g. a query for a value containing double-quotes:
or a query with a key containing quotes
advancedSearchTerms | A string defining a filtering query consisting of keys and values, operations and logic that selects a subset of objects at the endpoint based on object metadata. |
Definition at line 159 of file API.Parameters.cs.
|
inlinestatic |
Creates an HTTP Header RestSharp parameter that specifies the length of an entity to be uploaded in subsequent PATCH requests.
totalBytes | The total number of bytes of the data to be uploaded. |
Definition at line 345 of file API.Parameters.cs.
|
inlinestatic |
Creates the RestSharp HTTP Header parameter required to PATCH a data endpoint with part of a file.
offsetBytes | The offset in the file being PATCHed at which to insert this segment of data. |
chunkData | The bytes array containing the data to patch. |
count | The number of bytes from the data to include. |
Definition at line 359 of file API.Parameters.cs.
|
inlinestatic |
Creates the RestSharp HTTP Header parameter required to PATCH a data endpoint with part of a file.
offsetBytes | The offset in the file being PATCHed at which to insert this segment of data. |
chunkData | The string contents to patch. |
Definition at line 382 of file API.Parameters.cs.
|
inlinestatic |
Creates the RestSharp HTTP Header parameter required to PATCH a data endpoint with part of a file.
offsetBytes | The offset in the file being PATCHed at which to insert this segment of data. |
chunkData | The data to patch. |
content_length | The length of the byte representation of the data being patched. |
Definition at line 397 of file API.Parameters.cs.
|
inlinestatic |
Can be added to your GET requests to recursively resolve resource references in the response. For example, if included in a Layer GET request, rather than returning a list of loss set reference ids, all properties of the loss sets would appear in the response.
Definition at line 235 of file API.Parameters.cs.
|
inlinestatic |
Can be added to your GET requests to return only the specified fields in the response body. For example, can be used to add the parameter "?fields=id,status" to return only the id and status of a resource. Useful for avoiding large json response bodies when only partial information is desired. Can specify one or more property names.
fieldNames | The fields names to return in the json response. |
Definition at line 251 of file API.Parameters.cs.
|
inlinestatic |
Can be added to your collection GET requests to return only the set of resources whose id matches one of the specified ids.
ids | The fields names to return in the json response. |
If an invalid GUID is specified in the list of ids, the entire request will fail. If a valid GUID is specified, but no resource in this collection has that id, the request will succeed and simply not contain a result for that GUID.
The server may impose a limit on the number of ids that can be requested at one time.
Definition at line 289 of file API.Parameters.cs.
|
inlinestatic |
Similar to Fields, but rather than supplying a "white-list", allows one to specify a list of fields to be excluded from the the response body. This is useful if you wish to exclude certain large and/or expensive properties from being transmitted and serialized. Can specify one or more property names.
fieldNames | The fields names to exclude from the json response. |
Definition at line 269 of file API.Parameters.cs.
|
inlinestatic |
Can be added to collection GET requests to specify the way items should be ordered. Note: Some properties are not supported, in which case ordering will have no effect.
ordering | A comma delimited string of properties to order by. Each property can be preceded by a negative sign (-) to order descending. For instance, to sort first by description, then by most recently created (for duplicate descriptions) use "description,-created". |
Definition at line 197 of file API.Parameters.cs.
|
inlinestatic |
Helper function to create RequestParameters for ordering by the specified property. Note: Some properties are not supported, in which case ordering will have no effect.
propertyExpression | The property to order by. |
ascending | By default, properties are sorted in ascending order. Set to false to sort by this property descending. |
Definition at line 214 of file API.Parameters.cs.
|
inlinestatic |
When getting a collection of items, these parameters can be added to restrict the number of results you get back and page through them.
offset | The number of results to skip before starting to return results. |
limit | The maximum number of results to return. |
Definition at line 308 of file API.Parameters.cs.
|
inlinestatic |
A variation of the 'Page' parameters that achieves the same effect, but by specifying a page number rather than an offset.
pageNumber | The page or results you wish to return (starting at page 1). |
resultsPerPage | The number of results per page. |
Definition at line 326 of file API.Parameters.cs.
|
inlinestatic |
Can be added to your GET requests to send a search request to the server. If the endpoint supports search, the results will be a filtered subset.
Definition at line 34 of file API.Parameters.cs.
|
static |
Can be added to your collection GET requests to filter by a specific sub-type when that resource is polymorphic (has several different sub-types). If the endpoint supports filtering by type, the results will be a filtered subset.
apiTypeName | If you know the exact API type name you want, you can specify it here. Otherwise, you can use the overload. |
|
static |
Can be added to your collection GET requests to filter by a specific sub-type when that resource is polymorphic (has several different sub-types). If the endpoint supports filtering by type, the results will be a filtered subset.
resourceType | The type of resource you wish to retrieve. This should correspond to a instantiable resource type. Base types or interfaces that do not correspond to a single API type return no results. |
|
static |
The contentType to set when submitting a PATCHED chunk data.
Definition at line 25 of file API.Parameters.cs.