Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
Found this content helpful? Log in or sign up to leave a like!
Hello, I am attempting to warehouse the web_logs table from CD2. I see it in the documentation, however I don't see it when I pull a list of available tables using GEThttps://api-gateway.instructure.com/dap/query/canvas/table. the following is the list I see. I tried to also individually query web_logs, it says the table is not recognized. How can I get our web_logs using CD2?
Solved! Go to Solution.
Web logs are a different space to tables.
Try GEThttps://api-gateway.instructure.com/dap/query/canvas_logs/table
(and use the canvas_logs rather than just canvas in the other queries as well)
Web logs are a different space to tables.
Try GEThttps://api-gateway.instructure.com/dap/query/canvas_logs/table
(and use the canvas_logs rather than just canvas in the other queries as well)
Great! I was just about to ask this exact question. The documentation isn't very clear.
Mine's never worked at all, timing out each time I attempt an initdb. I've got a case open on it (case # 10287191). Here is the latest comment from Instructure on it:
"Currently to resolve this issue it is requiring an overhaul to our CLI tool. Currently our Engineering team are working on this overhaul but we do not have a timeline for when this will be released at this time."
I've seen some able to get the canvas_logs.web_logs and I'd like to know how it's happening for them.
Thank you for putting in the case number, @reynlds We will be following this case as we work through all instructions, feedback, and help to ensure we are following proper processes in order to get web_logs to work.
Thank you again,
Sharon Austin
By not using the CLI.
If the API calls are used directly, and timeouts and key refresh handled, as well as fetching all the resultant data sets, there is no issue fetching the data.
The CLI tool may be convenient, but it is not really something that is compatible with a true Enterprise grade installation - any database schema changes and the like really need to be managed via appropriate change and release control processes, with associated testing. All of this comes with considerable overhead, but can be considerably more robust (and tailored with respect to control).
That said, whilst fetching web_logs is quite possible (I have no issues doing so when required), there is far too much data for us to be bothered - and we don't really want to store it.
Hi, I'm wondering if the web_logs only retain 30 days of data and if there's a way to access the archived logs.
@guo848 Only 30 days are available via DAP. (https://data-access-platform-api.s3.amazonaws.com/tables/catalog.html#tables-in-canvas-logs) You could contact your CSM to see if they are retained somewhere at Instructure, but I wouldn't hold my breath.
We have the data past 30 days, we don't delete it. The reason we don't publish it is because it is expensive to serve such amount of data and up until now customers were not prepared to get TBs of data. We also have mobile logs as well. Custom development team can help you get the historical log data. You can reach them through your CSM.
Regarding the documentation portal @mclark19 has linked, that is a legacy documentation portal. The new is available here: https://developerdocs.instructure.com/services/dap/dataset/dataset-namespaces/dataset-canvaslogs Please update your bookmarks while I make sure to set redirects to the old documentation pages.
Thanks @sgergely -- Is there a plan to make mobile log data available via DAP at some point in the future?
Yes, it is on our roadmap. However I cannot share any timeline for it yet.
The Web_logs table contains all data, but you can only retrieve up to 30 days of data in a single run. To access historical data, you must use the "since" and "until" parameters, ensuring the time between the two dates does not exceed 30 days. For example, if you need data for one year, you would need to perform multiple queries, each covering a 30-day period. If you need data for a specific period that is less than 30 days, you can simply adjust the "since" and "until" timestamps to retrieve the required data.
Please note that it is an undocumented DAP Query API feature and can break at any time.
If using the dap client, it's done using the --namespace parameter, e.g.
dap schema --table web_logs --namespace canvas_logs
Good luck...still broken as of today:
dap.integration.database_errors.NonExistingTableError: table `web_logs` does not exist in schema `canvas_logs`
...even though I can:
$ dap list --namespace canvas_logs
user_agents
web_logs
I would love to see a way to list the namespaces. Then we could loop through the tables in each namespace and never miss anything.
select schema_name
from information_schema.schemata;
Output:
('pg_catalog',)
('information_schema',)
('public',)
('canvas',)
('canvas_logs',)
You won't use everything, but you can export anything that is (or starts with) "canvas". After that you can get a table list based on each individual namespace. Probably overkill though since Instructure tells us specifically that only "canvas" and "canvas_logs" will be in play.
Thanks! I was thinking more of a list of namespaces from the API, though. Just like you can hit the endpoint /dap/query/canvas/table it would be cool if there was one like /dap/query/canvas/namespace
Jason
This conversation is much appreciated, I have been trying to access web_logs without success. When using the query above, I don't get canvas_logs in my output (screenshot attached) -- would you have any insights on this? Thank you so much!
You don't have the "canvas" or the "canvas_logs" schema. Have you been able to successfully retrieve any of the cd2 tables?
Jason
Good afternoon @J-J-Jason and thank you so much for that insight! I saw your response, and immediately tried to find "any" query examples that would return information from "any" valid tables. It took me a few days to do this, so please accept my apologies for the delay in response. Yes, I finally was able to extract information from "enrollments".
That said, I don't believe we are fully set up yet. To that end, I (and our team) will continue to set up for Canvas Data 2, especially as outlined here: https://community.canvaslms.com/t5/Admin-Guide/What-is-Canvas-Data-2/ta-p/560956#canvas-data-2
I'll continue to work on this, but if you have any further recommended help-pages for information access the "canvas" or "canvas_logs" schema, it would be greatly appreciated.
Thank you SO much!
Sharon Austin
Good morning. We have found out that we do not have web_logs because we subscribed to the service: Managed Teaching and Learning. We found that to have access to web_logs, we would need to switch to Managed Canvas Data offering and there would be a need to switch the database from a postgres database to a Redshift instance.
To participate in the Instructure Community, you need to sign up or log in:
Sign In