retrieving fax entries with api: order & retention

Home Forums FaxFinder retrieving fax entries with api: order & retention

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #4657
    Peter Herbener
    Participant

    I want to use the API to retrieve sent fax status to log things in our workflow database. So far, it looks like I’m able to get what I need OK. I’m planning to query it periodically.

    It looks like the API returns more entries than the regular web pages do. How long are fax entries kept or how many are kept? It appears that they don’t get deleted when log entries are purged for the web interface. Or can I delete an entry after I’ve read and processed it?

    Also, it looks like they are returned in descending order of stime. Is that correct, and can I count on that? (If so, I can iterate through the list until I hit a time I’ve already seen.)

    #4659
    Victor Camacho
    Participant

    Hi Peter,

    I hope you do not mind me jumping in, it sounds like you are ahead of me in a similar project. I am pulling the status log to create fax reports that list all the recipients of a group fax and report the fax status in a single page.
    What I was planning on doing was to use the /faxkey call to start my request of faxes that I have not processed. Have you looked at this and did you run into any issues?

    Thanks for any input and I am interested to see answer about stime.

    #4660
    Victor Camacho
    Participant

    Peter & MultiTech,

    Ok, /faxkey is used to retrieve individual fax information. Makes sense since the call is “retrieving fax entries”. I thought it would be starting point.

    So I am in same situation as Peter. Since stime is the “End Time” of the fax transmission. I am going to process until I hit the last saved stime. {What is probability of 2 faxes ending at same time to the second. :)} And since these are the completed faxes because I have to increase my limit with the complete_limit flag. I should be ok processing based on stime.

    Peter, How are you getting the API to return more entries than the web pages? Are you using the complete_limit flag? Our test system is set to purge every 30 days and we are at 900 faxes for part of Aug and Sept. Just curios if I am missing something. I am going to try complete_limit at 60 and see how that works for us.

    Apologies again for jumping on this thread but I think we have similar problems and would like clarification.
    Thank you all.

    #4666

    Victor & Peter,

    stime is not the end time it is the start time.

    To the answer the question about why the API seems to return more entries than the web pages, it is because they are accessing the data differently. This will be addressed in our next major release.

    I believe is easier to build a queue of faxkeys to use to check the status rather than requesting the status of all faxes.

    Regards,
    Carol Almquist

    #4667
    Victor Camacho
    Participant

    Hi Carol,

    When I compare my retrieved data to the Outbound Fax Log, <created> matches the Start Time and <stime> matches the End Time. I want to include this information on our project so that the user knows what time their fax completed. I could not find any other field with this value.

    Regarding the building of a queue of faxkeys, are you suggesting that we start at a faxkey for example 0000087 and request until we get a not found error returned?
    I am writing my own confirmation page for the users to list status of faxes sent to groups on one page and maybe I am missing a better way to retrieve a list of faxes submitted?

    Thank you for your assistance,
    Victor Camacho

    #4668
    Peter Herbener
    Participant

    Victor: Yes, I’m using the complete_limit flag.

    I think Carol is suggesting using the API to schedule a fax with POST /ffws/v1/ofax. It looks like the response includes faxkey information, specifically the fax_entry_url. You’d need to capture that url in a list of faxes you want to go back and check on. A nice thing is that this would give you the potential to give some fairly detailed status to your users.

    I’m currently using the T.37 method to submit new outbound faxes because it’s so easy (smile). I probably ought to revisit that after I get .PDF generation working better.

    #4670
    Victor Camacho
    Participant

    Hi Peter,

    Thanks for the feedback. My problem is that I am not submitting the faxes and so I have no list of faxes sent.
    The problem I had to solve was that my client sends out a lot of group faxes and they have to keep the confirmation information with their legal documents. They did not want to attached 25 confirmation pages. Their old fax system gave them one confirmation page. So, I decided to write a “quick”:) program to poll the API and retrieve a list of faxes, stuff that into a database, group the entries and then e-mail a confirmation page. This also allowed me to solve another problem in that I could create a report to send to billing to bill for faxes.

    Thanks again for the heads up on the stime. Is this showing as the end time for you. Or am I retrieving something wrong?

    Lastly, you mentioned in your original question that the system returning more entries than the web pages? How are you seeing this? Is this because your log files were purged? And is that the reason for your question as to when the database on the server removes its entries. Just curious because I have not seen this yet, or don’t know that I have seen this.

    Thanks again for your help,
    Victor Camacho

    #4672
    Peter Herbener
    Participant

    Hi Victor,

    Yes, when I first received the FaxFinder, of course I wanted to do a little basic testing to make sure I could see it send and receive a few faxes. That was quite easy. When it was time to try to use the API to query it for status, I wanted to clear out my old data so I purged the log, but the API query still contained the old records.

    I’m still curious if the API call returns records in a defined sequence, or if it’s just coincidence that a new FaxFinder will return them in the order I’m seeing.

    I haven’t looked very hard to confirm what’s in the stime field. I’ll have to be careful with that. I’m already able to query the fax entries and iterate through the list, but it sounds like it might be safer for me to submit via API and save its return values. At this point, it’s a bit more work, though.

    #4678
    Victor Camacho
    Participant

    Hi Peter,

    Thanks for the feedback.
    So far my queries to the api have been returning the last sent fax and then progressing backwards. I am using c# to talk to the api and returning the information to a XDocument type collection and then parsing the collection. How the collection is ordering things I cannot say. I just walk through the xml tree to retrieve the data. And so far it is following this pattern. I just stepped through 50 entries and the results were consistent.

    I am starting to like what Carol had suggested. I may have to give it a try, I did not think of this because I did not know if there was going to be a sequential entry for the faxes.

    Thanks again for the feedback, I will post my results on my next test.
    Victor Camacho

    #4679
    Victor Camacho
    Participant

    Carol:
    1. Given that I do not have a list of sent faxes. Would the best way to traverse sent faxes, be to use the GET command with /faxkey until the GET command is not successful?

    2. Incrementally increasing the hexadecimal value of faxkey after each successful GET?

    3. Will there always be a faxkey even for failed and aborted faxes? It looks like this is the case for what I have seen from the data that I have extracted.

    Thank you for your help,
    Victor Camacho

    #4680
    Victor Camacho
    Participant

    Follow up to using faxkey.
    When I call using a faxkey that does not exist.
    GET http://10.1.0.25/ffws/v1/ofax/00001271?all_users=true

    I still get a <response>Success</response> and no entries.
    This works for me in that an exception is not thrown and I can process this with my current loop logic. I do not know what the HTTP response code is because I am using C# webclient and from what I can tell, you cannot retrieve the HTTP Response Status code. (as of this date that I can find.) I may switch to a different method later but I need to get this working.

    #4718
    Victor Camacho
    Participant

    Another follow up:
    Ran into an issue where I was getting status “sending” and “pending”.
    So I changed
    GET http://10.1.0.25/ffws/v1/ofax/00001271?all_users=true
    to
    GET http://10.1.0.25/ffws/v1/ofax/00001271?all_users=true&complete

    And this returns faxes that are still labeled sending. I am not sure what is meant by completed, but I had to add more logic to compensate.

    MultiTech – Any feedback on this?

    Also, in reference to faxes available specifying the above command. I discovered that not all old faxes are available to me. I assume that this is because I had set the Fax Log Purge to purge entries older than 30 days at the first of the month. But on 10/7 my list started on 9/25. I am not concerned with this I am just putting it out there in case it helps someone else.

    #4719

    Victor,

    The documentation is missing the parameter name. It is class and it has three options: pending, sending and complete. The API call should look like this.

    GET http://10.1.0.25/ffws/v1/ofax/00001271?all_users=true&class=complete

    There is an issue with the data returned after logs have been purged. We hope the have this fixed in our next release.

    Regards,
    Carol

    #4720
    Victor Camacho
    Participant

    Hi Carol,

    Thank you for the correction on the api call.

    And thank you for the information on the logs. Like I said, it did not really cause me any issues.

    Take care,
    Victor

    #4721
    Victor Camacho
    Participant

    Hi again Carol,

    Just ran a test with the change class=complete and received 2 pending faxes in the list.
    Using Version 1.3.9

    Just letting you know.
    Thank you,
    Victor

    #4736
    Victor Camacho
    Participant

    Another note regarding my system to send confirmation pages with all recipients on a single page. I am requesting the status of a fax sequentially until I run out of information in the reply or run across a state of pending or sending.
    Today I found out that if a user resends a fax. The original fax entry is used for the resend.
    Two ways to look at this. If you modify the original then you have a full history of the fax. But the report did not show when you started the resend. So the date and time the fax is resent, is lost. (Actually the resend is in the details->call entries details, but this is not in any of the reports) The Outbound fax log shows the original start time.
    One could also look at the failure as a completed transaction The first attempt failed. And then the resend is a new transaction, because the user had to interact and push resend. The resend would be given a new faxkey number and a new start time. This was what I assumed was happening and I was not correct.
    Just posting to let others know. Time to write more code.

Viewing 16 posts - 1 through 16 (of 16 total)
  • The forum ‘FaxFinder’ is closed to new topics and replies.