# Compliance documentation

> Compliance documentation - Get a list of all available document types and locales. This method is
> deprecated.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-05-06T18:17:09.822120+00:00` (UTC).

## Primary page

- [Compliance documentation](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html): Full documentation for this topic (HTML).

## Sections on this page

- [Automated documentation](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#automated-documentation): In-page section heading.
- [classdatarobot.models.automated_documentation.AutomatedDocument](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.automated_documentation.AutomatedDocument): In-page section heading.
- [classmethodlist_available_document_types(cls)](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.automated_documentation.AutomatedDocument.list_available_document_types): In-page section heading.
- [classmethodlist_all_available_document_types()](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.automated_documentation.AutomatedDocument.list_all_available_document_types): In-page section heading.
- [propertyis_model_compliance_initialized: Tuple\[bool, str\]](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.automated_documentation.AutomatedDocument.is_model_compliance_initialized): In-page section heading.
- [initialize_model_compliance()](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.automated_documentation.AutomatedDocument.initialize_model_compliance): In-page section heading.
- [generate(max_wait=600)](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.automated_documentation.AutomatedDocument.generate): In-page section heading.
- [download()](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.automated_documentation.AutomatedDocument.download): In-page section heading.
- [delete()](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.automated_documentation.AutomatedDocument.delete): In-page section heading.
- [classmethodlist_generated_documents(document_types=None, entity_ids=None, output_formats=None, locales=None, offset=None, limit=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.automated_documentation.AutomatedDocument.list_generated_documents): In-page section heading.
- [classdatarobot.models.automated_documentation.DocumentOption](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.automated_documentation.DocumentOption): In-page section heading.
- [Compliance documentation templates](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#compliance-documentation-templates): In-page section heading.
- [classdatarobot.models.compliance_doc_template.ComplianceDocTemplate](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.compliance_doc_template.ComplianceDocTemplate): In-page section heading.
- [classmethodget_default(template_type=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.compliance_doc_template.ComplianceDocTemplate.get_default): In-page section heading.
- [classmethodcreate_from_json_file(name, path, project_type=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.compliance_doc_template.ComplianceDocTemplate.create_from_json_file): In-page section heading.
- [classmethodcreate(name, sections, project_type=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.compliance_doc_template.ComplianceDocTemplate.create): In-page section heading.
- [classmethodget(template_id)](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.compliance_doc_template.ComplianceDocTemplate.get): In-page section heading.
- [classmethodlist(name_part=None, limit=None, offset=None, project_type=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.compliance_doc_template.ComplianceDocTemplate.list): In-page section heading.
- [sections_to_json_file(path, indent=2)](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.compliance_doc_template.ComplianceDocTemplate.sections_to_json_file): In-page section heading.
- [update(name=None, sections=None, project_type=None)](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.compliance_doc_template.ComplianceDocTemplate.update): In-page section heading.
- [delete()](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.compliance_doc_template.ComplianceDocTemplate.delete): In-page section heading.
- [classdatarobot.enums.ComplianceDocTemplateProjectType](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.enums.ComplianceDocTemplateProjectType): In-page section heading.
- [classdatarobot.enums.ComplianceDocTemplateType](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.enums.ComplianceDocTemplateType): In-page section heading.
- [classmethodto_project_type(template_type)](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.enums.ComplianceDocTemplateType.to_project_type): In-page section heading.

## Related documentation

- [Developer documentation](https://docs.datarobot.com/en/docs/api/index.html): Linked from this page.
- [API reference](https://docs.datarobot.com/en/docs/api/reference/index.html): Linked from this page.
- [Python API client](https://docs.datarobot.com/en/docs/api/reference/sdk/index.html): Linked from this page.
- [Secure and govern](https://docs.datarobot.com/en/docs/api/reference/sdk/tag-govern.html): Linked from this page.
- [compliance documentation template](https://docs.datarobot.com/en/docs/api/dev-learning/python/modeling/insights/automated_documentation.html#automated-documentation-overview): Linked from this page.

## Documentation content

## Automated documentation

### class datarobot.models.automated_documentation.AutomatedDocument

An automated documentation object.

Added in version v2.24.

- Variables:

#### classmethod list_available_document_types(cls)

Get a list of all available document types and locales. This method is deprecated.

- Returns:
- Return type: List[DocumentOption]

> [!NOTE] Examples
> ```
> import datarobot as dr
> 
> dr.Client(token=my_token, endpoint=endpoint)
> doc_types = dr.AutomatedDocument.list_available_document_types()
> ```

#### classmethod list_all_available_document_types()

Get a list of all available document types and locales.
This method is direct replacement of list_available_document_types().

- Return type: List of dicts

> [!NOTE] Examples
> ```
> import datarobot as dr
> 
> dr.Client(token=my_token, endpoint=endpoint)
> doc_types = dr.AutomatedDocument.list_all_available_document_types()
> ```

#### property is_model_compliance_initialized : Tuple[bool, str]

Check if model compliance documentation pre-processing is initialized.
Model compliance documentation pre-processing must be initialized before
generating documentation for a custom model.

- Returns:
- Return type: Tuple of (boolean , string)

#### initialize_model_compliance()

Initialize model compliance documentation pre-processing.
Must be called before generating documentation for a custom model.

- Returns:
- Return type: Tuple of (boolean , string)

> [!NOTE] Examples
> ```
> import datarobot as dr
> 
> dr.Client(token=my_token, endpoint=endpoint)
> 
> # NOTE: entity_id is either a model id or a model package (version) id
> doc = dr.AutomatedDocument(
>         document_type="MODEL_COMPLIANCE",
>         entity_id="6f50cdb77cc4f8d1560c3ed5",
>         output_format="docx",
>         locale="EN_US")
> 
> doc.initialize_model_compliance()
> ```

#### generate(max_wait=600)

Request generation of an automated document.

Required attributes to request document generation: `document_type`, `entity_id`,
and `output_format`.

- Return type: requests.models.Response

> [!NOTE] Examples
> ```
> import datarobot as dr
> 
> dr.Client(token=my_token, endpoint=endpoint)
> 
> doc = dr.AutomatedDocument(
>         document_type="MODEL_COMPLIANCE",
>         entity_id="6f50cdb77cc4f8d1560c3ed5",
>         output_format="docx",
>         locale="EN_US",
>         template_id="50efc9db8aff6c81a374aeec",
>         filepath="/Users/username/Documents/example.docx"
>         )
> 
> doc.generate()
> doc.download()
> ```

#### download()

Download a generated Automated Document.
Document ID is required to download a file.

- Return type: requests.models.Response

> [!NOTE] Examples
> Generating and downloading the generated document:
> 
> ```
> import datarobot as dr
> 
> dr.Client(token=my_token, endpoint=endpoint)
> 
> doc = dr.AutomatedDocument(
>         document_type="AUTOPILOT_SUMMARY",
>         entity_id="6050d07d9da9053ebb002ef7",
>         output_format="docx",
>         filepath="/Users/username/Documents/Project_Report_1.docx"
>         )
> 
> doc.generate()
> doc.download()
> ```
> 
> Downloading an earlier generated document when you know the document ID:
> 
> ```
> import datarobot as dr
> 
> dr.Client(token=my_token, endpoint=endpoint)
> doc = dr.AutomatedDocument(id='5e8b6a34d2426053ab9a39ed')
> doc.download()
> ```
> 
> Notice that `filepath` was not set for this document. In this case, the file is saved
> to the directory from which the script was launched.
> 
> Downloading a document chosen from a list of earlier generated documents:
> 
> ```
> import datarobot as dr
> 
> dr.Client(token=my_token, endpoint=endpoint)
> 
> model_id = "6f5ed3de855962e0a72a96fe"
> docs = dr.AutomatedDocument.list_generated_documents(entity_ids=[model_id])
> doc = docs[0]
> doc.filepath = "/Users/me/Desktop/Recommended_model_doc.docx"
> doc.download()
> ```

#### delete()

Delete a document using its ID.

- Return type: requests.models.Response

> [!NOTE] Examples
> ```
> import datarobot as dr
> 
> dr.Client(token=my_token, endpoint=endpoint)
> doc = dr.AutomatedDocument(id="5e8b6a34d2426053ab9a39ed")
> doc.delete()
> ```
> 
> If you don’t know the document ID, you can follow the same workflow to get the ID as in
> the examples for the `AutomatedDocument.download` method.

#### classmethod list_generated_documents(document_types=None, entity_ids=None, output_formats=None, locales=None, offset=None, limit=None)

Get information about all previously generated documents available for your account. The
information includes document ID and type, ID of the entity it was generated for, time of
creation, and other information.

- Parameters:
- Return type: List [ AutomatedDocument ]
- Returns:

> [!NOTE] Examples
> To get a list of all generated documents:
> 
> ```
> import datarobot as dr
> 
> dr.Client(token=my_token, endpoint=endpoint)
> docs = AutomatedDocument.list_generated_documents()
> ```
> 
> To get a list of all `AUTOPILOT_SUMMARY` documents:
> 
> ```
> import datarobot as dr
> 
> dr.Client(token=my_token, endpoint=endpoint)
> docs = AutomatedDocument.list_generated_documents(document_types=["AUTOPILOT_SUMMARY"])
> ```
> 
> To get a list of 5 recently created automated documents in `html` format:
> 
> ```
> import datarobot as dr
> 
> dr.Client(token=my_token, endpoint=endpoint)
> docs = AutomatedDocument.list_generated_documents(output_formats=["html"], limit=5)
> ```
> 
> To get a list of automated documents created for specific entities (projects or models):
> 
> ```
> import datarobot as dr
> 
> dr.Client(token=my_token, endpoint=endpoint)
> docs = AutomatedDocument.list_generated_documents(
>     entity_ids=["6051d3dbef875eb3be1be036",
>                 "6051d3e1fbe65cd7a5f6fde6",
>                 "6051d3e7f86c04486c2f9584"]
>     )
> ```
> 
> Note, that the list of results contains `AutomatedDocument` objects, which means that you
> can execute class-related methods on them. Here’s how you can list, download, and then
> delete from the server all automated documents related to a certain entity:
> 
> ```
> import datarobot as dr
> 
> dr.Client(token=my_token, endpoint=endpoint)
> 
> ids = ["6051d3dbef875eb3be1be036", "5fe1d3d55cd810ebdb60c517f"]
> docs = AutomatedDocument.list_generated_documents(entity_ids=ids)
> for doc in docs:
>     doc.download()
>     doc.delete()
> ```

### class datarobot.models.automated_documentation.DocumentOption

## Compliance documentation templates

### class datarobot.models.compliance_doc_template.ComplianceDocTemplate

A [compliance documentation template](https://docs.datarobot.com/en/docs/api/dev-learning/python/modeling/insights/automated_documentation.html#automated-documentation-overview). Templates
are used to customize contents of [AutomatedDocument](https://docs.datarobot.com/en/docs/api/reference/sdk/compliance-documentation.html#datarobot.models.automated_documentation.AutomatedDocument).

Added in version v2.14.

> [!NOTE] Notes
> Each `section` dictionary has the following schema:
> 
> title
> : title of the section
> type
> : type of section. Must be one of “datarobot”, “user” or “table_of_contents”.
> 
> Each type of section has a different set of attributes described bellow.
> 
> Section of type `"datarobot"` represent a section owned by DataRobot. DataRobot
> sections have the following additional attributes:
> 
> content_id
> : The identifier of the content in this section.
>   You can get the default template with
> get_default
> for a complete list of possible DataRobot section content ids.
> sections
> :  list of sub-section dicts nested under the parent section.
> 
> Section of type `"user"` represent a section with user-defined content.
> Those sections may contain text generated by user and have the following additional fields:
> 
> regularText
> : regular text of the section, optionally separated by
> \n
> to split paragraphs.
> highlightedText
> : highlighted text of the section, optionally separated
>   by
> \n
> to split paragraphs.
> sections
> :  list of sub-section dicts nested under the parent section.
> 
> Section of type `"table_of_contents"` represent a table of contents and has
> no additional attributes.

- Variables:

#### classmethod get_default(template_type=None)

Get a default DataRobot template. This template is used for generating
compliance documentation when no template is specified.

- Parameters: template_type ( str or None ) – Type of the template. Currently supported values are “normal” and “time_series”
- Returns: template – the default template object with sections attribute populated with default sections.
- Return type: ComplianceDocTemplate

#### classmethod create_from_json_file(name, path, project_type=None)

Create a template with the specified name and sections in a JSON file.

This is useful when working with sections in a JSON file. Example:

```
default_template = ComplianceDocTemplate.get_default()
default_template.sections_to_json_file('path/to/example.json')
# ... edit example.json in your editor
my_template = ComplianceDocTemplate.create_from_json_file(
    name='my template',
    path='path/to/example.json'
)
```

- Parameters:
- Returns: template – The created template.
- Return type: ComplianceDocTemplate

#### classmethod create(name, sections, project_type=None)

Create a template with the specified name and sections.

- Parameters:
- Returns: template – The created template.
- Return type: ComplianceDocTemplate

#### classmethod get(template_id)

Retrieve a specific template.

- Parameters: template_id ( str ) – the ID of the template to retrieve
- Returns: template – the retrieved template
- Return type: ComplianceDocTemplate

#### classmethod list(name_part=None, limit=None, offset=None, project_type=None)

Get a paginated list of compliance documentation template objects.

- Parameters:
- Returns: templates – The list of template objects.
- Return type: list of ComplianceDocTemplate

#### sections_to_json_file(path, indent=2)

Save sections of the template to a json file at the specified path

- Parameters:
- Return type: None

#### update(name=None, sections=None, project_type=None)

Update the name or sections of an existing doc template.

Note that default or non-existent templates can not be updated.

- Parameters:
- Return type: None

#### delete()

Delete the compliance documentation template.

- Return type: None

### class datarobot.enums.ComplianceDocTemplateProjectType

The project type supported by the template.

### class datarobot.enums.ComplianceDocTemplateType

The type of default template and sections to create a template.

#### classmethod to_project_type(template_type)

Map from template type to project type supported by the template.

- Return type: Optional [ ComplianceDocTemplateProjectType ]
