* integrate JS-API with monorepo * [ci:force] fix token issue [ci:force] migrate docs folder [ci:force] clean personal tokens * [ci:force] gha workflow support * [ci:force] npm publish target * fix js-api test linting * [ci:force] fix test linting, mocks, https scheme * [ci:force] fix https scheme * [ci:force] typescript mappings * [ci:force] update scripts * lint fixes * linting fixes * fix linting * [ci:force] linting fixes * linting fixes * [ci:force] remove js-api upstream and corresponding scripts * [ci:force] jsdoc fixes * fix jsdoc linting * [ci:force] jsdoc fixes * [ci:force] jsdoc fixes * jsdoc fixes * jsdoc fixes * jsdoc fixes * [ci:force] fix jsdoc * [ci:force] reduce code duplication * replace 'chai' expect with node.js assert * replace 'chai' expect with node.js assert * [ci:force] remove chai and chai-spies for js-api testing * [ci:force] cleanup and fix imports * [ci:force] fix linting * [ci:force] fix unit test * [ci:force] fix sonar linting findings * [ci:force] switch activiti api models to interfaces (-2.5% reduction of bundle) * [ci:force] switch activiti api models to interfaces * [ci:force] switch AGS api models to interfaces * [ci:force] switch AGS api models to interfaces * [ci:force] switch search api models to interfaces * [ci:force] switch content api models to interfaces where applicable
83 KiB
SitesApi
All URIs are relative to https://localhost/alfresco/api/-default-/public/alfresco/versions/1
Method | HTTP request | Description |
---|---|---|
listSiteGroups | GET /sites/{siteId}/group-members | List group membership for site |
approveSiteMembershipRequest | POST /sites/{siteId}/site-membership-requests/{inviteeId}/approve | Approve a site membership request |
createSite | POST /sites | Create a site |
createSiteMembership | POST /sites/{siteId}/members | Create a site membership |
createSiteMembershipRequestForPerson | POST /people/{personId}/site-membership-requests | Create a site membership request |
deleteSite | DELETE /sites/{siteId} | Delete a site |
deleteSiteMembership | DELETE /sites/{siteId}/members/{personId} | Delete a site membership |
deleteSiteMembershipForPerson | DELETE /people/{personId}/sites/{siteId} | Delete a site membership |
deleteSiteMembershipRequestForPerson | DELETE /people/{personId}/site-membership-requests/{siteId} | Delete a site membership request |
getSite | GET /sites/{siteId} | Get a site |
getSiteContainer | GET /sites/{siteId}/containers/{containerId} | Get a site container |
getSiteMembership | GET /sites/{siteId}/members/{personId} | Get a site membership |
getSiteMembershipForPerson | GET /people/{personId}/sites/{siteId} | Get a site membership |
getSiteMembershipRequestForPerson | GET /people/{personId}/site-membership-requests/{siteId} | Get a site membership request |
getSiteMembershipRequests | GET /site-membership-requests | Get site membership requests |
listSiteContainers | GET /sites/{siteId}/containers | List site containers |
listSiteMembershipRequestsForPerson | GET /people/{personId}/site-membership-requests | List site membership requests |
listSiteMemberships | GET /sites/{siteId}/members | List site memberships |
listSiteMembershipsForPerson | GET /people/{personId}/sites | List site memberships |
listSites | GET /sites | List sites |
rejectSiteMembershipRequest | POST /sites/{siteId}/site-membership-requests/{inviteeId}/reject | Reject a site membership request |
updateSite | PUT /sites/{siteId} | Update a site |
updateSiteMembership | PUT /sites/{siteId}/members/{personId} | Update a site membership |
updateSiteMembershipRequestForPerson | PUT /people/{personId}/site-membership-requests/{siteId} | Update a site membership request |
listSiteGroups
List group membership for site
this endpoint is available in Alfresco 7.0.0 and newer versions.
Parameters
Name | Type | Description | Notes |
---|---|---|---|
siteId | string | The identifier of a site. | |
skipCount | number | The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. | default to 0 |
maxItems | number | The maximum number of items to return in the list. If not supplied then the default value is 100. | default to 100 |
fields | 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. |
Return type: SiteGroupPaging
approveSiteMembershipRequest
Approve a site membership request
Parameters
Name | Type | Description |
---|---|---|
siteId | string | The identifier of a site. |
inviteeId | string | The invitee user name. |
opts.siteMembershipApprovalBody | SiteMembershipApprovalBody | Accepting a request to join, optionally, allows assignment of a role to the user. |
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const opts = {
siteMembershipApprovalBody: {}
};
sitesApi.approveSiteMembershipRequest(`<siteId>`, `<inviteeId>`, opts).then(() => {
console.log('API called successfully.');
});
createSite
Create a site
this endpoint is available in Alfresco 5.2 and newer versions.
Creates a default site with the given details. Unless explicitly specified, the site id will be generated from the site title. The site id must be unique and only contain alphanumeric and/or dash characters.
the id of a site cannot be updated once the site has been created.
For example, to create a public site called "Marketing" the following body could be used:
{
"title": "Marketing",
"visibility": "PUBLIC"
}
The creation of the (surf) configuration files required by Share can be skipped via the skipConfiguration query parameter.
if skipped then such a site will not work within Share.
The addition of the site to the user's site favorites can be skipped via the skipAddToFavorites query parameter.
The creator will be added as a member with Site Manager role.
When you create a site, a container called documentLibrary is created for you in the new site. This container is the root folder for content stored in the site.
Parameters
Name | Type | Description |
---|---|---|
siteBodyCreate | SiteBodyCreate | The site details |
opts.skipConfiguration | boolean | Flag to indicate whether the Share-specific (surf) configuration files for the site should not be created. |
opts.skipAddToFavorites | boolean | Flag to indicate whether the site should not be added to the user's site favorites. |
opts.fields | 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. |
Return type: SiteEntry
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const siteBodyCreate = {};
const opts = {};
sitesApi.createSite(siteBodyCreate, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
createSiteMembership
Create a site membership
You can set the role to one of four types:
- SiteConsumer
- SiteCollaborator
- SiteContributor
- SiteManager
Note: You can create more than one site membership by specifying a list of people in the JSON body like this:
[
{
"role": "SiteConsumer",
"id": "joe"
},
{
"role": "SiteConsumer",
"id": "fred"
}
]
If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example:
{
"list": {
"pagination": {
"count": 2,
"hasMoreItems": false,
"totalItems": 2,
"skipCount": 0,
"maxItems": 100
},
"entries": [
{
"entry": {
}
},
{
"entry": {
}
}
]
}
}
Parameters
Name | Type | Description |
---|---|---|
siteId | string | The identifier of a site. |
siteMembershipBodyCreate | SiteMembershipBodyCreate | The person to add and their role |
opts.fields | 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. |
Return type: SiteMemberEntry
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const siteMembershipBodyCreate = {};
const opts = {};
sitesApi.createSiteMembership(`<siteId>`, siteMembershipBodyCreate, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
createSiteMembershipRequestForPerson
Create a site membership request
Create a site membership request for yourself on the site with the identifier of id, specified in the JSON body. The result of the request differs depending on the type of site.
- For a public site, you join the site immediately as a SiteConsumer.
- For a moderated site, your request is added to the site membership request list. The request waits for approval from the Site Manager.
- You cannot request membership of a private site. Members are invited by the site administrator.
You can use the -me-
string in place of <personId>
to specify the currently authenticated user.
You can create site membership requests for more than one site by specifying a list of sites in the JSON body like this:
[
{
"message": "Please can you add me",
"id": "test-site-1",
"title": "Request for test site 1"
},
{
"message": "Please can you add me",
"id": "test-site-2",
"title": "Request for test site 2"
}
]
If you specify a list as input, then a paginated list rather than an entry is returned in the response body. For example:
{
"list": {
"pagination": {
"count": 2,
"hasMoreItems": false,
"totalItems": 2,
"skipCount": 0,
"maxItems": 100
},
"entries": [
{
"entry": {
}
},
{
"entry": {
}
}
]
}
}
Parameters
Name | Type | Description |
---|---|---|
personId | string | The identifier of a person. |
siteMembershipRequestBodyCreate | SiteMembershipRequestBodyCreate | Site membership request details |
opts.fields | 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. |
Return type: SiteMembershipRequestEntry
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const siteMembershipRequestBodyCreate = {};
const opts = {};
sitesApi.createSiteMembershipRequestForPerson(`<personId>`, siteMembershipRequestBodyCreate, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
deleteSite
Delete a site
this endpoint is available in Alfresco 5.2 and newer versions.
Parameters
Name | Type | Description |
---|---|---|
siteId | string | The identifier of a site. |
opts.permanent | boolean | Flag to indicate whether the site should be permanently deleted i.e. bypass the trashcan. |
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const opts = {
permanent: true
};
sitesApi.deleteSite(`<siteId>`, opts).then(() => {
console.log('API called successfully.');
});
deleteSiteMembership
Delete a site membership
You can use the -me-
string in place of <personId>
to specify the currently authenticated user.
Parameters
Name | Type | Description |
---|---|---|
siteId | string | The identifier of a site. |
personId | string | The identifier of a person. |
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
sitesApi.deleteSiteMembership(`<siteId>`, `<personId>`).then(() => {
console.log('API called successfully.');
});
deleteSiteMembershipForPerson
Delete a site membership
You can use the -me-
string in place of <personId>
to specify the currently authenticated user.
Parameters
Name | Type | Description |
---|---|---|
personId | string | The identifier of a person. |
siteId | string | The identifier of a site. |
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
sitesApi.deleteSiteMembershipForPerson(`<personId>`, `<siteId>`).then(() => {
console.log('API called successfully.');
});
deleteSiteMembershipRequestForPerson
Delete a site membership request
You can use the -me-
string in place of <personId>
to specify the currently authenticated user.
Parameters
Name | Type | Description |
---|---|---|
personId | string | The identifier of a person. |
siteId | string | The identifier of a site. |
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
sitesApi.deleteSiteMembershipRequestForPerson(`<personId>`, `<siteId>`).then(() => {
console.log('API called successfully.');
});
getSite
Get a site
You can use the relations parameter to include one or more related entities in a single response and so reduce network traffic.
The entity types in Alfresco are organized in a tree structure. The sites entity has two children, containers and members. The following relations parameter returns all the container and member objects related to the site siteId:
- containers
- members
Parameters
Name | Type | Description |
---|---|---|
siteId | string | The identifier of a site. |
opts.relations | string[] | Use the relations parameter to include one or more related entities in a single response. |
opts.fields | 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. |
Return type: SiteEntry
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const opts = {};
sitesApi.getSite(`<siteId>`, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
getSiteContainer
Get a site container
Parameters
Name | Type | Description |
---|---|---|
siteId | string | The identifier of a site. |
containerId | string | The unique identifier of a site container. |
opts.fields | 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. |
Return type: SiteContainerEntry
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const opts = {};
sitesApi.getSiteContainer(`<siteId>`, `<containerId>`, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
getSiteMembership
Get a site membership
You can use the -me-
string in place of <personId>
to specify the currently authenticated user.
Parameters
Name | Type | Description |
---|---|---|
siteId | string | The identifier of a site. |
personId | string | The identifier of a person. |
opts.fields | 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. |
Return type: SiteMemberEntry
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const opts = {};
sitesApi.getSiteMembership(`<siteId>`, `<personId>`, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
getSiteMembershipForPerson
Get a site membership
You can use the -me-
string in place of <personId>
to specify the currently authenticated user.
Parameters
Name | Type | Description |
---|---|---|
personId | string | The identifier of a person. |
siteId | string | The identifier of a site. |
Return type: SiteRoleEntry
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
sitesApi.getSiteMembershipForPerson(`<personId>`, `<siteId>`).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
getSiteMembershipRequestForPerson
Gets the site membership request for site siteId for person personId, if one exists.
You can use the -me-
string in place of <personId>
to specify the currently authenticated user.
Parameters
Name | Type | Description |
---|---|---|
personId | string | The identifier of a person. |
siteId | string | The identifier of a site. |
opts.fields | 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. |
Return type: SiteMembershipRequestEntry
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const opts = {};
sitesApi.getSiteMembershipRequestForPerson(`<personId>`, `<siteId>`, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
getSiteMembershipRequests
Get the list of site membership requests the user can action.
You can use the where parameter to filter the returned site membership requests by siteId. For example:
(siteId=mySite)
The where parameter can also be used to filter by personId. For example:
where=(personId=person)
This may be combined with the siteId filter, as shown below:
where=(siteId=mySite AND personId=person))
Parameters
Name | Type | Description | Notes |
---|---|---|---|
opts.skipCount | number | The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. | default to 0 |
opts.maxItems | number | The maximum number of items to return in the list. If not supplied then the default value is 100. | default to 100 |
opts.where | string | A string to restrict the returned objects by using a predicate. | |
opts.fields | 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. |
Return type: SiteMembershipRequestWithPersonPaging
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const opts = {};
sitesApi.getSiteMembershipRequests(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
listSiteContainers
List site containers
Parameters
Name | Type | Description | Notes |
---|---|---|---|
siteId | string | The identifier of a site. | |
opts.skipCount | number | The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. | default to 0 |
opts.maxItems | number | The maximum number of items to return in the list. If not supplied then the default value is 100. | default to 100 |
opts.fields | 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. |
Return type: SiteContainerPaging
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const opts = {};
sitesApi.listSiteContainers(`<siteId>`, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
listSiteMembershipRequestsForPerson
List site membership requests
You can use the -me-
string in place of <personId>
to specify the currently authenticated user.
Parameters
Name | Type | Description | Notes |
---|---|---|---|
personId | string | The identifier of a person. | |
skipCount | number | The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. | default to 0 |
maxItems | number | The maximum number of items to return in the list. If not supplied then the default value is 100. | default to 100 |
fields | 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. |
Return type: SiteMembershipRequestPaging
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const opts = {};
sitesApi.listSiteMembershipRequestsForPerson(`<personId>`, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
listSiteMemberships
List site memberships
Parameters
Name | Type | Description | Notes |
---|---|---|---|
siteId | string | The identifier of a site. | |
opts.skipCount | number | The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. | default to 0 |
opts.maxItems | number | The maximum number of items to return in the list. If not supplied then the default value is 100. | default to 100 |
opts.fields | 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. |
Return type: SiteMemberPaging
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const opts = {};
sitesApi.listSiteMemberships(`<siteId>`, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
listSiteMembershipsForPerson
List site memberships
You can use the -me-
string in place of <personId>
to specify the currently authenticated user.
You can use the where parameter to filter the returned sites by visibility or site preset.
Example to filter by visibility, use any one of:
(visibility='PRIVATE')
(visibility='PUBLIC')
(visibility='MODERATED')
Example to filter by site preset:
(preset='site-dashboard')
The default sort order for the returned list is for sites to be sorted by ascending title. You can override the default by using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter:
- id
- title
- role
Parameters
Name | Type | Description | Notes |
---|---|---|---|
personId | string | The identifier of a person. | |
opts.skipCount | number | The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. | default to 0 |
opts.maxItems | number | The maximum number of items to return in the list. If not supplied then the default value is 100. | default to 100 |
opts.orderBy | 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. | |
opts.relations | string[] | Use the relations parameter to include one or more related entities in a single response. | |
opts.fields | 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. | |
opts.where | string | A string to restrict the returned objects by using a predicate. |
Return type: SiteRolePaging
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const opts = {};
sitesApi.listSiteMembershipsForPerson(`<personId>`, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
listSites
Gets a list of sites in this repository.
You can use the where parameter to filter the returned sites by visibility or site preset.
Example to filter by visibility, use any one of:
(visibility='PRIVATE')
(visibility='PUBLIC')
(visibility='MODERATED')
Example to filter by site preset:
(preset='site-dashboard')
The default sort order for the returned list is for sites to be sorted by ascending title. You can override the default by using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter:
- id
- title
- description
You can use the relations parameter to include one or more related entities in a single response and so reduce network traffic.
The entity types in Alfresco are organized in a tree structure. The sites entity has two children, containers and members. The following relations parameter returns all the container and member objects related to each site:
- containers
- members
Parameters
Name | Type | Description | Notes |
---|---|---|---|
opts.skipCount | number | The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. | default to 0 |
opts.maxItems | number | The maximum number of items to return in the list. If not supplied then the default value is 100. | default to 100 |
opts.orderBy | 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. | |
opts.relations | string[] | Use the relations parameter to include one or more related entities in a single response. | |
opts.fields | 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. | |
opts.where | string | A string to restrict the returned objects by using a predicate. |
Return type: SitePaging
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const opts = {};
sitesApi.listSites(opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
rejectSiteMembershipRequest
Reject a site membership request.
Parameters
Name | Type | Description |
---|---|---|
siteId | string | The identifier of a site. |
inviteeId | string | The invitee user name. |
opts.siteMembershipRejectionBody | SiteMembershipRejectionBody | Rejecting a request to join, optionally, allows the inclusion of comment. |
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const opts = {
siteMembershipRejectionBody: {}
};
sitesApi.rejectSiteMembershipRequest(`<siteId>`, `<inviteeId>`, opts).then(() => {
console.log('API called successfully.');
});
updateSite
Update a site
this endpoint is available in Alfresco 5.2 and newer versions.
Update the details for the given site siteId. Site Manager or otherwise a (site) admin can update title, description or visibility.
the id of a site cannot be updated once the site has been created.
Parameters
Name | Type | Description |
---|---|---|
siteId | string | The identifier of a site. |
siteBodyUpdate | SiteBodyUpdate | The site information to update. |
opts.fields | 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. |
Return type: SiteEntry
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const siteBodyUpdate = {};
const opts = {};
sitesApi.updateSite(siteId, siteBodyUpdate, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
updateSiteMembership
Update a site membership
You can use the -me-
string in place of <personId>
to specify the currently authenticated user.
You can set the role to one of four types:
- SiteConsumer
- SiteCollaborator
- SiteContributor
- SiteManager
Parameters
Name | Type | Description |
---|---|---|
siteId | string | The identifier of a site. |
personId | string | The identifier of a person. |
siteMembershipBodyUpdate | SiteMembershipBodyUpdate | The persons new role |
opts.fields | 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. |
Return type: SiteMemberEntry
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const siteMembershipBodyUpdate = {};
const opts = {};
sitesApi.updateSiteMembership(`<siteId>`, `<personId>`, siteMembershipBodyUpdate, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
updateSiteMembershipRequestForPerson
Update a site membership request
You can use the -me-
string in place of <personId>
to specify the currently authenticated user.
Parameters
Name | Type | Description |
---|---|---|
personId | string | The identifier of a person. |
siteId | string | The identifier of a site. |
siteMembershipRequestBodyUpdate | SiteMembershipRequestBodyUpdate | The new message to display |
opts.fields | 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. |
Return type: SiteMembershipRequestEntry
Example
import { AlfrescoApi, SitesApi } from '@alfresco/js-api';
const alfrescoApi = new AlfrescoApi(/*..*/);
const sitesApi = new SitesApi(alfrescoApi);
const siteMembershipRequestBodyUpdate = {};
const opts = {};
sitesApi.updateSiteMembershipRequestForPerson(`<personId>`, `<siteId>`, siteMembershipRequestBodyUpdate, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
});
Models
SiteMembershipApprovalBody
Properties
Name | Type |
---|---|
role | string |
SiteRolePaging
Name | Type |
---|---|
list | SiteRolePagingList |
SiteRolePagingList
Properties
Name | Type |
---|---|
pagination | Pagination |
entries | SiteRoleEntry[] |
SiteRoleEntry
Properties
Name | Type |
---|---|
entry | SiteRole |
SiteRole
Properties
Name | Type |
---|---|
site | Site |
id | string |
guid | string |
role | string |
SiteRole.RoleEnum
SiteConsumer
(value:'SiteConsumer'
)SiteCollaborator
(value:'SiteCollaborator'
)SiteContributor
(value:'SiteContributor'
)SiteManager
(value:'SiteManager'
)
SiteMembershipRequestPaging
Properties
Name | Type |
---|---|
list | SiteMembershipRequestPagingList |
SiteMembershipRequestPagingList
Properties
Name | Type |
---|---|
pagination | Pagination |
entries | SiteMembershipRequestEntry[] |
SiteMembershipRequestEntry
Properties
Name | Type |
---|---|
entry | SiteMembershipRequest |
SiteMembershipRequest
Properties
Name | Type |
---|---|
id | string |
createdAt | Date |
site | Site |
message | string |
SiteMembershipBodyUpdate
Properties
Name | Type |
---|---|
role | string |
SiteMembershipBodyUpdate.RoleEnum
SiteConsumer
(value:'SiteConsumer'
)SiteCollaborator
(value:'SiteCollaborator'
)SiteContributor
(value:'SiteContributor'
)SiteManager
(value:'SiteManager'
)
SiteMembershipBodyCreate
Properties
Name | Type |
---|---|
role | string |
id | string |
SiteMembershipBodyCreate.RoleEnum
SiteConsumer
(value:'SiteConsumer'
)SiteCollaborator
(value:'SiteCollaborator'
)SiteContributor
(value:'SiteContributor'
)SiteManager
(value:'SiteManager'
)
SiteBodyUpdate
Properties
Name | Type |
---|---|
title | string |
description | string |
visibility | string |
SiteBodyUpdate.VisibilityEnum
PRIVATE
(value:'PRIVATE'
)MODERATED
(value:'MODERATED'
)PUBLIC
(value:'PUBLIC'
)
SiteBodyCreate
Properties
Name | Type |
---|---|
id | string |
title | string |
description | string |
visibility | string |
SiteBodyCreate.VisibilityEnum
PUBLIC
(value:'PUBLIC'
)PRIVATE
(value:'PRIVATE'
)MODERATED
(value:'MODERATED'
)
SiteContainerPaging
Properties
Name | Type |
---|---|
list | SiteContainerPagingList |
SiteContainerPagingList
Properties
Name | Type |
---|---|
pagination | Pagination |
entries | SiteContainerEntry[] |
SiteContainerEntry
Properties
Name | Type |
---|---|
entry | SiteContainer |
SiteContainer
Properties
Name | Type |
---|---|
id | string |
folderId | string |
SiteMembershipRequestBodyCreate
Properties
Name | Type | Description |
---|---|---|
message | string | |
id | string | |
title | string | |
client | string | Optional client name used when sending an email to the end user, defaults to "share" if not provided. Note: The client must be registered before this API can send an email. Note: This is available in Alfresco 7.0.0 and newer versions. |
SiteMembershipRequestBodyUpdate
Properties
Name | Type |
---|---|
message | string |
SiteMembershipRejectionBody
Properties
Name | Type |
---|---|
comment | string |
SiteMembershipRequestWithPersonPaging
Properties
Name | Type |
---|---|
list | SiteMembershipRequestWithPersonPagingList |
SiteMembershipRequestWithPersonPagingList
Properties
Name | Type |
---|---|
pagination | Pagination |
entries | SiteMembershipRequestWithPersonEntry[] |
SiteMembershipRequestWithPersonEntry
Properties
Name | Type |
---|---|
entry | SiteMembershipRequestWithPerson |
SiteMembershipRequestWithPerson
Properties
Name | Type |
---|---|
id | string |
createdAt | Date |
site | Site |
person | Person |
message | string |
SiteMemberPaging
Properties
Name | Type |
---|---|
list | SiteMemberPagingList |
SiteMemberPagingList
Properties
Name | Type |
---|---|
pagination | Pagination |
entries | SiteMemberEntry[] |
SiteMemberEntry
Properties
Name | Type |
---|---|
entry | SiteMember |
SiteMember
Properties
Name | Type |
---|---|
id | string |
person | Person |
role | string |
isMemberOfGroup | boolean |
SiteMember.RoleEnum
SiteConsumer
(value:'SiteConsumer'
)SiteCollaborator
(value:'SiteCollaborator'
)SiteContributor
(value:'SiteContributor'
)SiteManager
(value:'SiteManager'
)
SiteGroupPaging
Properties
Name | Type |
---|---|
list | SiteGroupPagingList |
SiteGroupPagingList
Properties
Name | Type |
---|---|
pagination | Pagination |
entries | SiteGroupEntry[] |
SiteGroupEntry
Properties
Name | Type |
---|---|
entry | SiteGroup |
SiteGroup
Properties
Name | Type |
---|---|
id | string |
group | GroupMember |
role | string |
Enum: SiteGroup.RoleEnum
SiteConsumer
(value:'SiteConsumer'
)SiteCollaborator
(value:'SiteCollaborator'
)SiteContributor
(value:'SiteContributor'
)SiteManager
(value:'SiteManager'
)