### Get a list of users (JSON Response Example) Source: https://developer.claromentis.com/latest/api/people.html This is an example of the JSON response when retrieving a list of users. It includes user data and pagination information. ```json { "data": [ { "id": 1, "firstname": "Claromentis", "surname": "Administrator" }, { "id": 2, "firstname": "Joe", "surname": "Bloggs" } ], "paging": { "offset": 0, "limit": 2, "total": 61, "prev": "", "next": "http://host.name/intranet/rest/people/users/?limit=2&offset=2" } } ``` -------------------------------- ### Get List of Projects Example Source: https://developer.claromentis.com/latest/api/expenses.html This JSON array represents a list of projects. Each project object contains a unique ID and the project's name. ```json [ { "id": 78, "name": "Project A" },{ "id": 79, "name": "Project B" }] ``` -------------------------------- ### Example: Sort users by first name (ascending) Source: https://developer.claromentis.com/latest/api/people.html Use the 'sort' parameter with a column name to sort the user list in ascending order. For example, 'firstname' sorts by first name. ```http /people/users/?sort=firstname ``` -------------------------------- ### Get List of Clients Example Source: https://developer.claromentis.com/latest/api/expenses.html This JSON array represents a list of clients. Each client object contains a unique ID and the client's name. ```json [ { "id": 43, "name": "Client A" },{ "id": 45, "name": "Client B" }] ``` -------------------------------- ### Get a badge response format Source: https://developer.claromentis.com/latest/api/badges.html Example JSON response returned when retrieving a single badge by ID. ```json { "id": 1, "title": "Badge name", "description": "A badge", "image_id": 25, "image": "/intranet/badges/images/024-thinking.svg", "background_colour": "B71C1C", "status": "live", "created_by": { "id": 1, "name": "Claromentis Administrator" }, "created_date": { "date_str": "15-10-2019 11:28", "timezone": "Europe/London", "date": "20191015102837" }, "modified_by": [], "modified_date": { "date_str": "15-10-2019 11:28", "timezone": "Europe/London", "date": "20191015102837" }, "archived_by": [], "archived_date": [], "assigned": [ { "assigned_by": { "id": 1, "name": "Claromentis Administrator" }, "assigned_to": { "id": 1, "name": "Claromentis Administrator", "image_url": "/intranet/people/images/no_photo.jpg", "profile_url": "/people/user/73935872" }, "assigned_date": { "date": { "date_str": "15-10-2019 11:29", "timezone": "Europe/London", "date": "20191015102952" } }, "message": "Congratulations on being awarded this badge" } ] } ``` -------------------------------- ### Example: Sort users by company (descending) Source: https://developer.claromentis.com/latest/api/people.html Use the 'sort' parameter with a minus sign prefix and a column name to sort the user list in descending order. For example, '-company' sorts by company name descending. ```http /people/users/?sort=-company ``` -------------------------------- ### Retrieve Thank You Notes Response Source: https://developer.claromentis.com/latest/api/thankyou.html Example JSON response for a successful GET request to the /thanks endpoint. ```json { "data": [ { "id": 12, "description": "Thank you!", "author": { "id": 12, "name": "John Doe" }, "date_created": { "date": "2023-01-01T00:00:00.000Z", "timezone_type": 3, "timezone": "Europe/London" }, "users": [ { "id": 12, "name": "John Doe" } ] } ], "pagination": { "offset": 0, "limit": 20, "total": 100, "prev": "/api/thankyou/v3/thanks?offset=20&limit=20", "next": "/api/thankyou/v3/thanks?offset=20&limit=20" } } ``` -------------------------------- ### Example: Filter users by name with trailing wildcard Source: https://developer.claromentis.com/latest/api/people.html Use the 'name_filter' parameter with a trailing asterisk to match names or surnames that start with the specified string. ```http /people/users/?name_filter=*son ``` -------------------------------- ### GET /projects Source: https://developer.claromentis.com/latest/api/infocapture.html Retrieves a list of InfoCapture projects with optional filtering and pagination. ```APIDOC ## GET /projects ### Description List InfoCapture projects available in the system. ### Method GET ### Endpoint /projects ### Parameters #### Query Parameters - **limit** (integer) - Optional - The number of items to return - **offset** (integer) - Optional - The number of items to offset results by - **status** (string) - Optional - Project status filter. 'active', 'blocked', 'testing', or empty value for no filter. ### Response #### Success Response (200) - **data** (array) - The list of projects - **pagination** (object) - Pagination metadata #### Response Example { "data": [ { "id": 123, "name": "Issue tracker", "description": "Software issue tracker system", "status": { "id": 1, "name": "Active" }, "url": "https://yourintranet.com/intranet/infocapture/project.php?project_id=123" } ], "pagination": { "offset": 0, "limit": 1, "total": 100 } } ``` -------------------------------- ### Upload Single File Example Source: https://developer.claromentis.com/latest/api/documents.html A minimal JSON payload for uploading a single document. ```json { "title": "A new file.doc", "refcode": "REF_1", "type": "document", "doc_type": "standard", "is_draft": false, "components": [ { "file_key": "ASvVhDNN1COpao3gfqZt1SVOpwwRODSc", "is_primary": true } ] } ``` -------------------------------- ### Get List of Departments Example Source: https://developer.claromentis.com/latest/api/expenses.html This JSON array represents a list of departments. Each department object contains a unique ID and the department's name. ```json [ { "id": 97, "name": "AFM" },{ "id": 103, "name": "BD" }] ``` -------------------------------- ### Get Project Expense Item Example Source: https://developer.claromentis.com/latest/api/expenses.html This JSON structure represents a project-related expense item. It includes details such as ID, type, receipt date, vendor, client, project information, billable status, expense type, description, and amount. ```json { "id" : 9, "type":"project", "receipt_date" : { "date_str" : "13-05-2011 18:13 ICT", "timezone" : "Asia/Novosibirsk", "date" : "20110513111311" }, "vendor" : "City Cab", "client" : "Bill & Melinda Gates Found.", "project" : { "id" : 7, "name" : "Project A" }, "billable" : true, "expense_type" : { "id" : 5, "name" : "Travel and Entertainment" }, "description" : "Travel to client", "amount" : 40.00 } ``` -------------------------------- ### GET /intranet/rest/expenses/project Source: https://developer.claromentis.com/latest/api/expenses.html Retrieves a list of projects. ```APIDOC ## GET /intranet/rest/expenses/project ### Description Returns a list of all available projects. ### Method GET ### Endpoint /intranet/rest/expenses/project ### Response #### Success Response (200) - **id** (number) - Unique id of the project - **name** (string) - Name of the project #### Response Example [{ "id": 78, "name": "Project A" },{ "id": 79, "name": "Project B" }] ``` -------------------------------- ### User Information JSON Response Source: https://developer.claromentis.com/latest/api/people.html Example JSON structure for a single user's information. ```json { "id": 1, "firstname": "Claromentis", "surname": "Administrator", "email": "admin@claromentis.com" } ``` -------------------------------- ### Custom Pagination Response Source: https://developer.claromentis.com/latest/api/people-v2.html Example response when using custom limit and offset query parameters. ```json { "data": [ Array of 100 User objects ], "pagination": { "offset": 200, "limit": 100, "total": 400, "prev": "https://yourintranet.com/api/people/v2/users?limit=100&offset=100", "next": "https://yourintranet.com/api/people/v2/users?limit=100&offset=300" } } ``` -------------------------------- ### GET /projects/{id} Source: https://developer.claromentis.com/latest/api/infocapture.html Retrieves the details of a specific project by its unique ID. ```APIDOC ## GET /projects/{id} ### Description Retrieves the project returned by ID. ### Method GET ### Endpoint /projects/{id} ### Parameters #### Path Parameters - **id** (integer) - Required - Unique project ID ### Response #### Success Response (200) - **id** (integer) - Project ID - **name** (string) - Project name - **description** (string) - Project description - **status** (object) - Project status details - **issues_url** (string) - URL to project issues #### Response Example { "id": 123, "name": "Issue tracker", "description": "Software issue tracker system", "status": { "id": 1, "name": "Active" }, "issues_url": "https://yourintranet.com/api/infocapture/v1/projects/123/issues" } ``` -------------------------------- ### Get image sets Source: https://developer.claromentis.com/latest/api/badges.html Retrieves a list of available image sets. ```APIDOC ## GET /api/badges/image-sets ### Description Returns a JSON-formatted array of image sets. Each set contains an ID and a title. ### Method GET ### Endpoint `/api/badges/image-sets` ### Response #### Success Response (200) - **id** (number) - The unique image set ID. - **title** (string) - The name of the image set. ### Response Example ```json [ { "id": 1, "title": "Claromentis default set" } ] ``` ### Notes In the initial version of Badges, image sets are fixed as 0 = custom images, 1 = pre-defined icons. This may change in later versions. ``` -------------------------------- ### GET /projects/{projectID} Source: https://developer.claromentis.com/latest/api/infocapture.html Retrieves a specific InfoCapture project by its unique identifier. ```APIDOC ## GET /projects/{projectID} ### Description Get an InfoCapture project by ID. ### Method GET ### Endpoint /projects/{projectID} ### Parameters #### Path Parameters - **projectID** (integer) - Required - The unique identifier of the project. ### Response #### Success Response (200) - **data** (Project) - Contains the project object. - **id** (integer) - ID of the project. - **name** (string) - Project's name. - **description** (string) - Project's description, usually describing the purpose of the project. - **status** (ProjectStatus) - Project status. - **id** (integer) - ID of the project's status. - **name** (string) - Project's status name. - **project_icon** (string) - Project's icon. - **project_icon_color** (string(color)) - Project icon's hexadecimal color code. - **description_simple** (string) - Short project description. - **description_rich** (string) - Full project description. - **handle_incoming_mail** (bool) - Whether the project handles incoming emails for creating issues. - **from_address** (string(email)) - The "From" address to use for outbound emails for the project. - **statuses_enabled** (bool) - Whether the project has issue statuses enabled. - **assigned_enabled** (bool) - Whether the project's issues can be assigned to users. - **likes_enabled** (bool) - Whether likes are enabled for project issues. - **external_submission_enabled** (bool) - Whether external submissions from guest users are enabled for the project. - **issues_id_prefix** (string) - Prefix for issue IDs. - **codename** (string) - Project codename. - **primary_field** (string,null) - Primary field symname for the project's issues. - **plugin_name** (string) - InfoCapture plugin name. - **tags** (array of Tag) - Project's assigned tags. - **statuses** (array of IssueStatus) - Project's available issue statuses. - **code** (string) - Issue status code. - **label** (string) - Issue status label. - **description** (string) - Issue status description. - **color** (string) - Issue status's hexadecimal color code. - **archives** (bool) - Whether issues in the status are archived automatically, after `archive_idle_time` days. - **archive_idle_time** (integer) - Number of days after which issues in the status are archived. - **url** (string) - Project's web URL. - **issues_url** (string) - API URL for retrieving the project's issues. - **pagination** (object) - Standard pagination object. - **offset** (integer) - The number of items results are offset by. - **limit** (integer) - The number of items returned. - **total** (integer) - The total number of items. - **prev** (string,null) - URL to the previous page of items. - **next** (string,null) - URL to the next page of items. #### Error Response (401) - **error** (boolean) - The error flag. - **message** (string) - The error message. - **code** (integer) - The HTTP response status code. #### Error Response (404) - **error** (boolean) - The error flag. - **message** (string) - The error message. - **code** (integer) - The HTTP response status code. ``` -------------------------------- ### Default Pagination Response Source: https://developer.claromentis.com/latest/api/people-v2.html Example of the pagination metadata included in collection responses, defaulting to 20 items. ```json { "data": [ Array of 20 User objects ], "pagination": { "offset": 0, "limit": 20, "total": 300, "prev": null, "next": "https://yourintranet.com/api/people/v2/users?offset=20" } } ``` -------------------------------- ### Example: Pagination parameters Source: https://developer.claromentis.com/latest/api/people.html Use the 'limit' and 'offset' query string parameters to control pagination. The maximum limit is 500 records. ```http /people/users/?limit=30&offset=60 ``` -------------------------------- ### Get List of Locations Example Source: https://developer.claromentis.com/latest/api/expenses.html This JSON array represents a list of locations. Each location object contains a unique ID and the location's name. ```json [ { "id": 3, "name": "DC" },{ "id": 9, "name": "CH" }] ``` -------------------------------- ### Create User Source: https://developer.claromentis.com/latest/api/people-v2.html Creates a new user with the provided details. ```APIDOC ## POST /users ### Description Creates a new user. ### Method POST ### Endpoint /users ### Request Body - **username** (string) - Required - The username for the new user. - **firstname** (string) - Required - The first name of the user. - **surname** (string) - Required - The surname of the user. - **email** (string) - Required - The email address of the user. - **password** (string) - Optional - The password for the user. Local users cannot log in without this. - **blocked** (bool) - Optional - Whether the user is blocked. Defaults to `false`. - **company** (string) - Optional - The company the user belongs to. - **extranet_id** (int) - Optional - The extranet ID. Defaults to the Primary Extranet ID. - **job_title** (string) - Optional - The job title of the user. - **user_code** (string) - Optional - A custom user code. - **language** (string) - Optional - The language code for the user (e.g., 'en', 'ru'). Defaults to the system language. - **metadata** (object) - Optional - Metadata values for the user. ### Request Example ```json { "username": "JSmith", "blocked": false, "firstname": "Jane", "surname": "Smith", "email": "jane.smith@jsconsulting.co.uk", "password": "correcthorsebatterystaple", "company": "Jane Smith Consulting Ltd", "extranet_id": 1, "job_title": "Managing Director", "user_code": "user12345", "language": "en", "metadata": {} } ``` ### Response #### Success Response (200) - **User Object** (object) - The newly created user object. #### Response Example { "id": 101, "username": "JSmith", "blocked": false, "firstname": "Jane", "surname": "Smith", "email": "jane.smith@jsconsulting.co.uk", "company": "Jane Smith Consulting Ltd", "extranet_id": 1, "job_title": "Managing Director", "user_code": "user12345", "language": "en", "metadata": {} } ``` -------------------------------- ### Example: Filter users by keywords Source: https://developer.claromentis.com/latest/api/people.html Use the 'query' parameter for keywords and optionally 'query_area' to specify fields and 'query_type' (AND/OR) to refine the search. ```http query query_area query_type ``` -------------------------------- ### Get Operational Expense Item Example Source: https://developer.claromentis.com/latest/api/expenses.html This JSON structure represents an operational expense item. It includes details such as ID, type, receipt date, vendor, department, expense type, description, and amount. ```json { "id" : 145, "type" : "operational", "receipt_date" : { "date_str" : "13-05-2011 18:13 ICT", "timezone" : "Asia/Novosibirsk", "date" : "20110513111311" }, "vendor" : "AT&T", "dept": { "id" : 4, "name" : "AFM" }, "expense_type": { "id" : 3, "name" : "Cell Phone" }, "description": "International Call", "amount": 200.00 } ``` -------------------------------- ### List Projects Response Source: https://developer.claromentis.com/latest/api/infocapture.html Successful response containing a list of projects and pagination metadata. ```json { "data": [ { "id": 123, "name": "Issue tracker", "description": "Software issue tracker system", "status": { "id": 1, "name": "Active" }, "project_icon": "glyphicons-notes-2", "project_icon_color": "string", "description_simple": "string", "description_rich": "string", "handle_incoming_mail": null, "from_address": "user@example.com", "statuses_enabled": null, "assigned_enabled": null, "likes_enabled": null, "external_submission_enabled": null, "issues_id_prefix": "EXAMPLE", "codename": "string", "primary_field": "string", "plugin_name": "string", "tags": [ "string" ], "statuses": [ { "code": "new", "label": "New", "description": "New ticket", "color": "fff0f0", "archives": null, "archive_idle_time": 0 } ], "url": "https://yourintranet.com/intranet/infocapture/project.php?project_id=123", "issues_url": "https://yourintranet.com/api/infocapture/v1/projects/123/issues" } ], "pagination": { "offset": 0, "limit": 1, "total": 100, "prev": "string", "next": "string" } } ``` -------------------------------- ### Retrieve Project Details Response Source: https://developer.claromentis.com/latest/api/infocapture.html Successful response containing project metadata and configuration. Includes status definitions and relevant URLs. ```json { "id": 123, "name": "Issue tracker", "description": "Software issue tracker system", "status": { "id": 1, "name": "Active" }, "project_icon": "glyphicons-notes-2", "project_icon_color": "string", "description_simple": "string", "description_rich": "string", "handle_incoming_mail": null, "from_address": "user@example.com", "statuses_enabled": null, "assigned_enabled": null, "likes_enabled": null, "external_submission_enabled": null, "issues_id_prefix": "EXAMPLE", "codename": "string", "primary_field": "string", "plugin_name": "string", "tags": [ "string" ], "statuses": [ { "code": "new", "label": "New", "description": "New ticket", "color": "fff0f0", "archives": null, "archive_idle_time": 0 } ], "url": "https://yourintranet.com/intranet/infocapture/project.php?project_id=123", "issues_url": "https://yourintranet.com/api/infocapture/v1/projects/123/issues" } ``` -------------------------------- ### Get Lists of Groups, Roles, or Extranets Source: https://developer.claromentis.com/latest/api/people.html Retrieve lists of groups, roles, or extranet areas using their respective GET endpoints. An optional 'query' parameter can filter results by keywords. ```http GET /intranet/rest/people/groups/ ``` ```http GET /intranet/rest/people/roles/ ``` ```http GET /intranet/rest/people/extranets/ ``` ```http ...?query=managers ``` -------------------------------- ### Get Single User Information Source: https://developer.claromentis.com/latest/api/people.html Retrieve user information for a specific user ID using the GET request. Optional parameters include 'fields' for specific properties or 'fieldset' for predefined property sets. ```http GET /intranet/rest/people/users/:user_id?fields=id,firstname,surname,email ``` ```http GET /intranet/rest/people/users/:user_id?fieldset=profile ``` -------------------------------- ### Metadata Formatting Guidelines Source: https://developer.claromentis.com/latest/api/metadata.html Detailed instructions on how to structure metadata fields within JSON requests for object creation or updates. ```APIDOC ## Metadata Formatting ### Description Metadata in Claromentis supports various data types, inheritance from parent objects, and repeatable values. Requests must be formatted according to the specific metadata type. ### Metadata Types #### Simple Types - String, Integer, Checkbox, Single Select, Indicator - Format: Key/Value pair (e.g., `"field": "value"`) - Note: Checkboxes use boolean or 0/1. Indicators use the text value before the comma. #### Multiple Select - Format: Array of strings or a single comma-separated string. - Example: `"mult_select": ["Red", "Green"]` or `"mult_select_2": "Red,Green"` #### Date and Datetime - Format: Associative array with keys `date` (8 or 14 digit), `date_str_set`, `time_str_set`, and `timezone`. - Example: `{"date_str_set": "2011-09-30", "time_str_set": "17:21", "timezone": "Asia/Novosibirsk"}` #### Hyperlink - Format: Object with `url` and `title` keys, or a single string with URL and title separated by a linebreak (0xA). - Example: `{"url": "http://example.com", "title": "Link"}` ### Inheritance - To inherit from a parent, set the value to: `{"_inherit": true}` or `{"_inherit": 1}` ### Repeatable Metadata - If a field is repeatable, the value must always be provided as an array, where each element follows the format of the specific metadata type. ``` -------------------------------- ### GET /intranet/rest/expenses/location Source: https://developer.claromentis.com/latest/api/expenses.html Retrieves a list of locations. ```APIDOC ## GET /intranet/rest/expenses/location ### Description Returns a list of all available locations. ### Method GET ### Endpoint /intranet/rest/expenses/location ### Response #### Success Response (200) - **id** (number) - Unique id of the location - **name** (string) - Name of the location #### Response Example [{ "id": 3, "name": "DC" },{ "id": 9, "name": "CH" }] ``` -------------------------------- ### Example: Filter users by role IDs Source: https://developer.claromentis.com/latest/api/people.html Use the 'roles' query string parameter with a comma-separated list of numeric role IDs to filter users belonging to all specified roles. ```http /people/users/?roles=NN[,NN[,..]] ``` -------------------------------- ### GET /intranet/rest/expenses/dept Source: https://developer.claromentis.com/latest/api/expenses.html Retrieves a list of departments. ```APIDOC ## GET /intranet/rest/expenses/dept ### Description Returns a list of all available departments. ### Method GET ### Endpoint /intranet/rest/expenses/dept ### Response #### Success Response (200) - **id** (number) - Unique id of the department - **name** (string) - Name of the department #### Response Example [{ "id": 97, "name": "AFM" },{ "id": 103, "name": "BD" }] ``` -------------------------------- ### GET /intranet/rest/expenses/client Source: https://developer.claromentis.com/latest/api/expenses.html Retrieves a list of clients. ```APIDOC ## GET /intranet/rest/expenses/client ### Description Returns a list of all available clients. ### Method GET ### Endpoint /intranet/rest/expenses/client ### Response #### Success Response (200) - **id** (number) - Unique id of the client - **name** (string) - The name of the client #### Response Example [{ "id": 43, "name": "Client A" },{ "id": 45, "name": "Client B" }] ``` -------------------------------- ### Example: Filter users by extranet IDs Source: https://developer.claromentis.com/latest/api/people.html Use the 'extranets' query string parameter with a comma-separated list of numeric extranet IDs to filter users belonging to all specified extranets. ```http /people/users/?extranets=NN[,NN[,..]] ``` -------------------------------- ### GET /extranets/primary Source: https://developer.claromentis.com/latest/api/people-v2.html Retrieves the current primary extranet. ```APIDOC ## GET /extranets/primary ### Description Get the current primary extranet. ### Method GET ### Endpoint /extranets/primary ``` -------------------------------- ### Create a draft document Source: https://developer.claromentis.com/latest/api/documents.html Upload a document in draft status by setting the is_draft parameter to true in the request body. ```http POST intranet/rest/documents/folder/:id/documents/ ``` -------------------------------- ### GET /user Source: https://developer.claromentis.com/latest/api/people-v2.html Retrieves the currently authenticated user object. ```APIDOC ## GET /user ### Description Get the currently authenticated User. ### Method GET ### Endpoint /user ### Response #### Success Response (200) - **User Object** (object) - The currently authenticated user. ``` -------------------------------- ### Field Set Info JSON Response Source: https://developer.claromentis.com/latest/api/people.html Example JSON structure detailing user attribute fields within a fieldset. ```json [ { "name": "fullname", "type": "text", "repeatable": "false" }, { "name": "emailad", "type": "text", "repeatable": "false" }, { "name": "meta_file", "type": "file", "repeatable": "true" }, ] ``` -------------------------------- ### Get a single article Source: https://developer.claromentis.com/latest/api/knowledgebase.html Retrieves a specific article by its ID. ```APIDOC ## GET /intranet/rest/knowledgebase/articles/:article_id ### Description Retrieves the specific article matching the provided :article_id. ### Method GET ### Endpoint /intranet/rest/knowledgebase/articles/:article_id ### Path Parameters - **article_id** (integer) - Required - The unique identifier of the article to retrieve. ### Response #### Success Response (200) - **article** (object) - The article object matching the :article_id. #### Response Example ```json { "id": 1, "title": "Example Article", "category_id": 5, "publisher_id": 10, "language": "en", "creation_date": "2023-10-27T10:00:00Z", "endorsed_by": 2, "endorsed_date": "2023-10-27", "enable_comments": true, "status": "publish", "article_text": "

This is the content of the article.

" } ``` ``` -------------------------------- ### GET /intranet/rest/knowledgebase/categories Source: https://developer.claromentis.com/latest/api/knowledgebase.html Retrieves a list of all available categories in the knowledgebase. ```APIDOC ## GET /intranet/rest/knowledgebase/categories ### Description Retrieves a list of all categories within the knowledgebase. ### Method GET ### Endpoint /intranet/rest/knowledgebase/categories ### Response #### Success Response (200) - **categories** (array) - An array of category objects. #### Response Example [ { "id": 5, "name": "category name", "text": "description of category", "plain_text": "text version of category description", "parent_id": 2, "only_experts_answer": 0, "created_by": 1, "created_date": "20170628095534", "modified_by": 1, "modified_date": "20170628110156", "user_can_create_question": false, "user_can_create_article": false, "user_can_subscribe": false, "user_is_subscribed": false, "user_is_subscribed_to_parent": false, "parent": { "id": 2, "name": "parent category name", "plain_text": "" }, "subcategories": [] } ] ``` -------------------------------- ### POST /intranet/rest/knowledgebase/questions/ Source: https://developer.claromentis.com/latest/api/knowledgebase.html Creates a new knowledgebase question within a specific category. ```APIDOC ## POST /intranet/rest/knowledgebase/questions/ ### Description Add a new question to a category. ### Method POST ### Endpoint /intranet/rest/knowledgebase/questions/ ### Parameters #### Request Body - **title** (string) - Required - Title for the question - **text** (string) - Required - Main text for the question, including HTML - **category_id** (number) - Required - The id of the category the question belongs to ### Request Example { "title": "Can I ask a question?", "text": "

lorem ipsum dolor sit amet

", "category_id": 1 } ``` -------------------------------- ### GET /intranet/rest/documents/document/:doc_id/versions Source: https://developer.claromentis.com/latest/api/documents.html Retrieves a list of all versions for a specific document. ```APIDOC ## GET /intranet/rest/documents/document/:doc_id/versions ### Description Returns a JSON-formatted array of document versions for the specified document ID. ### Method GET ### Endpoint /intranet/rest/documents/document/:doc_id/versions ### Parameters #### Path Parameters - **doc_id** (number) - Required - The unique identifier of the document. ### Response #### Success Response (200) - **version_num** (number) - The version number - **is_latest** (boolean) - true if this is the latest version - **title** (string) - The filename of the component - **date_last_modified** (mixed array) - Date when this version was last modified - **modified_by** (mixed array) - Id and full name of user who last modified this version - **version_comment** (string) - A user-created comment - **URI** (string) - URI to access the specific version #### Response Example [ { "version_num": 2, "is_latest": true, "title": "404.php", "date_last_modified": { "date_str": "29-08-2011 13:43 NOVST", "timezone": "Asia/Novosibirsk", "date": "20110829064336" }, "modified_by": { "id": 12, "name": "Alexander Polyanskikh" }, "version_comment": "Improved errors handling", "URI": "http://server.name/intranet/rest/documents/document/389/2/" } ] ``` -------------------------------- ### Create Thank You Note Response Source: https://developer.claromentis.com/latest/api/thankyou.html Example JSON response for a successful POST request to create a thank you note. ```json { "id": 12, "description": "Thank you!", "author": { "id": 12, "name": "John Doe" }, "date_created": { "date": "2023-01-01T00:00:00.000Z", "timezone_type": 3, "timezone": "Europe/London" }, "users": [ { "id": 12, "name": "John Doe" } ] } ``` -------------------------------- ### Get User by ID Source: https://developer.claromentis.com/latest/api/people-v2.html Retrieves a specific user by their unique ID. ```APIDOC ## GET /users/{id} ### Description Retrieves the user matching the provided `{id}`. ### Method GET ### Endpoint /users/{id} ### Parameters #### Path Parameters - **`id`** (int) - Required - The unique identifier of the user. ### Response #### Success Response (200) - **User Object** (object) - The user object if found. #### Error Response (404) - **Not Found** - If the user with the specified ID is not found. #### Response Example { "id": 1, "username": "jdoe", "firstname": "John", "surname": "Doe", "email": "john.doe@example.com", "blocked": false, "company": "Example Corp", "job_title": "Developer", "language": "en" } ``` -------------------------------- ### Get Document Component List Source: https://developer.claromentis.com/latest/api/documents.html Retrieve a list of all components (files) associated with a specific document version. Each component includes its title, size, URI, and a flag indicating if it's the primary component. ```json { '0': { 'title': "version_two_of_document.docx", 'size': 143, 'URI': "http://server.name/intranet/rest/documents/document/390/file/version_two_of_document.docx", 'primary': true }, '1': { 'title': "version_one_of_document.docx", 'size': 3757, 'URI': "http://server.name/intranet/rest/documents/document/390/file/version_two_of_document.docx", } } ``` -------------------------------- ### Get images in all sets Source: https://developer.claromentis.com/latest/api/badges.html Retrieves all images across all image sets. ```APIDOC ## GET /api/badges/image-sets/images ### Description Returns a JSON-formatted array of image data for all images in all sets. ### Method GET ### Endpoint `/api/badges/image-sets/images` ### Response #### Success Response (200) - **id** (number) - The unique image ID. - **image_url** (string) - The URL of the image. - **set_id** (number) - The ID of the image set this image belongs to. ### Response Example ```json [ { "id": 1, "image_url": "/badges/images/1", "set_id": 1 } ] ``` ``` -------------------------------- ### Create a new user Source: https://developer.claromentis.com/latest/api/people-v2.html Payload structure for creating a new user via POST /users. ```json { "username" : "JSmith", "blocked" : false, "firstname" : "Jane", "surname" : "Smith", "email" : "jane.smith@jsconsulting.co.uk", "password" : "correcthorsebatterystaple", "company" : "Jane Smith Consulting Ltd", "extranet_id" : 1, "job_title" : "Managing Director", "user_code" : "user12345", "language" : "en", "metadata" : {Metadata Object} } ``` -------------------------------- ### Example: Filter users by name with leading and trailing wildcards Source: https://developer.claromentis.com/latest/api/people.html Use the 'name_filter' parameter with both leading and trailing asterisks for a simple substring search within first name and surname. ```http /people/users/?name_filter=*son* ``` -------------------------------- ### GET /api/badges/badges Source: https://developer.claromentis.com/latest/api/badges.html Retrieves a list of badges with optional filtering parameters. ```APIDOC ## GET /api/badges/badges ### Description Retrieves a list of badges. This endpoint supports filtering by assigned user, unassigned users, status, and search terms. It can also include assignee information. ### Method GET ### Endpoint /api/badges/badges ### Query Parameters - **assigned_to** (string) - Optional - Filter badges by assigned user ID. - **not_assigned_to** (string) - Optional - Filter badges not assigned to a user ID. If both `assigned_to` and `not_assigned_to` are provided, `not_assigned_to` will be ignored. - **status** (string) - Optional - Filter badges by status. Accepted values: `live`, `archived`, `all`. Defaults to `live`. - **search** (string) - Optional - Filter badges by title or description. - **include_assignees** (boolean) - Optional - If set to `true`, includes an array of user IDs and names for users who have each badge. ### Response #### Success Response (200) Returns a JSON-formatted array of badge objects. Each badge object contains details such as id, title, description, image URL, status, creation/modification dates, and optionally assignees and assignment details. #### Response Example ```json { "id": 5, "title": "Creative Thinker", "description": "Thinks outside the box, solves problems in a creative way ", "image_id": 256, "image": "/appdata/badges/256.jpg?1563285324", "background_colour": "689F38", "status": "live", "created_by": { "id": 1234, "name": "Michael Christian" }, "created_date": { "date_str" : "2011-04-08 18:13:00", "timezone" : "Asia/Novosibirsk", "date" : "20110513111311" }, "modified_by": { "id": 1234, "name": "Michael Christian" }, "modified_date": { "date_str" : "2011-05-13 18:13:00", "timezone" : "Asia/Novosibirsk", "date" : "20110513111311" }, "assignees": [ { "id": 1, "name": "Claromentis administrator", "profileUrl": "/people/user/73935872", "imageUrl": "/appdata/people/1.jpg?1558630388" } ], "assigned": { "assigned_by": { "id": 1234, "name": "Michael Christian" }, "assigned_to": { "id": 1, "name": "Claromentis Administrator", "image_url": "/appdata/people/1.jpg?1558630388", "profile_url": "/people/user/73935872" }, "assigned_date": { "date_str" : "2011-05-13 18:13:00", "timezone" : "Asia/Novosibirsk", "date" : "20110513111311" }, "message": "Congratulations" } } ``` ### Badge Object Fields - **id** (number) - The unique badge id. - **title** (string) - The name of the badge. - **description** (string) - Detailed description of the badge. - **image_id** (number) - ID of the image associated with the badge. - **image** (string) - URL of the badge image. - **background_colour** (string) - CSS compatible colour stored as three 8-bit hex values (rrggbb). - **status** (string) - Status of the badge. See status values above. - **created_by** (number) - The user ID of the person that created this badge. - **created_date** (object) - Date the badge was created. - **modified_by** (number) - The user ID of the person that last modified this badge. - **modified_date** (object) - Date the badge was last modified. - **assignees** (array) - User ID and name for users with this badge. Only present if the `include_assignees` parameter is set to `true`. - **assigned** (object) - User info and date for this badge assignment. Only present if the `assigned_to` parameter is set to a user_id. ``` -------------------------------- ### Create a Tag Source: https://developer.claromentis.com/latest/api/thankyou.html Creates a new tag in the system. You can specify the tag's name, active status, and background color. ```APIDOC ## POST /tags ### Description Create the core value (tag). ### Method POST ### Endpoint /tags ### Request Body - **active** (boolean) - Optional - Whether the tag is active. - **name** (string) - Required - The name of the tag. - **bg_colour** (string) - Optional - The tag's background color in RGB hex code. ### Request Example ```json { "active": true, "name": "Tag 1", "bg_colour": "#00adef" } ``` ### Response #### Success Response (200) - **boolean** - Indicates if the tag was successfully created (true) or not (false). #### Error Response (401) - **error** (boolean) - The error flag. - **message** (string) - The error message. - **code** (integer) - The HTTP response status code. #### Error Response (404) - **error** (boolean) - The error flag. - **message** (string) - The error message. - **code** (integer) - The HTTP response status code. ``` -------------------------------- ### Get Folder Content Source: https://developer.claromentis.com/latest/api/documents.html Retrieves the content (documents and subfolders) of a specified folder. ```APIDOC ## GET /intranet/rest/documents/folder/:id ### Description Retrieves a JSON-formatted array of documents and subfolders contained within the specified folder. Subfolders are returned first, followed by documents. ### Method GET ### Endpoint `/intranet/rest/documents/folder/:id` ### Parameters #### Query Parameters - **metadata** (string) - Optional - Comma-separated metadata keys to include (e.g., `description,comment`). - **num** (number) - Optional - Maximum number of items to return (page size). - **start** (number) - Optional - Zero-based offset for pagination. Only effective if `num` is specified. ### Response #### Success Response (200) Returns a JSON-formatted array of folder and document objects. The format for each object is consistent with the details provided in the 'Get Folder List' endpoint response. ``` -------------------------------- ### Object Specification by Properties (Folder) Source: https://developer.claromentis.com/latest/api/documents.html Specifies a folder using its properties for mass operations. ```json { "type": "folder", "id": 123, } ```