cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing API Service

Former Member
0 Kudos

Hi,

  I have a requirement to get Device Info form Afaria Server. How can i access API Service methods. Do i need to install API Services in my machine?

How to access the API classes? What do i need to import to access the classes? Any sample code or steps would be highy appreciated. Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos
Former Member
0 Kudos

ThaT really helps chetan.. I have couple of questions here.. Can I use java to call api services? And I want to get the device info and store in a database.. Is that possible?

Former Member
0 Kudos

Not sure but i think you can use the java to call api services.

Former Member
0 Kudos

Hi,

  I have a doubt in the below part of code from the doc. I couldnt find TenantServiceClient in the generated Classes and so i couldn't set my credentials like domain, username & pwd. I tried with other services too. but couldnt find any method related to setting credentials lke in the below code. I have all other classes generated correctly, like i can find methods for intContext, setting farm id, tenant id etc. Am i missing something. ?

AfariaServiceTenant.TenantServiceClient svc2 = new AfariaServiceTenant.TenantServiceClient("NetNamedPipeBinding_ITenantService");

svc2.ClientCredentials.Windows.ClientCredential.Domain = _domain;

svc2.ClientCredentials.Windows.ClientCredential.UserName = _username;

svc2.ClientCredentials.Windows.ClientCredential.Password = _password;

AfariaServiceTenant.ContextInfo myCtx2 = svc2.InitContext(_guid);