Class UriFormatter
- Namespace
- NetCoreForce.Client
- Assembly
- NetCoreForce.Client.dll
public static class UriFormatter
- Inheritance
-
UriFormatter
- Inherited Members
Methods
ApexUri(string, string)
Versions
public static Uri ApexUri(string instanceUrl, string apexResourceUrl)
Parameters
Returns
BaseUri(string)
SF Base URI
public static Uri BaseUri(string instanceUrl)
Parameters
instanceUrl
string
Returns
Batch(string, string)
Batch Resource
public static Uri Batch(string instanceUrl, string apiVersion)
Parameters
Returns
CompositeRequest(string, string)
Composite Request Used for: Create/Update multiple
public static Uri CompositeRequest(string instanceUrl, string apiVersion)
Parameters
instanceUrl
stringSFDC instance URL, e.g. "https://na99.salesforce.com"
apiVersion
stringSFDC API version, e.g. "v41.0"
Returns
CompositeSObjectCollectionsSubRequest(string)
SObjectCollections
public static string CompositeSObjectCollectionsSubRequest(string apiVersion)
Parameters
apiVersion
stringSFDC API version, e.g. "v57.0"
Returns
CompositeSubRequest(string, string, string)
SObject Composite Subrequest Describes the individual metadata for the specified object. Can also be used to create a new record for a given object.
public static string CompositeSubRequest(string apiVersion, string sObjectName, string objectId)
Parameters
Returns
DescribeGlobal(string, string)
Describe Global Use the Describe Global resource to list the objects available in your org and available to the logged-in user. This resource also returns the org encoding, as well as maximum batch size permitted in queries.
public static Uri DescribeGlobal(string instanceUrl, string apiVersion)
Parameters
Returns
IntrospectTokenUrl(string, string, string, string)
Formats a URL to request a OAuth Token Introspection
public static Uri IntrospectTokenUrl(string introspectTokenUrl, string token, string clientId, string clientSecret = "")
Parameters
introspectTokenUrl
stringtoken
stringThe token the client application already received.
clientId
stringThe Consumer Key from the connected app definition.
clientSecret
stringThe Consumer Secret from the connected app definition. Required unless the Require Secret for Web Server Flow setting is not enabled in the connected app definition.
Returns
Limits(string, string)
Limits Resource URL
Use the Limits resource to list limits information for your organization.
public static Uri Limits(string instanceUrl, string apiVersion)
Parameters
Returns
LimitsResource(string)
Limits Resource
Use the Limits resource to list limits information for your organization.
format: /vXX.X/limits/
public static Uri LimitsResource(string apiVersion)
Parameters
apiVersion
string
Returns
OAuthAuthenticationUrl(string, string, string, string)
Formats a manual authentication URL for the Web Server Authentication Flow
public static Uri OAuthAuthenticationUrl(string loginUrl, string clientId, string clientSecret, string redirectUrl = "https://login.salesforce.com/services/oauth2/success")
Parameters
loginUrl
stringRequired. Salesforce authorization endpoint.
clientId
stringRequired. The Consumer Key from the connected app definition.
clientSecret
stringRequired. The Consumer Key from the connected app definition.
redirectUrl
stringRequired. The Callback URL from the connected app definition.
Returns
Query(string, string, string, bool)
SOQL Query
public static Uri Query(string instanceUrl, string apiVersion, string query, bool queryAll = false)
Parameters
Returns
RefreshTokenUrl(string, string, string, string)
Formats a URL to request a OAuth Refresh Token
public static Uri RefreshTokenUrl(string tokenRefreshUrl, string refreshToken, string clientId, string clientSecret = "")
Parameters
tokenRefreshUrl
stringrefreshToken
stringThe refresh token the client application already received.
clientId
stringThe Consumer Key from the connected app definition.
clientSecret
stringThe Consumer Secret from the connected app definition. Required unless the Require Secret for Web Server Flow setting is not enabled in the connected app definition.
Returns
SObjectBasicInformation(string, string, string)
SObject Basic Information Describes the individual metadata for the specified object. Can also be used to create a new record for a given object.
public static Uri SObjectBasicInformation(string instanceUrl, string apiVersion, string sObjectName)
Parameters
Returns
SObjectBlobRetrieve(string, string, string, string, string)
SObject Rows
public static Uri SObjectBlobRetrieve(string instanceUrl, string apiVersion, string sObjectName, string objectId, string blobField = "body")
Parameters
Returns
SObjectCollectionsUpsert(string, string, string, string)
SObjectCollections Upsert
public static Uri SObjectCollectionsUpsert(string instanceUrl, string apiVersion, string sObjectName, string fieldName)
Parameters
instanceUrl
stringSFDC instance URL, e.g. "https://na99.salesforce.com"
apiVersion
stringSFDC API version, e.g. "v57.0"
sObjectName
stringsObject name, e.g. "Account"
fieldName
string
Returns
SObjectDescribe(string, string, string)
SObject Describe Completely describes the individual metadata at all levels for the specified object.
public static Uri SObjectDescribe(string instanceUrl, string apiVersion, string sObjectName)
Parameters
Returns
SObjectRows(string, string, string, string, List<string>)
SObject Rows Resource Used for: Update, Delete, Field values
public static Uri SObjectRows(string instanceUrl, string apiVersion, string sObjectName, string objectId, List<string> fields = null)
Parameters
instanceUrl
stringSFDC instance URL, e.g. "https://na99.salesforce.com"
apiVersion
stringSFDC API version, e.g. "v57.0"
sObjectName
stringSObject name, e.g. "Account"
objectId
stringSObject ID
fields
List<string>(optional) "fields" parameter, a list of object fields for GET requests
Returns
SObjectRowsByExternalId(string, string, string, string, string)
SObject Rows by External ID Used for: Retrieve Records Using sObject Rows by External ID Upsert Records Using sObject Rows by External ID Delete Records Using sObject Rows by External ID Return Headers Using sObject Rows by External ID
public static Uri SObjectRowsByExternalId(string instanceUrl, string apiVersion, string sObjectName, string fieldName, string fieldValue)
Parameters
instanceUrl
stringSFDC instance URL, e.g. "https://na99.salesforce.com"
apiVersion
stringSFDC API version, e.g. "v57.0"
sObjectName
stringsObject name, e.g. "Account"
fieldName
stringfieldValue
string
Returns
SObjectTree(string, string, string)
sObject Tree Used for: Create multiple
public static Uri SObjectTree(string instanceUrl, string apiVersion, string sObjectName)
Parameters
instanceUrl
stringSFDC instance URL, e.g. "https://na99.salesforce.com"
apiVersion
stringSFDC API version, e.g. "v57.0"
sObjectName
stringsObject name, e.g. "Account"
Returns
SObjectsComposite(string, string)
SObject Composite Used for: Update multiple
public static Uri SObjectsComposite(string instanceUrl, string apiVersion)
Parameters
instanceUrl
stringSFDC instance URL, e.g. "https://na99.salesforce.com"
apiVersion
stringSFDC API version, e.g. "v57.0"
Returns
Search(string, string, string)
Search Resource, for SOSL searches
public static Uri Search(string instanceUrl, string apiVersion, string query)
Parameters
Returns
UserAgentAuthenticationUrl(string, string, string, DisplayTypes, string, string)
Formats an authentication URL for the User-Agent OAuth Authentication Flow
public static Uri UserAgentAuthenticationUrl(string loginUrl, string clientId, string redirectUrl, DisplayTypes display = DisplayTypes.Page, string state = "", string scope = "")
Parameters
loginUrl
string(Required) Salesforce authorization endpoint.
clientId
string(Required) The Consumer Key from the connected app definition.
redirectUrl
string(Required) The Callback URL from the connected app definition.
display
DisplayTypesChanges the login page’s display type
state
stringSpecifies any additional URL-encoded state data to be returned in the callback URL after approval.
scope
stringOAuth scope - specifies what data your application can access
Returns
Versions(string)
Versions
public static Uri Versions(string instanceUrl)
Parameters
instanceUrl
string
Returns
WebServerAuthenticationUrl(string, string, string, DisplayTypes, bool, string, string)
Formats an authentication URL for the Web Server Authentication Flow
public static Uri WebServerAuthenticationUrl(string loginUrl, string clientId, string redirectUrl, DisplayTypes display = DisplayTypes.Page, bool immediate = false, string scope = "", string state = "")
Parameters
loginUrl
stringRequired. Salesforce authorization endpoint.
clientId
stringRequired. The Consumer Key from the connected app definition.
redirectUrl
stringRequired. The Callback URL from the connected app definition.
display
DisplayTypesChanges the login page’s display type
immediate
boolDetermines whether the user should be prompted for login and approval. Default is false.
scope
stringOAuth scope - specifies what data your application can access
state
stringSpecifies any additional URL-encoded state data to be returned in the callback URL after approval.