Hello,
I found a great document (by researching this Community) that summarizes the process for uploading a document via the RESTful API here:
Great stuff! I got started with Postman to test things out. Our IFS environment is APPS10, Update 9.
I used Basic Authentication (App Owner credentials) and that stopped the authentication errors I was getting. Then I provided the following JSON as POST data to the CreateDocument entry point (<host>:<port>/int/ifsapplications/projection/v1/CreateAndImportDocument.svc/CreateDocument):
{
 "DocClass": "MAINT",
 "DocNo": null,
 "DocSheet": null,
 "DocRev": null,
 "Title": "Test Document",
 "BookingList": null,
 "Id1": null,
 "Id2": null,
 "CreateFileRef": "YES"
}
The above is straight from the example document linked at the top of this post, with DocClass changed to a valid class for our environment. That got me further along, but an error response came through:
{
  "error": {
    "code": "DATABASE_ERROR",
    "message": "Database error occurred. Contact administrator.",
    "details": >
      {
        "code": 20110,
        "message": "ORA-20110: DocIssue.DOCMANDXTOWNERMAN: The logged in User should be connected to a Person registered in the system."
      }
    ]
  }
}
I figured it didn’t like me using the IFS App Owner, so I logged in as myself. Still got an error, that now looked like:
{
  "error": {
    "code": "DATABASE_ERROR",
    "message": "Database error occurred. Contact administrator.",
    "details": t
      {
        "code": 20124,
        "message": "ORA-20124: Error.NULLVALUE: Field FILE_TYPE] is mandatory for EDM File and requires a value."
      }
    ]
  }
}
Looks like progress! OK, so I added FileType (of "PDF") to the POSTed JSON. Still errors out, now with a response that goes all the way back to:
{
  "error": {
    "code": "ODP_DESERIALIZATION_ERROR",
    "message": "Error while de-serializing contents."
  }
}
The document says I should have received a response indicating a successful document creation so I can proceed with the next steps. Can anyone tell me what I am doing wrong? I am very glad to have discovered such a straightforward way of adding a document (with basic authentication), but I can’t get it to work. Any help would be greatly appreciated!
Â
Thanks,
JoeK