You can use the as_of_time attribute in the mql envelope to get data that was present at a specific time.
this query:
{
"q1" : {
"as_of_time" : "2007-01-09T22:00:56.0000Z",
"query" : [
{
"domain" : "/architecture",
"id" : null,
"return" : "count",
"timestamp" : null,
"type" : "/type/type"
}
]
}
}returns 12 (there were 12 types in the /architecture domain last january).
{
"q1": {
"code": "/api/status/ok",
"result": [
12
]
},
"status": "200 OK",
"code": "/api/status/ok"
}this query (no as_of_time attribute):
{
"q1" : {
"query" : [
{
"domain" : "/architecture",
"id" : null,
"return" : "count",
"timestamp" : null,
"type" : "/type/type"
}
]
}
} returns the current number of types in the architecture domain:
{
"q1": {
"code": "/api/status/ok",
"result": [
25
]
},
"status": "200 OK",
"code": "/api/status/ok"
}This example was extracted from a response on the developers@freebase mailing list.
One interesting use of this feature is to create a kind of trust authority application. Establish your own trusted view of topics by store the timestamp of a known good version. Then query to get the trusted version.
More information on as_of_time and other envelope parameters can be found in section 4.2.4 of the Complete MQL Reference Guide.
Search Help Center
Discussions
There are no conversations on this topic. Would you like to start one?
Start the Discussion »- Building Bases
- Creating Schemas
-
Developing Applications
- An Introduction to Freebase Application Development
- Playing in the Sandbox
- Freebase Programming Libraries and Tools
- Data Dump FAQ
- Using the Query Editor
- The Complete Metaweb Query Language (MQL) Reference Guide
- MQL Cheatsheet
-
The MQL Cookbook
- Get data as of a specific time
- Read properties of a type
- values vs name/id
- Incoming links
- Any topics with a specific date
- Wikipedia article text
- Retrieve the Wikipedia URL for an object with a GUID
- Find distinct co-types
- Creating relationships with the connect directive
- Mark for deletion
- Sort by index and timestamp
- Traversing Through Non-Reversed Properties
- Combine queries
- Perform transitive queries
- Freebase API Reference
- Application Developer Tips
- The Acre Hosted Development Environment
- Introduction to the Metaweb Javascript Template Language (MJT)
- Freebase Community