yuuvis® API Intro Guide

Your blueprint to creating customized document management solutions quickly.

First things first

  1. To get started with using the yuuvis API® you will need to add something to your instance. For this we will use the Postman App. If you don't have Postman already installed, you can download it here https://www.getpostman.com/downloads/
  2. Head over to our GitHub page https://github.com/yuuvis/Postman; Fork it and clone it, or simply download the Zip file.
  3. Open Postman and select File | Import to import the repository into your Postman Collection (1).

    figure 1

  4. To make things easier for yourself, you should set up an environment. Select Manage Environments (2) from the settings icon in the top right corner. From there you can name your Managed Environment and add your variables and the values for each (3). Click the Add button to confirm.
    figure 2
    figure 3

  5. Now we will set up a multipart POST request, which used for transferring various types of data; this will send over your content body and your metadata body in a single request. Select the "Store one or more documents (POST)" - Post-Object - request. To upload a document, first create two files: Xxx.json (e.g. metadata.json) and content file on your local machine.
    The file for the metadata MUST be a JSON file with the suffix ".json", but the other file can be ANY type of file. In the JSON file, enter the following:

    { 
       "objects":[ 
          { 
             "properties":{ 
                "enaio:objectTypeId":{ 
                   "value":"document"
                },
                "Name":{ 
                   "value":"my document"
                }
             },
             "contentStreams":[ 
                { 
                   "cid":"cid_63apple"
                }
             ]
          }
       ]
    }
  6. Setup your request body with your metadata.json file and your content file (5).

    • "data" : "select your metadata.json file"
    • "cid_63apple" : "select your content file"

    cid_63apple is the content ID ("cid": "cid_63apple") in the contentStreams part of the metadata. This content ID appears again below in the multipart request body and represents the content.

    figure 5

  7. Finally, click the Send button. You should receive a 200 response and see a response JSON payload similar to the following response data in JSON format. It is directly related to the metadata file that you imported with each object. The "enaio: objectId" is the ID that will be associated with the recently stored object and you can use it for future uses.

    { 
       "objects":[ 
          { 
             "properties":{ 
                "enaio:objectId":{ 
                   "value":"8ea46fdd-9aeb-40ff-b6af-6611647db38c"
                },
                "enaio:baseTypeId":{ 
                   "value":"enaio:document"
                },
                "enaio:objectTypeId":{ 
                   "value":"document"
                },
                "enaio:secondaryObjectTypeIds":{ 
                   "value":[ 
                      "enaio:rmDestructionRetention"
                   ]
                },
                "enaio:createdBy":{ 
                   "value":"5d13335ff761b91aecbc4322"
                },
                "enaio:creationDate":{ 
                   "value":"2019-07-10T05:17:36.540Z"
                },
                "enaio:lastModifiedBy":{ 
                   "value":"5d13335ff761b91aecbc4322"
                },
                "enaio:lastModificationDate":{ 
                   "value":"2019-07-10T05:17:36.540Z"
                },
                "enaio:versionNumber":{ 
                   "value":1
                },
                "enaio:tenant":{ 
                   "value":"1"
                },
                "enaio:traceId":{ 
                   "value":"104f28d8483cfa2b"
                },
                "Name":{ 
                   "value":"my document"
                }
             },
             "contentStreams":[ 
                { 
                   "contentStreamId":"3D225275-9DB9-11E9-803D-1D9F613675A9",
                   "archivePath":"1/2019/07/10/",
                   "length":734357,
                   "mimeType":"image/jpg",
                   "fileName":"tree.jpg",
                   "digest":"49887595AAB9A5CF001109D6DB4C3883D65B173E4BD1EE1CCB96550770BBFBA6",
                   "repositoryId":"s3miniowithpath"
                }
             ]
          }
       ]
    }
    
  8. Now that you have sent your first multipart body POST request item to the yuuvis® API, you can try a GET (e.g. 'Get document content by ID' endpoint) on something you have posted. (6)

    figure 6

  9. Use your "enaio:objectId" from the response data value (see point 7) to make the GET request for your content. This is the id value for the document that you added to your instance. (7)

    figure 7

  10. When you are ready, click the Send button and you will receive a 200 OK response status as well as the response content you searched for. (8) Congrats!!!

    figure 8


Now that you've successfully created your first document object inside of yuuvis®, and tested it in the yuuvis® developer's portal, you should be ready to jump into testing the other available endpoints. Just like the above example, you'll find plenty of query information to help you along.

If you get stuck

Email: support@yuuvis.com