Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this page:

...

Note

In v9.1 and later 's "Applications" are known as "Projects." Where the documentation below refers to  Applications it corresponds to  v9.1+ Projects," and "Themes" are known as "Styles." The API objects and methods still use the words application, 'app', and theme.

How do I login/logout to/from a Form server?

...

Note that when you login, the .NET client API initializes a local security token based on your credentials.  It does not actually make a call however, until you make your first request.  At that time, the forms service will attempt to authorize you based on your token.   In the above example, the first call is for the user entry.

The LoginAs method for an existing user:

This new method allows you to login as any of the existing tenant users provided you can pass in the tenant's admin user and password. This is quite convenient useful when you want to login using the same user that is logged into your application project without having to know their password.

...

Note

When you login, the .NET client API initializes a local security token based on the supplied credentials.  It does not actually make a call however, until the first request is executed.  At  At that time, the forms service will attempt to authorize the user based on the provided token.   In the above examples, the first call is for the user entry.

...

How do I get the list of all applications projects for the current user?

Code Block
    FormsService service = ...;
    ApplicationQuery query = service.CreateApplicationQuery(null);
    ApplicationFeed apps = service.Query(query);
    foreach (ApplicationEntry app in apps.Entries)
    {
            Console.WriteLine("App: " + app.Title.Text);
            // ...
    }

...

There are three options when uploading a workflow or form: Insert, Copy or Replace. You can use a Stream or a file path location when uploading.

Code Block
string fileName = ....;
bool isForm = ....;
ApplicationEntry appEntry = ....; 

// If an entry with the same id already exists, it will be replaced.
// Otherwise, the archive will be uploaded with the same id.
FormTypeEntry entry = appEntry. FormTypeFeed.UploadAndInsertFormType(filename, isForm); 

// If an entry with the same id already exists, a copy will be made.
// Otherwise, the archive will be uploaded with the same id.
FormTypeEntry entry = appEntry.FormTypeFeed.UploadAndCopyFormType(filename, isForm); 

// If an entry with the same id already exists, it will be replaced.
// Otherwise, the archive will be uploaded with the same id.
FormTypeEntry entry = appEntry.FormTypeFeed.UploadAndReplaceFormType(filename, isForm); 
 
Stream appStream = ....;
bool isForm = ....;
ApplicationEntry appEntry = ....;
 
// If an entry with the same id already exists, it will be replaced.
// Otherwise, the archive will be uploaded with the same id. 
FormTypeEntry entry = appEntry. FormTypeFeed.UploadAndInsertFormType(appStream,isForm);

// If an entry with the same id already exists, a copy will be made. 
// Otherwise, the archive will be uploaded with the same id. 
FormTypeEntry entry = appEntry.FormTypeFeed.UploadAndCopyFormType(appStream, isForm);


// If an entry with the same id already exists, it will be replaced. 
// Otherwise, the archive will be uploaded with the same id. 
FormTypeEntry entry = appEntry.FormTypeFeed.UploadAndReplaceFormType(appStream, isForm);  

...

 You can specify who receives an email reporting the upload status when it is done through the API. The email is sent to the "notificationEmailAddress" that is passed in the API. The email may say something like this if there are errors during the upload:

Code Block
Validation occurred with errors. Users data NOT loaded. Refer to attached CSV data file for validation and/or loading result details.

...