GoFAST : API REST
GoFAST’s REST API enables developers to interact with the application programmatically. On this page you’ll find all the information you need to use this API.
Authentication
Basic
The Basic authentication method is the classic authentication method defined in the RFC 7617 controlled by the HTTP protocol (also known as HTTP authentication).
It requires the Authorization header to be passed to a request with the value of the string Basic AUTHORIZATION_VALUE or AUTHORIZATION_VALUE is the string username:password encoded in base 64.
Exemple : Pour l’utilisateur user1:motdepasse1, il faudra passer la valeur : Basic dXNlcjE6bW90ZGVwYXNzZTE=
Token
The token authentication method is used to generate a temporary session identified by a token (a string of characters).
It uses the login resource, the token action and the GET method.
Caution
The token action is not available from GoFAST’s external API, but is used between the platform’s internal components.
Resources
Resource: login
This resource allows you to interact with the GoFAST authentication system.
Action : token
This action allows you to interact with the token authentication system.
Caution
The token action is not available from GoFAST’s external API, but is used between the platform’s internal components.
GET
This method allows you to retrieve an authentication token. This token is valid for 3 minutes.
GET: /api/login/token
Header |
Value |
---|---|
Content-Type |
application/json |
GET Parameter |
Value |
---|---|
name* |
User username |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
token |
Authentication token |
Resource: node
This resource lets you interact with Drupal node entities. These can represent documents, articles, spaces, forms, etc.
Action : node
This action allows you to interact in a basic way with Drupal node entities.
GET
This method allows you to retrieve generic information from a node-type entity
GET: /api/node/node
Header |
Value |
---|---|
Content-Type |
application/json |
GET Parameter |
Value |
---|---|
nid* |
Node number |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nid |
Node number |
type |
Node type |
title |
Node title |
status |
1: Published, 0: Unpublished (Deleted) |
uid |
Node creator number |
sticky |
1: Pinned, 0: Not pinned |
language |
Node language (und, fr, en, nl…) |
created |
Node creation timestamp |
updated |
Timestamp of last node modification |
update_uid |
Last node modifier number |
comment_count |
Number of comments attached to the node |
last_comment_uid |
Number of the node’s last commentator |
last_comment_timestamp |
Timestamp of the node’s last comment |
last_comment_cid |
Number of the node’s last comment |
alfresco_reference |
Alfresco content reference associated with the node |
POST
This method is used to create an entity of type node. If this node is of type alfresco_item and is not created from a template, it is mandatory to add a file to it.
POST: /api/node/node
Header |
Value |
---|---|
Content-Type |
multipart/form-data |
Key |
Value |
---|---|
file** |
The file to load (if the node type is ‘alfresco_item’ and is not to be created from a template) |
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
type* |
Node type |
title* |
The title of the file, article, forum… |
locations** |
Les emplacements dans un tableau sous la forme “/Sites/_Organisations/Mon Organisation/XXX” (alfresco_item seulement) |
template_nid** |
L’identifiant du noeud du template à partir duquel créer le fichier si nécessaire (alfresco_item seulement) |
gids** |
Destination space numbers in a table (article, forum only) |
body** |
Content in HTML format (article, forum only) |
- The available node types are :
alfresco_item (Document)
article (Page interne)
forum (Forum)
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nid |
Node number |
Action : metadata
This action allows you to interact with the metadata associated with node entities
GET
This method allows you to retrieve the metadata associated with node entities
GET: /api/node/metadata
Header |
Value |
---|---|
Content-Type |
application/json |
GET Parameter |
Value |
---|---|
nid* |
Node number |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
field_XXX |
Table containing field values |
field_YYY |
Table containing field values |
POST
This method is used to update the metadata associated with node entities
POST: /api/node/metadata
Header |
Value |
---|---|
Content-Type |
application/json |
Note
- On the contrary to the return of the GET method, the values do not have to be listed in this way
- field_XXXArray
- 0: value: Array
VAL1
- 1: value: Array
VAL2
- But more like this
- field_XXXArray
0: VAL1, 1: VAL2
- Or like this according to the edited field
field_XXX : VAL
Les champs modifiables sont : field_category, field_state, field_target_link, field_external_page_url, field_date, field_criticity, field_document_author, field_tags
Key |
Value |
---|---|
nid* |
Node number |
field_XXX |
Table containing field values |
field_YYY |
Table containing field values |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
Field_XXX |
Tableau contenant le retour de la fonction |
Field_YYY |
Tableau contenant le retour de la fonction |
PATCH
This method is used to add a value to certain metadata associated with node entities
PATCH: /api/node/metadata
Header |
Value |
---|---|
Content-Type |
application/json |
Note
- On the contrary to the return of the GET method, the values do not have to be listed in this way
- field_XXXArray
- 0: value: Array
VAL1
- 1: value: Array
VAL2
- But more like this
- field_XXXArray
0: VAL1, 1: VAL2
- Or like this according to the edited field
field_XXX : VAL
The fields that can be altered are: field_target_link, field_external_page_url, field_tags
Key |
Value |
---|---|
nid* |
Node number |
field_XXX |
Table containing field values |
field_YYY |
Table containing field values |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
Field_XXX |
Tableau contenant le retour de la fonction |
Field_YYY |
Tableau contenant le retour de la fonction |
Action : locations
This action allows you to interact with the content locations associated with node entities
GET
This method is used to retrieve the locations of content associated with node entities
GET: /api/node/locations
Header |
Value |
---|---|
Content-Type |
application/json |
GET Parameter |
Value |
---|---|
nid* |
Node number |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
locations |
Indexed table containing locations. |
PUT
This method is used to modify the location of content associated with node entities
PUT: /api/node/locations
Header |
Value |
---|---|
Content-Type |
application/json |
POST Parameter | Valeur |
|
---|---|
nid* |
Node number |
locations* |
Indexed table containing locations |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
locations |
Tableau indexé contenant les emplacements après vidage du cache. |
POST
This method allows you add or remove content locations associated with node entities
POST: /api/node/locations
Header |
Value |
---|---|
Content-Type |
application/json |
POST Parameter | Valeur |
|
---|---|
nid* |
Node number |
locations* |
Indexed table containing new locations to be added |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
locations |
Tableau indexé contenant les emplacements après vidage du cache. |
delete |
Boolean 1 = suppression; 0 = ajout. |
Action : content
This action is used to interact with Alfresco content associated with node entities
Caution
Using this action on a node with no associated Alfresco content will result in a “404 Not Found” error. Nodes associated with Alfresco content are of type “alfresco_item”.
GET
This method is used to retrieve Alfresco content associated with a node.
GET: /api/node/content
Header |
Value |
---|---|
Content-Type |
application/octet-stream |
Content-Disposition |
attachment |
GET Parameter |
Value |
---|---|
nid* |
Node number |
Back:
Header |
Value |
---|---|
Content-Type |
application/octet-stream |
Content-Disposition |
attachment; filename=”nom_du_fichier” |
Le contenu du retour de la requête est le contenu du document.
POST
This method is used to replace the Alfresco content associated with a node by creating a new version.
POST: /api/node/content
Header |
Value |
---|---|
Content-Type |
multipart/form-data |
POST Parameter |
Value |
---|---|
file |
The file to upload |
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nid* |
Node number |
comment |
Comment associated with the new version |
major_version |
0: Version mineure, 1: Version majeure (default : 0) |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
success |
1: OK, 0: Erreur |
Action : preview
This action is used to interact with PDF previews associated with node entities
Caution
Using this action on a node with no associated Alfresco content will result in a “404 Not Found” error. Nodes associated with Alfresco content are of type “alfresco_item”.
GET
This method is used to retrieve the PDF preview of Alfresco content associated with a node.
GET: /api/node/preview
Header |
Value |
---|---|
Content-Type |
application/pdf |
Content-Disposition |
attachment |
GET Parameter |
Value |
---|---|
nid* |
Node number |
Back:
Header |
Value |
---|---|
Content-Type |
application/pdf |
Content-Disposition |
attachment; filename=”nom_du_fichier” |
Le contenu du retour de la requête est le contenu de la prévisualisation PDF du document.
Action : preview_link
This action is used to interact with PDF previews associated with node entities
Caution
Using this action on a node with no associated Alfresco content will result in a “404 Not Found” error. Nodes associated with Alfresco content are of type “alfresco_item”.
GET
This method is used to retrieve a link to a PDF preview associated with a node entity
GET: /api/node/preview_link
Header |
Value |
---|---|
Content-Type |
application/json |
GET Parameter |
Value |
---|---|
nid* |
Node number |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
link |
Link to the preview |
Action : version
This action allows you to interact with the versions of Alfresco contents associated with node entities
GET
This method is used to retrieve versions of an Alfresco content associated with a node entity
GET: /api/node/version
Header |
Value |
---|---|
Content-Type |
application/json |
GET Parameter |
Value |
---|---|
nid* |
Node number |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
creator |
Identifiant du créateur de la version |
type |
MINOR : Version mineure, MAJOR : Version majeure |
created |
Version creation timestamp |
version |
Version number |
comment |
Comment associated with the version |
Action : versions
This action allows you to interact with the versions of Alfresco contents associated with node entities
GET
This method is used to retrieve the versions of Alfresco contents associated with a node entity
GET: /api/node/versions
Header |
Value |
---|---|
Content-Type |
application/json |
GET Parameter |
Value |
---|---|
nid* |
Node number |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
creator |
Versions creator ID |
type |
MINOR : Version mineure, MAJOR : Version majeure |
created |
Versions creation timestamp |
version |
Versions number |
comment |
Comment associated with the versions |
Action : archive
This action allows you to interact with the archiving of documents associated with node entities.
POST
This method is used to archive a document associated with a node entity.
POST: /api/node/archive
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nid* |
Node number |
unarchive* |
Si la valeur est “true”, le document sera désarchivé |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nid |
Node number |
Action : status
This action allows you to interact with the status of Drupal node entities.
POST
This method is used to publish or unpublish a node, and if it’s a document, it will be restored or deleted.
POST: /api/node/status
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nid* |
Node number |
restore* |
Si la valeur est “true”, le document sera restauré |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nid |
Node number |
Action : publication
This action allows you to interact with document publications associated with node entities.
GET
This method is used to retrieve the publication of a document if it exists.
GET: /api/node/publication
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nid* |
Node number |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nid |
Node number |
status |
1: Publié, 0: Dépublié |
POST
This method is used to create a publication from an Alfresco document associated with node entities.
Caution
The documentation for this API is not yet complete.
POST: /api/node/publication
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nid* |
Node number |
locations* |
Tableau indexé contenant les emplacements sous la forme “/Sites/_xxx” |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
publication_nid |
Publication node number |
Action : autocomplete
This action is used to interact with Drupal’s node entity autocompletion system.
GET
Cette méthode permet de récupérer une liste de noeuds en fonction de la chaine passée en input et des bundles demandés.
GET: /api/node/autocomplete
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
str* |
Input |
bundles |
Liste de bundles séparés par une virgule (alfresco_item par default) |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
uid |
Some basic user information |
Resource : comment
This resource is used to interact with Drupal comment entities. The latter represent comments associated with node entities
Action : comment
This action allows basic interaction with Drupal comment entities.
GET
This method is used to retrieve a comment
GET: /api/comment/comment
Header |
Value |
---|---|
Content-Type |
application/json |
GET Parameter |
Value |
---|---|
cid* |
Comment number |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nid |
Node number |
cid |
Comment number |
uid |
Commenting user number |
subject |
Comment title |
body |
comment content |
is_private |
0: Commentaire publique, 1: Commentaire privé |
PUT
This method is used to attach a comment to a node entity
GET: /api/comment/comment
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nid* |
Node number |
subject* |
Comment title |
body* |
Comment contents (HTML format) |
is_private |
0: Commentaire publique, 1: Commentaire privé (défaut : 0) |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
cid |
Comment number |
Resource : space
This resource is used to interact with Drupal’s Organic Groups. These represent what are known as “collaborative spaces”
Action : space
This action allows basic interaction with Drupal’s Organic Groups.
PUT
This method is used to create a collaborative space using the Drupal mechanism
PUT: /api/space/space
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
gid* |
Parent space node number |
title* |
New space title |
body |
Home page content (HTML format) |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
gid |
Number of the space created |
Action : member
This action allows basic interaction with members of Drupal’s Organic Groups.
PUT
Adds a member (user or list of users) to a space with a role.
PUT: /api/space/member
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
gid* |
Space node number |
role* |
User role |
uid OU ul_node_id* |
User OR user list ID |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
uid |
User number |
PATCH
Is used to update the role of a member (user or list of users) of a space.
PATCH: /api/space/member
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
gid* |
Space node number |
new_role* |
New user roles |
uid OU ul_node_id* |
User OR user list ID |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
uid |
User number |
DELETE
This method is used to remove a member (a user or a list of users) from a space.
DELETE: /api/space/member
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
gid* |
Space node number |
uid OU ul_node_id* |
User OR user list ID |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
uid |
User number |
status |
OK if all went well |
Action : members
This action allows basic interaction with Drupal’s Organic Groups.
GET
This method is used to retrieve the members of a space.
GET: /api/space/members
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nid* |
Node number |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
uid |
User ID |
name |
User username |
Resource : taxonomy
This resource is used to interact with Drupal’s taxonomy. The taxonomy lets you associate terms with content (e.g. category, importance…)
Action : terms
This action is used to interact with the terms in the Drupal taxonomy.
GET
This method is used to retrieve the taxonomy terms associated with a vocabulary
Note
Available vocabulary_name values can be retrieved from the vocabularies action. Example of usable values: category, criticality, tags
GET: /api/taxonomy/terms
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
vocabulary_name* |
Vocabulary name |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
term_name |
Table containing term ID and certain information |
Action : vocabularies
This action is used to interact with the vocabularies in the Drupal taxonomy.
GET
This method is used to retrieve the vocabularies from Drupal’s taxonomy
GET: /api/taxonomy/vocabularies
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
vocabulary_name |
Table containing the vocabulary ID and certain information |
Resource : user
This resource is used to interact with Drupal’s user entities. These entities represent the users registered on the platform.
Action : autocomplete
This action is used to interact with Drupal’s user entity autocompletion system.
GET
This method is used to retrieve a list of users based on the string entered.
GET: /api/user/autocomplete
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
str* |
Input |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
uid |
Some basic user information |
Resource : locations
This resource is used to interact with available locations on Alfresco (all folders and spaces from an EDM point of view only)
Action : tree
This action is used to retrieve a tree of locations in JSON format compatible with the ZTree component.
POST
This method is used to retrieve a tree of locations in JSON format compatible with the ZTree component.
GET: /api/locations/tree
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
ename |
Chemin à partir duquel récupérer les enfants |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
tree |
String in JSON format directly usable by the ZTree library |
Resource : kanban
This resource is used to interact with a user’s tasks.
Action : user_task
This resource is used to interact with a user’s tasks.
GET
This method is used to retrieve the user’s tasks.
GET: /api/kanban/user_task
Header |
Value |
---|---|
Content-Type |
application/json |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Resource : search
This resource is used to interact with documentary research.
Action : search
This action allows you to carry out a document search.
POST
This method allows you to carry out a documentary search.
Note
The filters available values are as follows:
Filtre |
Description | Valeur |
|
---|---|---|
ds_created |
date de création | [YYYY-MM-DDTHH:MM:SSZ TO YYYY-MM-DDTHH:MM:SSZ] date au format ISO 8601 |
|
ds_changed |
modification date |
[YYYY-MM-DDTHH:MM:SSZ TO YYYY-MM-DDTHH:MM:SSZ] date au format ISO 8601 |
sm_unr_document_reference |
document reference |
value |
im_field_format |
document format |
Identifiant du terme de la taxonomy format (cf. API taxonomy) |
im_field_tags |
document tags |
Identifiant du terme de la taxonomy tags (cf. API taxonomy) |
im_field_category |
document category |
Identifiant du terme de la taxonomy category (cf. API taxonomy) |
sm_og_group_content_ref |
Search area |
node:xx Identifiant de l’espace dans lequel rechercher |
is_uid |
utilisateur créateur |
User ID |
is_mod_uid |
utilisateur modificateur |
User ID |
sm_unr_author |
document author |
value |
im_field_state |
document status |
Identifiant du terme de la taxonomy state (cf. API taxonomy) |
im_field_criticity |
document importance |
Identifiant du terme de la taxonomy criticity (cf. API taxonomy) |
ss_language |
document language |
value (fr, en, …) |
ds_field_date |
document expiry date |
[YYYY-MM-DDTHH:MM:SSZ TO YYYY-MM-DDTHH:MM:SSZ] date au format ISO 8601 |
POST: /api/search/search
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
query |
Texte à rechercher |
filters |
Search filters table |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
[Results table] |
Table containing the 10 first results |
results |
Total number of results |
Resource : userlist
This resource is used to interact with user lists.
Action : userlist
This action is used to interact with user lists.
GET
This method allows you to retrieve information from a list of users.
GET: /api/userlist/userlist
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nulid |
Node number of a user list |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
title |
Userlist name |
users |
Members list |
admin |
Administrators list |
PUT
This method is used to create a list of users.
PUT: /api/userlist/userlist
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
title |
User list title |
description |
User list description |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
title |
User list name |
nid |
User list node number |
type |
User list type |
created |
User list creation date |
creator_id |
User list creator number |
PATCH
This method is used to update a list of users.
PATCH: /api/userlist/userlist
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nulid |
User list node number |
title |
New user list title |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
new_title |
New user list title |
status |
User list status |
Action : admins
This action allows administrators to manage the user list.
PUT
This method is used to add an administrator to the user list.
PUT: /api/userlist/admins
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nulid |
User list node number |
uid |
User ID |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
status |
Statut de l’ajout |
Action : members
This action allows members to access the user list.
GET
This method is used to retrieve the list of members of the user list.
GET: /api/userlist/members
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nulid |
Node number of a user list |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
uid |
User number |
username |
User name |
display_name |
User display name |
PUT
This method is used to add a member to the user list.
PUT: /api/userlist/members
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
nulid |
User list node number |
uid |
User ID |
Back:
Header |
Value |
---|---|
Content-Type |
application/json |
Key |
Value |
---|---|
status |
Statut de l’ajout |