Use the API to hide document classes from the "New document" menu

This article is for developers with a full understanding of how to work with our API. 

Important note about the API explorer
When you follow the link we provide to the API explorer, you'll see a red warning.
API_image01.png
The API itself is not deprecated. It's the Google API explorer that is deprecated. All the processes described in our API articles function correctly and safely if you use this Google API explorer. 

Library administrators can configure individual libraries so a given document class is hidden from New menu. Users will not therefore be able to create documents in this document class through the New menu. This can be useful, for example, if you use a specific document class with the Gmail add-on and you don't want the option of creating documents in this document class to be available in the New menu. Learn more: Gmail add-on.

Note: Hiding a document class from the New menu prevents all users from creating documents through the New menu, including library administrators. However, all users authorized to create documents in this class can still do so using the API.


1. As a library administrator, follow one of these links to the AODocs API:

  • US instance:

https://apis-explorer.appspot.com/apis-explorer/?base=https://ao-docs.appspot.com/api#s/documentType/v1/documentType.documentType.patchClass

  • EU instance:

https://apis-explorer.appspot.com/apis-explorer/?base=https://aodocs-core-eu-1.ey.r.appspot.com/api#s/documentType/v1/documentType.documentType.patchClass

Note: Dedicated instances have their own URLs. Learn more: What are AODocs instances?

2. Enter the ID of the library in which you want to hide a document class from the New menu.
Learn how to identify the library ID

3. In the documentTypeId field, enter the ID of the document class you want to hide. Learn how to identify document class IDs.

4. Click in the Patch body field, then click the arrow in the top right corner and select Freeform editor.

image01.png

5. Paste the following text into the Patch body field: 

{

  "appMetadata":   {

    "enableForCreation":

    {

      "tags":

      [

        {

          "name": "Webapp",

          "stringValue": "FALSE"

        }

      ]

    }

  }

}

image02.png

6. Click Authorize and execute. The response is displayed in the lower part of the screen.

Note: To restore the document class to the New menu, use the same process and enter the value TRUE in the stringValue field. This is the default value.

Was this article helpful? 1 out of 1 found this helpful
If you didn’t find what you were looking for, don’t hesitate to leave a comment!
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.