alfresco-js-api
Version:
JavaScript client library for the Alfresco REST API
176 lines (115 loc) • 7.03 kB
Markdown
//localhost/alfresco/api/-default-/public/gs/versions/1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**createRMSite**](GsSitesApi.md
[**deleteRMSite**](GsSitesApi.md
[**getRMSite**](GsSitesApi.md
[**updateRMSite**](GsSitesApi.md
<a name="createRMSite"></a>
> RMSiteEntry createRMSite(siteBodyCreate, opts)
Create the Records Management (RM) site
Creates the RM site with the given details. **Note:** The default site id is rm and the default site name is Records Management. The id of a site cannot be updated once the site has been created. For example, to create an RM site named \"Records Management\" with \"Records Management Description\" as description, the following body could be used: &
```javascript
var siteBodyCreate = new AlfrescoGovernanceServicesRestApi.RMSiteBodyCreate(); // RMSiteBodyCreate | The site details
var opts = {
'skipAddToFavorites': false // Boolean | Flag to indicate whether the RM site should not be added to the user's site favorites.
};
this.alfrescoJsApi.gsCore.gsSitesApi.createRMSite(siteBodyCreate, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**siteBodyCreate** | [**RMSiteBodyCreate**](RMSiteBodyCreate.md)| The site details |
**skipAddToFavorites** | **Boolean**| Flag to indicate whether the RM site should not be added to the user&
[**RMSiteEntry**](RMSiteEntry.md)
[ ](../README.md
- **Content-Type**: application/json
- **Accept**: application/json
<a name="deleteRMSite"></a>
> deleteRMSite()
Delete the Records Management (RM) site
Deletes the RM site.
### Example
```javascript
this.alfrescoJsApi.gsCore.gsSitesApi.deleteRMSite().then(function() {
console.log('API called successfully.');
}, function(error) {
console.error(error);
});
```
This endpoint does not need any parameter.
null (empty response body)
[ ](../README.md
- **Content-Type**: application/json
- **Accept**: application/json
<a name="getRMSite"></a>
> RMSiteEntry getRMSite(opts)
Get the Records Management (RM) site
Gets information for RM site.
### Example
```javascript
var opts = {
'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.gsCore.gsSitesApi.getRMSite(opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**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]
[**RMSiteEntry**](RMSiteEntry.md)
[ ](../README.md
- **Content-Type**: application/json
- **Accept**: application/json
<a name="updateRMSite"></a>
> RMSiteEntry updateRMSite(siteBodyUpdate, opts)
Update the Records Management (RM) site
Update the details for the RM site. Site Manager or other (site) admin can update title or description. **Note**: the id, site visibility, or compliance of the RM site cannot be updated once the site has been created.
### Example
```javascript
var siteBodyUpdate = new AlfrescoGovernanceServicesRestApi.RMSiteBodyUpdate(); // RMSiteBodyUpdate | The RM site information to update.
var opts = {
'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.gsCore.gsSitesApi.updateRMSite(siteBodyUpdate, opts).then(function(data) {
console.log('API called successfully. Returned data: ' + data);
}, function(error) {
console.error(error);
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**siteBodyUpdate** | [**RMSiteBodyUpdate**](RMSiteBodyUpdate.md)| The RM site information to update. |
**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]
[**RMSiteEntry**](RMSiteEntry.md)
[ ](../README.md
- **Content-Type**: application/json
- **Accept**: application/json
All URIs are relative to *https: