Latest post Mon, Aug 3 2020 2:03 PM by rens van der Zwan. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • Sun, Jun 28 2020 9:52 PM

    • jamieparry
    • Not Ranked
    • Joined on Wed, Jan 20 2010
    • Posts 4
    • Points 70

    reading available nexis workspaces

    very basic request here

    i want to make a commandline tool in python that just lists all our current nexis workspaces

    what would be the api call to do that please?

    i tried to follow the guidelines in the docs but didn't get very far i'm afraid.

    I'm used to making api calls on the baselight and from web services (that i've written in flask) but so far i haven't fully "got" what i need to do with nexis (ie what users are allowed to do what etc etc)

    all i want is a list though so surely i don't need massive root rights for just that?

    i have access through the nexis client manager so i know i can list things that way but, y'know..workflow yadda yadda..

    :-)

    any guidance would be very much appreciated. thankyou

    jamie

  • Mon, Aug 3 2020 2:03 PM In reply to

    Re: reading available nexis workspaces

    Not sure about Python, but this is what you need to do:

     

    The Nexis API is a REST service. First you need to use a login call to https://<nexis-host>/api/login . This gives you a token. With the token you can call https://<nexis-host>/api/workspaces. This gives you a list of all the workspaces and a large list of metadata to choose from.

    You might want to start with a tool like Postman. Its a direct way of testing the Nexis API. 

    I am fairly certain you need a administrator account to make a succesfull call to workspaces. You get a "Unable to complete operation. Protected." response if not.

    Example of the response (with only two workpace):

    {

        "workspace": [

            {

                "outID": "18968575579267",

                "ioName": "Workspace Name 1",

                "ioDescription": "",

                "outStorageGroupName": "storage group1",

                "ioStorageGroupID": "65537",

                "outSubGroupName": "Default",

                "ioSubGroupID": "0",

                "ioByteCount": "4000000000000",

                "outDeletePending": "0",

                "outUsedByteCount": "1793450558984",

                "outPercentUsed": "4483",

                "outPercentUsedString": "44.83%",

                "outReservedByteCount": "4000000000000",

                "outAvailableByteCount": "2206549441016",

                "outAllocatedByteCount": "2261255192576",

                "outFileCount": "19581",

                "outDirectoryCount": "89",

                "outDirInfoControls": "0",

                "outStatusString": "",

                "outConfigChanges": "5",

                "outStatus": "0",

                "outMinimumByteCount": "1793450558984",

                "outMaximumByteCount": "310784491381760",

                "outCnfgChunkSizePO2": "22",

                "ioProtectionMode": "1",

                "ioProtectionModeLocal": "4",

                "outSupportedProtectionMode": "1",

                "outPerformance": "1"

            },

            {

                "outID": "19241453456208",

                "ioName": "Workspace Name 2",

                "ioDescription": "",

                "outStorageGroupName": "storage group1",

                "ioStorageGroupID": "65537",

                "outSubGroupName": "Default",

                "ioSubGroupID": "0",

                "ioByteCount": "19000000000000",

                "outDeletePending": "0",

                "outUsedByteCount": "9851224613557",

                "outPercentUsed": "5184",

                "outPercentUsedString": "51.84%",

                "outReservedByteCount": "19000000000000",

                "outAvailableByteCount": "9148775386443",

                "outAllocatedByteCount": "12343723425792",

                "outFileCount": "27307",

                "outDirectoryCount": "303",

                "outDirInfoControls": "0",

                "outStatusString": "",

                "outConfigChanges": "5",

                "outStatus": "0",

                "outMinimumByteCount": "9851224613557",

                "outMaximumByteCount": "325784491381760",

                "outCnfgChunkSizePO2": "22",

                "ioProtectionMode": "1",

                "ioProtectionModeLocal": "4",

                "outSupportedProtectionMode": "1",

                "outPerformance": "1"

            }

    ]

    }

Page 1 of 1 (2 items)

© Copyright 2011 Avid Technology, Inc.  Terms of Use |  Privacy Policy |  Site Map |  Find a Reseller