Aperture REST API calls as Datasets within Aperture

2»

Answers

  • Henry Simms
    Henry Simms Administrator

    OK @Mahulima , it sounds like you want a "list views" endpoint (similar to e.g. "list datasets") but this isn't part of the API currently so there's no way to extract the data you're after. If you add this to the Ideas board the Product team will review and comment.

  • Thanks for all the instructions in this thread, really useful to get things going.

    Am I right in saying that currently, there is no File Size data in the dataset endpoints? I think the best approximation with the current setup is number of columns times the number of rows in all batches?

    If there is potential for this data to be added to a dataset endpoint, please consider this my upvote! 😂

  • Dan Mason
    Dan Mason Experian Contributor

    Hi @Mike Pearson

    You are right in saying that there is not currently a way to pull through the File Size data from the dataset endpoints, but there is a workaround you could try:

    You can run a command prompt which lists the dataset folders on the D drive by size:

    This output can be saved and uploaded as a flat file to Data Studio:

    You can then join to the endpoints in your workflow by UUID (at the end of the filepath).

    There may be a better way, but for now at least this would provide you with the File Size.

    Command prompt example:

    powershell -command "$fso = new-object -com Scripting.FileSystemObject; gci -Directory | select @{l='Size'; e={$fso.GetFolder($_.FullName).Size}},FullName | sort Size -Descending | ft @{l='Size [MB]'; e={'{0:N2}    ' -f ($_.Size / 1MB)}},FullName"

    Hope this helps!

  • Mike Pearson
    Mike Pearson Member
    edited June 14

    Afternoon all,

    Just updated to 2.14.5 and spotted there are some new Workflow, Function and View API calls to play with.

    Managed to get the workflow lists to work by adding the below to our REST config file, but can't get the other two working via this method. Also getting unauthorised on both in Swagger though I believe the API key has it covered.

    "workflows":{

    	"#path":[
    		"/api/1/workflows /workflows"
    	],
    	"id":"Integer",
    	"uuid":"VarChar(256)",
    	"name":"VarChar(256)",
    	"summary":"VarChar(256)",
    	"description":"VarChar(256)",
    	"externalLabel":"VarChar(256)",
    	"spaceId":"Integer",
    	"spaceName":"VarChar(256)",
    	"status":"VarChar(256)",
    	"modified":"Timestamp(0)",
    	"isShared":"VarChar(8)",
    	"isReusable":"VarChar(8)",
    	"type":"VarChar(256)"
    },
    

    @Henry Simms - do you happen to have an updated REST config file since the one posted in here previously you could share?

    Edit: apologies for the horrible formatting of the code!

  • Henry Simms
    Henry Simms Administrator

    Hi @Mike Pearson - I see the same behaviour as you where the new "Function Operations" and "View Operations" API calls appear to return 401 Unauthorized response for a valid API token, so I've raised with our engineering team to take a look at.

    Once we have this figured out I'll aim to put together and publish an updated .rest file including all the new list endpoints

  • Ian Hayden
    Ian Hayden Experian Super Contributor

    Hi @Mike Pearson. These new endpoints are still in development but due very soon, and although they are exposed in the swagger page (not sure whether that was accidental or unavoidable) they are currently unusable.

    We're working hard to get these completed as soon as we can so please keep an eye on the release notes for the next few releases.

    Regards,

    Ian

  • Thanks both for the info. I've just spotted Dependency in the models too…. is there hope that essentially Associations is coming to the API too?

  • Ian Hayden
    Ian Hayden Experian Super Contributor

    @Mike Pearson It might be, couldn't possibly comment ;-)

  • Henry Simms
    Henry Simms Administrator
    edited November 6

    I've updated the .rest config file in the original answer (datastudio_api..rest.txt) to include the following new(ish) API endpoints:

    • List Functions
    • List Views
    • List External Systems
    • List Credentials (for a given External Systems)

    I've also added the ability to retrieve ObjectTags from the List Datasets call. This metadata is mapped to a new table "DATASETS_OBJECTTAGS".

  • @Henry Simms Good afternoon, is there a provision to retrieve usage data of Aperture objects? We are trying to build a report that shows how many times tables, views and charts are been viewed/downloaded.

  • Josh Boxer
    Josh Boxer Administrator
    edited November 13

    The audit report tracks and data downloads and object edits/updates, but not pageviews if nothing was changed

    https://docs.experianaperture.io/data-quality/aperture-data-studio-v2/monitor-data-and-troubleshoot/create-audit-reports/

  • @Josh Boxer Thanks for the reply. However, I cannot find the option to create the reports and I'm at the admin level. Is there another setting to enable it?

  • Josh Boxer
    Josh Boxer Administrator
  • @Josh Boxer Thanks. Also, is there an endpoint that report on the number of objects created on each space i.e. number of workflows, dashboards?.

  • Josh Boxer
    Josh Boxer Administrator

    Audit info is available via API. There is List exportable objects in a Space and/or the individual List objects APIs.

  • Henry Simms
    Henry Simms Administrator

    I've just updated the .rest config file in the original answer (datastudio_api.rest.txt) to include some additional dataset properties that did not exist when I first created the /datasets mapping:

    These extra values will now be pulled into the DATASETS table:

    If you've already loaded a DATASETS table using the previous mapping file, after deploying this new .rest file you'll be asked to reconfigure the dataset if you want to include the new columns:

  • @Henry Simms we noticed that the Functions List API call doesn't pull back the Description. Is this an oversight or am I missing a trick? Thanks

  • Henry Simms
    Henry Simms Administrator

    Hi @Mike Pearson , looks like you're right, the Function Description values are not returned by the API. Here's a function I've created:

    And here's the API response for it (both Summary and Description missing):

    Summary is actually returned for the native functions (which don't have descriptions).

    Function Category is another element I'd expect to be returned.

    This isn't consistent with other "list" functions like GET /datasets which do include Summary and Description:

    I'll raise this with the team to take a look.