Template:API Reference

From AlfrescoWiki

Jump to: navigation, search

[[Category: <product version>]] This is a template for documenting JavaScript/Template APIs. Use this template as a guide: you can modify titles and include new sections. To provided context for each section, ensure that you follow each title heading with an introductory sentence. For example, start by saying "This section describes...".

When using this template:

  • delete the text in green
  • replace the text in <angle brackets> with your own words
  • add a category for the product version to which this API relates


Note For Java APIs, generate the reference documentation using javadoc.
For RESTful APIs, generate the reference documentation from the Alfresco Server URL GET http://<host>:<port>/alfresco/service/index/all.mediawiki.

Contents

[edit] Introduction

The <API_NAME_HERE> API allows developers to...

Provide a high-level description of the interface.

Examples of what to include: state the programming language; indicate where within the product that the API is available (within the repository or within the web framework; describes the clients of the interface and how the interface is used.

[edit] Business examples

Using the API, developers can:

  • <business example>
  • <business example>

[edit] References

Provide other references (external and internal)...

[edit] Methods summary

The following table shows a summary of the methods in the interface.

When there are many methods to document, make each method in this table a link to a separate page containing the full method descriptions (see next section).

Where there are groups of methods, create a different table for each grouping. For example, in the JavaScript API there are collections of methods associated with types of object, like the methods on ScriptNode, the methods on Search, and so on.

Interface MethodsDescription
<Method 1><High-level description>
<Method 2><High-level description>
<Method 3><High-level description>
<And...><So on...

[edit] <Method 1>

For each method, provide a detailed description here, and use the headings in this section as a guide.

[edit] Parameters

This section describes...

<param 1>
<Description>
<param 2>
<Description>

[edit] Return values

If values are returned, list these here. For each return value listed, provide a description and include whether there are fixed return values, for example, true or false.

<Return value>
<Description>
<Return value>
<Description>

[edit] Status codes

List all status codes and their meaning.

<Status code>
<Description>
<Status code>
<Description>

[edit] Example code

Add examples of code use.

[edit] See also

List of related methods.

[edit] <Method 2>

For each method, provide a detailed description here, and use the headings in this section as a guide.

[edit] Parameters

<param 1>
<Description>
<param 2>
<Description>

[edit] Return values

If values are returned, list these here. For each return value listed, provide a description and include whether there are fixed return values, for example, true or false.

<Return value>
<Description>
<Return value>
<Description>

[edit] Status codes

List all status codes and their meaning.

<Status code>
<Description>
<Status code>
<Description>

[edit] Example code

Add examples of code use.

[edit] See also

List of related methods.