Queries
fileVersion
Retrieves an object representing a version of a file.
Template for Query:
query GetFileVersion($projectId: String!, $versionId: String!) {
fileVersion(projectId: $projectId, versionId: $versionId) {
# FileVersion Fields
}
}
Template for Query Variables:
{
"projectId" : "<SOME-STRING-TYPE-SCALAR-VALUE>",
"versionId" : "<SOME-STRING-TYPE-SCALAR-VALUE>"
}
Arguments
projectId* String! non-null | The ID of the project that contains the item. |
versionId* String! non-null | The ID of the file version to retrieve. |
* Required
Possible Returns
Value Type | Description |
---|---|
FileVersion | Represents a version of a file. A file is a container that stores data, information, settings, or commands used with a computer program. |
Example
Example 1
This example retrieves information about a specific version of the file named End Cap. The ID of the version to fetch was obtained from the example used in the query fileVersions.
Query:
query fileVersion ($projectId: String!, $versionId: String!) {
fileVersion (projectId: $projectId, versionId: $versionId) {
... on DesignFileVersion {
id
name
versionNumber
createdOn
createdBy {
id
userName
}
lastModifiedOn
lastModifiedBy {
id
userName
}
mimeType
extensionType
}
}
}
Show More
Query Variables:
{
"projectId": "{{projectId}}",
"versionId": "{{versionId}}"
}
Response:
{
"data": {
"fileVersion": {
"id": "urn:adsk.wipstg:fs.file:vf.iXZvqClST72tS2XGNtuLEg?version=3",
"name": "f8a2ab7f-c490-45be-aee4-7985289f741d.f3d",
"parentFile": {
"name": "End Cap"
},
"versionNumber": 3,
"createdOn": "2022-02-01T07:32:18Z",
"createdBy": {
"firstName": null,
"lastName": null
},
"lastModifiedOn": "2022-02-01T07:32:28Z",
"lastModifiedBy": {
"firstName": null,
"lastName": null
}
}
}
}
Show More