Libraries contain documents of various types. These document types, defined ahead of time, are called classes . When a library is first created, it automatically gets outfitted with a default document type, or class. Other classes in your target library might already have been created for you.
These methods are useful when working with classes:
What follows is an elaboration on each of these methods.
You can list available target classes for your documents as follows:
Play with the API Explorer:
Only libraryId
is mandatory.
GET https://aodocs.altirnao.com/api/documentType/v1/libraries/RrVcEFb8wtDeNAnlmNN
To return just the bare minimum of class ID and displayName in the response, you can filter the results by populating the fields
query parameter with items(displayName,id,kind),kind
with %2C
in place of each comma as follows:
?fields=items(displayName%2Cid%2Ckind)%2Ckind
The response returns an ApiDocumentTypeList resource, listing all document classes available as part of the specified library.
Response fields of note:
id
(of the class)displayName
(of the class)libraryId
(of the library we searched)defaultClass
(whether or not this is the library’s default class){
"kind": "aodocs#classList",
"items": [
{
"kind": "aodocs#classId",
"id": "RnTbOft44KfZYkfBpV",
"displayName": "my-dms-class-001-default",
"libraryId": "RnTG8PDu8ZqTuDVHcv",
"defaultClass": true,
},
{
"kind": "aodocs#classId",
"id": "RnTf1mx35gaTJLzoFp",
"displayName": "my-dms-class-002-not-default",
"libraryId": "RnTG8PDu8ZqTuDVHcv",
"defaultClass": false,
}
]
}
{
"kind": "aodocs#classList",
"items": [
{
"kind": "aodocs#classId",
"id": "Rmk8LOJ1y0Jlwq8cxz",
"displayName": "testClassInsideDMS"
},
{
"kind": "aodocs#classId",
"id": "Rmn9gYNz9JwCVfQaIK",
"displayName": "testClass2insideDMS"
}
]
}
You can also list your library classes in the UI, on the Library Administration page.
Go to Administration > Library administration. In the left-hand pane, go to Library configuration > Document classes. This is where your classes are listed. Note the singular green checkmark signifying the library’s default class.
You can retrieve (the configuration of) a specific class/documentType to confirm it exists or to parse something from its metadata if you have its documentTypeId
(class ID).
Play with the API Explorer:
In the command above:
documentType
is the APIv1
is the API versionlibraries
is the top-level resourcedocumentTypes
or class is the nested resourcePass the mandatory class ID (documentTypeId
) and the library ID (libId
) of the library the class resides in — both as path parameters (not in the query string).
GET https://aodocs.altirnao.com/api/_ah/api/documentType/v1/libraries/Rs4xtue86axGNklquDP/documentTypes/Rs4xuIg86e45fvAsn9L
The response returns an ApiDocumentType resource, listing the specified class.
Response fields of note:
id
(of the class)displayName
(of the class)libraryId
(of the library you searched)defaultClass
(whether or not this is the library’s default class){
{
"kind": "aodocs#documentType",
"id": "RnTbOft44KfZYkfBpV",
"displayName": "my-dms-class-001-not-default",
"libraryId": "RnTG8PDu8ZqTuDVHcv",
},
"defaultClass": true,
}