Community

API does not seem to be able to detect projects Answered

I am trying to open a project using the OpenProject api method. I'm using SoapUI to test.

No matter what I put for projectNameOrGuid, I always get a result of 0.

Also, when I try the GetProjects api method, it returns an empty result.

I am connecting to a server running FC12 Distributed with one project uploaded to the server.

I am able to upload documents to the project using the full scanning station application, and I see the documents in the monitoring console.

I'm not sure what other information is needed to troubleshoot this.

Was this article helpful?

1 out of 1 found this helpful

Comments

6 comments

  • Avatar
    Alexey Efremov

    Hello,

    First, are you sure you have opened the session before using any methods? For example see the article:

    Application Programming Interface (API) > Using the Web Services API of the ABBYY FlexiCapture Application Server > Scanning documents

    of the Developer's Help file.

    Second, please check that you are using the correct Project Id (Guid). You can see your project Id in the Administration and monitoring console > Settings > Projects

    If this is not the case here, please provide us Fiddler logs during the time when the issue happens.

    Also please let us know your FC12 exact version. (Project Setup Station > Help > About)

    Yours sincerely,

    Alexey

     

     

     

     

    0
  • Avatar
    Yehuda Goldenberg

    I got past this issue with the help of an Abbyy engineer.

    In the end what seems to have made the difference was selecting the correct role when opening the session.

    I tested all of the roles using the GetProjectsForUser api call. Here are the results:

     

     

     

    However, I still am not able to successfully do the next step in the documentation you mentioned (AddNewBatch). I'm going to open a new discussion for this and provide more details.

    0
  • Avatar
    Yehuda Goldenberg
    0
  • Avatar
    Timo Neff

    Hello Yehuda,

    Can you describe the solution a bit more detailed?

    I am facing the same error: After successfully opening a session (role type: 12, station type: 10) I can not open a project.

    My workaround to look up the project id in the Monitoring Station and provide it upfront when adding a new batch.

    However, I would like to keep it more generic by automatically retrieving the project id for a project name.

    Thank you,

    Timo

    0
  • Avatar
    Yehuda Goldenberg

    Hi Timo,

    We ended up using role type: 11, station type: 10.

    Then we were able to open the project by name.

    Also check to make sure the user has the necessary permissions at the project level.

    0
  • Avatar
    Lukas Schneider

    Hi Timo,

    following background applies for the OpenProject Method :

     OpenProject call in FC12 is necessary only for cases when session is opened under user role that has permissions for one or another queue of user-interactive stages (data verification, verification, exceptions etc.). So, it is used in scenarios when you need to get a processing task from a queue. For "external user" role this method should not be called since it always returns zero. 

    Under external user you can just call GetProjects(), then iterate the obtained collection to find the desired project and then pass its Id to AddNewBatch call (or whatever you were going to do) instead of Id that OpenProject would return.


     

    In this case its up to you to use either a other role or use GetProjects() with the external user role

     

    Yours sincerely,

     

    Lukas

    0

Please sign in to leave a comment.