fredsakr / eloqua-csharp-rest-client Goto Github PK
View Code? Open in Web Editor NEWEloqua C# Rest Client
License: Other
Eloqua C# Rest Client
License: Other
The Readme states Models included: FormData. Can you provide an example of how to get to the formdata?
Hi,
I'm attempting to retrieve an email asset with the client.Assets.Email.Get(id, Depth.complete) call, but I keep getting an exception with a 401 Unauthorized status. I tried v1/v2 services, standard URL vs data URL. I verified that my user has proper access. I verified the URL and parameters of the resulting request vs the Eloqua 10 portal; they appear to be identical, minus the xsrfToken that the portal uses.
I'm able to successfully make other calls via the client (contact search, contact activity, etc). So I don't believe there's an issue with the API user or fashion in which the call is being made. I tried the topliners forums as well, to no avail. I figure it's possible there may be a bug with the rest client, or at the very least you will be able to help.
Thanks
I have the following code for trying to create a CustomObject (Notice I added accountId)
List<FieldValue> coFieldValuesCreate = new List<FieldValue>()
{
new FieldValue { id = 279, value = "[email protected]" }
};
CustomObject coCreate = new CustomObject();
if (customObjectType == CustomObjectType.Contact)
{
coCreate.contactId = 775169;
}
else if (customObjectType == CustomObjectType.Account)
{
coCreate.accountId = 3831189;
}
coCreate.fieldValues = coFieldValuesCreate;
CustomObject createResult = Credentials.client20.Data.CustomObject.Post(coCreate);
customObjectId = createResult.id;
I always get endpoint not found when trying to call
CustomObject createResult = myClient.Data.CustomObject.Post(myCustomObject);
I fear this is because Eloqua.Api.Rest.ClientLibrary.Models.Data.CustomObjects.CustomObjects.cs has its resource always poiting to:
[Resource("/data/customObject", "CustomObject")]
POST endpoint
/api/REST/2.0/data/customObject/{parentId}/instance
DELETE endpoint
/api/REST/2.0/data/customObject/{parentId}/instance/{id}
GET endpoint
/api/REST/2.0/data/customObject/{parentId}/instance/{id}
PUT endpoint
/api/REST/2.0/data/customObject/{parentId}/instance/{id}
How are these used?
I also tried calling
CustomObject getResult = Credentials.client20.Data.CustomObject.Get(125);
And still get endpoint not found
Note: Calls for contacts work perfectly.
Custom Objects can be generated for Accounts as well, and to associate the Custom Object, an accountId is passed.
Under Body Parameter, both accountId and contactId are defined:
accountId
Type: string
The account record Id associated to this custom object data.
contactId
Type: string
The contact record Id associated to this custom object data.
So I have a form #249 it has 1000's of entries, when I run the test case it come back with two FormData objects with null field values. But if I overload using the search string FormId=249 I get back the objects with values.
Fail:
var data = _client.Data.FormData.Get(249);
Assert.Greater(data.fieldValues.Count, 0);
Pass:
var data = _client.Data.FormData.Get(249,"FormId=249", 1,100);
Assert.Greater(data.elements[0].fieldValues.Count, 0);
Is this by design?
Thanks,
KC
The Assets/ContentSection have a default url of /assets/contentSections in the Client. For operations like PUT and POST it should be /assets/contentSection
Hello,
Is it possible to pull a list of forms with fields names? I don't see a Form Model.
/assets/forms?depth={depth}&count={count}&page={page}&search={search}&orderBy={orderBy}&lastUpdatedAt={lastUpdatedAt}
Ref:
http://topliners.eloqua.com/docs/DOC-3406
Thanks,
KC
I need to connect to Eloqua through an HTTP proxy.
The underlying RestSharp library supports this. I just need the RestClient.Proxy
property to be exposed. (The RestClient instance is an internal
property.)
https://github.com/fredsakr/eloqua-csharp-rest-client/blob/master/EloquaClient/BaseClient.cs#L22
It would be useful to have access to the 'internalName' property on fields, for instance in ContactField. (It seems like it was possible at one point, but it's been commented-out along with several others: https://github.com/fredsakr/eloqua-csharp-rest-client/blob/master/EloquaClient/Models/Assets/DataField.cs#L11)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.