alfresco-js-api
Version:
JavaScript client library for the Alfresco REST API
164 lines (118 loc) • 12.9 kB
Markdown
//localhost/alfresco/api/-default-/public/alfresco/versions/1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**findNodes**](QueriesApi.md
[**findPeople**](QueriesApi.md
[**findSites**](QueriesApi.md
<a name="findNodes"></a>
> NodePaging findNodes(term, opts)
Find nodes
**Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of nodes that match the given search criteria. The search term is used to look for nodes that match against name, title, description, full text content or tags. The search term: - must contain a minimum of 3 alphanumeric characters - allows \"quoted term\" - can optionally use &
```javascript
var term = "term_example"; // String | The term to search for.
var opts = {
'rootNodeId': "rootNodeId_example", // String | The id of the node to start the search from. Supports the aliases -my-, -root- and -shared-.
'skipCount': 56, // Number | The number of entities that exist in the collection before those included in this list.
'maxItems': 56, // Number | The maximum number of items to return in the list.
'nodeType': "nodeType_example", // String | Restrict the returned results to only those of the given node type and its sub-types
'include': ["include_example"], // [String] | Returns additional information about the node. The following optional fields can be requested: * allowableOperations * aspectNames * isLink * isLocked * path * properties
'orderBy': ["orderBy_example"] // [String] | A string to control the order of the entities returned in a list. You can use the **orderBy** parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the **ASC** and **DESC** keywords for any field.
'fields': ["fields_example"], // [String] | A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
};
this.alfrescoJsApi.core.queriesApi.findNodes(term, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**term** | **String**| The term to search for. |
**rootNodeId** | **String**| The id of the node to start the search from. Supports the aliases -my-, -root- and -shared-. | [optional]
**skipCount** | **Number**| The number of entities that exist in the collection before those included in this list. | [optional]
**maxItems** | **Number**| The maximum number of items to return in the list. | [optional]
**nodeType** | **String**| Restrict the returned results to only those of the given node type and its sub-types | [optional]
**include** | [**[String]**](String.md)| Returns additional information about the node. The following optional fields can be requested: * allowableOperations * aspectNames * isLink * isLocked * path * properties | [optional]
**orderBy** | [**[String]**](String.md)| A string to control the order of the entities returned in a list. You can use the **orderBy** parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the **ASC** and **DESC** keywords for any field. | [optional]
**fields** | [**[String]**](String.md)| A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter. | [optional]
[**NodePaging**](NodePaging.md)
[ ](../README.md
- **Content-Type**: application/json
- **Accept**: application/json
<a name="findPeople"></a>
> PersonPaging findPeople(term, opts)
Find people
**Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of people that match the given search criteria. The search term is used to look for matches against person id, firstname and lastname. The search term: - must contain a minimum of 2 alphanumeric characters - can optionally use '*&
```javascript
var term = "term_example"; // String | The term to search for.
var opts = {
'skipCount': 56, // Number | The number of entities that exist in the collection before those included in this list.
'maxItems': 56, // Number | The maximum number of items to return in the list.
'fields': ["fields_example"], // [String] | A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
'orderBy': ["orderBy_example"] // [String] | A string to control the order of the entities returned in a list. You can use the **orderBy** parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the **ASC** and **DESC** keywords for any field.
};
this.alfrescoJsApi.core.queriesApi.findPeople(term, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**term** | **String**| The term to search for. |
**skipCount** | **Number**| The number of entities that exist in the collection before those included in this list. | [optional]
**maxItems** | **Number**| The maximum number of items to return in the list. | [optional]
**fields** | [**[String]**](String.md)| A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter. | [optional]
**orderBy** | [**[String]**](String.md)| A string to control the order of the entities returned in a list. You can use the **orderBy** parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the **ASC** and **DESC** keywords for any field. | [optional]
[**PersonPaging**](PersonPaging.md)
[ ](../README.md
- **Content-Type**: application/json
- **Accept**: application/json
<a name="findSites"></a>
> SitePaging findSites(term, opts)
Find sites
**Note:** this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of sites that match the given search criteria. The search term is used to look for sites that match against site id, title or description. The search term: - must contain a minimum of 2 alphanumeric characters - can optionally use '*&
```javascript
var term = "term_example"; // String | The term to search for.
var opts = {
'skipCount': 56, // Number | The number of entities that exist in the collection before those included in this list.
'maxItems': 56, // Number | The maximum number of items to return in the list.
'orderBy': ["orderBy_example"] // [String] | A string to control the order of the entities returned in a list. You can use the **orderBy** parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the **ASC** and **DESC** keywords for any field.
'fields': ["fields_example"], // [String] | A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.
};
this.alfrescoJsApi.core.queriesApi.findSites(term, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**term** | **String**| The term to search for. |
**skipCount** | **Number**| The number of entities that exist in the collection before those included in this list. | [optional]
**maxItems** | **Number**| The maximum number of items to return in the list. | [optional]
**orderBy** | [**[String]**](String.md)| A string to control the order of the entities returned in a list. You can use the **orderBy** parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the **ASC** and **DESC** keywords for any field. | [optional]
**fields** | [**[String]**](String.md)| A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter. | [optional]
[**SitePaging**](SitePaging.md)
[ ](../README.md
- **Content-Type**: application/json
- **Accept**: application/json
All URIs are relative to *https: