See below for what is required to begin using the API or what information to provide to the team developing any integrations using the API.
Create an API User
You first need to set up an API user and configure it for access to the API.
API Users and JWT
Momentus Enterprise uses API Users. These are dedicated users for API access. We recommend one API User per app calling the API. To add an API user:
- Click the API Users link from the Main Menu. The API Users screen opens.
- Click the Add button. The Add API User screen opens.
- Enter the necessary information. You can use the default information or you can see API Users for more information on the available fields.
- Click OK.
Access the API Help
We recommend using your Test system to access the API help page. To access the API help page. click the API Help link from the Main Menu. A new internet tab will open with the API help page. You can browse around or you can begin interacting by adding authorization using the Add Authorization button in the top right.
Only use the TEST API help URL from your test environment for sample calls. Using the API Help page creates data within the environment it is attached to.
Explore the API
Click here for more information about the API help page.
Make Your First API Call
Click here to learn how to make your first API call.
Getting Technical
Click here to begin using the API’s various search options and parameters using OData.
Other Useful Articles
Click here to view the other various features and articles for the API.
Comments
21 comments
We have two v20 websites connected to the one production database - UBPROD and UBPRODAUTH.
UBPROD is configured with Windows Authentication and UBPRODAUTH with Ungerboeck Authentication.
I can use the API's through the Swagger interface when logged into UBPRODAUTH with USI_API user.
When I try to access the sdk_initialize API on UBPRODAUTH (Ungerboeck Authentication) - through Postman or a C# client - I am always challenged with the Ungerboeck Sign In page.
When I try to access the sdk_initialize API on UBPROD (Windows Authentication) - through Postman or a C# client - it always returns 401 Unauthorised.
I can log into SQL and Ungerboeck with the same USI_API credentials.
0 upvotes
Hey Phil, is anonymous authentication enabled for the site in IIS?
Even if you've missed the auth heading or got the base64 encoding wrong, you should still get a response back like;
0 upvotes
Thanks for your response Lee.
Both websites have Mixed-Mode Authentication in IIS.
UBPROD has Anonymous and Windows (401 Challenge) enabled, while UBPRODAUTH has Anonymous & Forms (SignIn.aspx) enabled.
Anonymous Authentication is set to use IUSR and I've checked that user has been granted permissions on the Windows folders.
When testing the API on UBPROD we get the 401 Challenge and when testing the API on UBPRODAUTH we get the SignIn.aspx page.
0 upvotes
Hi Phil,
The Ungerboeck API doesn't support Windows Authentication, but your Ungerboeck Authentication site should work fine.
Could you paste the exact URL you are using to access the API? You don't need to paste any headers and can leave out the domain if you wish.
A bit of behind the scenes to explain what's probably happening: Ungerboeck uses the <location path="x"> areas of the web.config in your server files to determine if the direct URL should be allowed, or if it should be denied and returned to the sign in page. Without knowing more, my guess is either your URL isn't correct, or the web.config is customized and maybe missing a key element.
Rudy
0 upvotes
Thanks for your reply Rudy.
I have added the following to the web.config
<location path="api/v1/sdk_initialize">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
and I am now able to retrieve the token.
However any subsequent API calls - e.g. api/v1/events/12/34567 - will still be challenged with the Ungerboeck Sign In page.
Should I allow all users to access path "api/v1"?
0 upvotes
Hi Phil,
Yes, that would be the way to go. It's typically part of the standard web.config on installation.
You'll also need the following entries for our API Help page:
<location path="swagger">
<location path="api/help">
<location path="UPI/CustomContent">
0 upvotes
Thanks again Rudy!
0 upvotes
Is there a way to update the RelationshipType on a Relationship using the PUT method of the endpoint
I am getting the following error message
Relationship 'RelationshipType' value in request body does not match URI parameter
0 upvotes
Hi Phil,
Since RelationshipType is used to identify the relationship entry, there is no way to change it. You will have to remove the entry and add a new one.
0 upvotes
I am trying to start a new solution in VS2017 and when loading the SDK and API packages through NuGet and I am receiving the message:
Could not install package 'Ungerboeck2096SDK 20.96.2.7'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
Dear package author,
Which Framework should I be targeting with the current SDK?
0 upvotes
Hi Package User!
The SDK was built with .NET Framework 4.7.2. You can do a few things to help this, starting with changing the application's framework. Make sure to clear the Nuget cache inside visual studio as well (Tools->Nuget Package Manager->Settings->General->Clear Cache
0 upvotes
Thanks Rudy. Got that set and the .96 SDK and wrapper referenced.
Will you be putting Ungerboeck.Integrations.dll in either Git or Nuget?
As I no longer have an up to date onprem install to get it from. I have downloaded 20.96E Latest browser .zip and extracted it from there for now, but I guess the day is not far off where we are all hosted and they aren't available for download any more.
0 upvotes
Hi Steve,
The Ungerboeck.Integrations.dll was primarily used for webhooks, which is given under Ungerboeck.Webhooks. Was there a use beyond this you needed it for?
0 upvotes
No. That was all. For some reason when I searched Nuget for Ungerboeck, I didn't see .Webhooks.
Still 1.0.0 version, so I don't need to update. Thx
0 upvotes
Hi, I'm just doing some initial testing and I can run queries OK via <our url> api/help/ web page using my own credentials, but when I try to run my python code (using same credentials) I get
{"Message":"Authorization has been denied for this request."}
Is that a sign there's something not right with my code, or could it be that my user account is not be able to access the API ?
I seem to be able to receive a Token ok, but also I notice my code sends the token in percent-encoded form, does that look ok?
(I'm reusing some existing python code that does work ok, just not sure why it doesn't work with my creds)
received token = DQKdszMbKVCrPgvyrIncOfUm1efnBLeg6CvH6JDGry4lDQPjqjwt1o2oPBCZmyeXciLl9tGLKLH9E/jXQ0EWn4eIraqc7CQp8Hq9ZYroa1n/OB9ghUXzstkrZZscCyC5MqZKWtazVFCXeIIYf0xnEg==
response.url=
https://URL/api/v1/Functions/10/58529/8?TOKEN=DQKdszMbKVCrPgvyrIncOfUm1efnBLeg6CvH6JDGry4lDQPjqjwt1o2oPBCZmyeXciLl9tGLKLH9E%2FjXQ0EWn4eIraqc7CQp8Hq9ZYroa1n%2FOB9ghUXzstkrZZscCyC5MqZKWtazVFCXeIIYf0xnEg%3D%3D
0 upvotes
I could be wrong, but I believe the token has to be in the header, not the URL. Only the parameters go in the URL. If the token is in the header, it won't get % encoded.
That's what I've been doing and it works.
0 upvotes
Ah ha ! I had to add 'headers=' to my get request and now it's working! Thanks Steve for making me check the header was right ! -
I was using r = requests.get(url, headers)
Not
r = requests.get(url, headers=headers)
This works.
0 upvotes
Hi
How can we create users for the API within Ungerboeck?
Is there any documentation on this?
Thanks
Kris
0 upvotes
Hi Kris,
Not sure if you're referring to the new authentication mechanism for the API. If so, documentation will be available in the next 1-2 weeks within the same section of the Support Center.
If not, if possible, I would still try to hold out for that documentation as this will be the way forward with API authentication.
0 upvotes
Is there a document that describes the object models and entity relationship?
e.g. In InvoiceDetails what is the difference between UnitCharge, ExtendedCharge, TriangulationCurrencyUnitCharge, TriangulationCurrencyExtendedCharge, FCExtendedCharge, etc...?
e.g. How do Invoices relate to Events, Accounts, GLAccounts & JournalEntryDetails, etc?
1 upvotes
Not really- just the data model you can access via the main menu.
Last I checked, it has useful descriptions for some columns and notes of joins to other tables, but not much more than that.
0 upvotes
Please sign in to leave a comment.