API using excel

Provide a screenshot of the authentication prompt

Screenshot 2021-12-04 174228
This is coming after

Providing Credentials

Unfortunately, the API authentication doesn’t work with the desktop version because a password is required for security reasons.

Try connecting with the key without the cookie as a last resort, but I am not sure if it will work.

But i am using Server Edition.

you can. see below post.

1 Like

Sorry, I’ve seen the local host address and I jumped to the conclusion that it’s the Desktop Edition.

But why are you accessing directly from the server?

I put username and password and Http:/127.0.0.1:8080/api abf error scren shows

This:

Http:/127.0.0.1:8080/api

First, what happened to the “S” in https?

Second, are you physically using the server or are connected to the server from another computer?

Used

I am physically using

What you should do then is test whether the api page is accessible directly from the browser.

I have followed the guides provided here but I cannot extract meaningful data. for example I am trying to pull the trial balance data but I can only see headings

Reports are not yet supported using the API. You can only draw report definitions.

You will never get meaningful data form “Trial Balance” since API will return only the settings underling the report and not data of the report, ie settings you put in trial balance form.

Thank you for your response. What data can I access via Manager API, in its current state?

You can access all tabs, report definitions and most settings.

However, using the API setup to retrieve a long list of transactions isn’t recommended since it’s going to be very slow and inefficient. So it’s better be reserved for use with master records like: employees, customers, payslip items … etc.

There are alternative methods to obtain transactional methods like this one:

This is a much faster and more efficient method to retrieve the full transaction list

To do that you can use the following code:

let
    _getGuiJson = (URL as text, Business as text, #"Tab View" as text) => 
        let 
            guiURL = URL & 
                (if #"Tab View" <> null then "/" & #"Tab View" else "") & ".json?FileID=" &
                (if Business <> null then Business else ""),

            webResponse = Web.Contents(guiURL),
            jsonResponse = try Json.Document(webResponse) otherwise null
        in
            if jsonResponse <> null then
                Table.FromRecords(jsonResponse)
            else
                error "Unexpected result. Wrong URL?",

    GetGuiJson = _getGuiJson

in
    GetGuiJson