Get Articles by Tag ID
URL: /api/article/byTag/:tag_id
Method: GET
Description: This endpoint retrieves all articles associated with a specific tag, identified by
its tag_id. It allows users to filter articles based on tags for more targeted access to content.
Parameters
- Path Parameter:
:tag_id (string) – Required. The unique identifier of
the tag whose associated articles you want to retrieve.
Request Example
This request fetches all articles with the tag ID "672f5b529193b532be4c612b".
GET /api/article/byTag/672f5b529193b532be4c612b
Responses
Success (200 OK)
A successful response will return a JSON object containing an array of articles associated with the specified
tag_id. Each article includes details like title, content, author, and other relevant metadata.
{
"status": "success",
"data": [
{
"_id": "671f5bb19993b532be4c3482",
"tags": [
"672f5b529193b532be4c612b",
"672f2b529191b532be4c615c"
],
"moderators": [
"64edcfba8eaf76400c6c2efa"
],
"author": {
"_id": "64edcfba8eaf76400c6c2efa",
"is": {
},
"data": {
},
"thumb": "/assets/default.png",
"email": "email@example.com",
"reg_email": "email@example.com",
"tools": [],
"projects": [],
"skills": [],
"languages": [],
"upwork_skills": [],
"__v": 0
},
"title": "The Future of Computational Intelligence",
"description": "This article explores the future of computational intelligence...",
"shortDescription": "In this article...",
"__v": 0
}
]
}
404 Not Found
The requested tag ID does not exist or has no associated articles.
{
"status": "error",
"message": "No articles found for the specified tag ID."
}
Response Fields
status (string): Status of the response, either "success" or "error".
data (array): List of articles associated with the given tag ID.
-
_id (string): Unique identifier of the article.
-
tags (array of strings): Array of tag IDs associated with the article.
-
moderators (array of strings): Array of user IDs who moderate the article.
-
author (object): An object containing author details:
-
_id (string): Unique identifier for the author.
-
is (object): Reserved for additional author metadata.
-
data (object): Reserved for additional author data.
-
thumb (string): URL to the author's profile picture or thumbnail.
-
email (string): Author's email address.
-
reg_email (string): Author's registered email address.
-
tools (array): Array of tools associated with the author.
-
projects (array): Array of projects associated with the author.
-
skills (array): Array of skills associated with the author.
-
languages (array): Array of languages associated with the author.
-
upwork_skills (array): Array of Upwork skills associated with the author.
-
__v (integer): Version key for the document (usually set to 0 initially).
-
title (string): Title of the article.
-
description (string): The full description of the article.
-
shortDescription (string): The short description of the article.
-
__v (integer): Version key for the document (usually set to 0 initially).
Notes
- Ensure that the
tag_id provided in the request URL is valid and corresponds to a tag in the system.
- If no articles are found for the given
tag_id, a 404 response will be returned.
Get Articles by Author ID
URL: /api/article/byAuthor/:author_id
Method: GET
Description: This endpoint retrieves all articles written by a specific author, identified by
their author_id. It provides users with a way to access articles authored by a particular individual.
Parameters
- Path Parameter:
:author_id (string) – Required. The unique identifier of the
author whose articles you want to retrieve.
Request Example
This request fetches all articles written by the author with ID "64edcfba8eaf76400c6c2efa".
GET /api/article/byAuthor/64edcfba8eaf76400c6c2efa
Responses
Success (200 OK)
A successful response will return a JSON object containing an array of articles written by the specified author. Each
article includes details such as title, content, tags, and other relevant metadata.
{
"status": "success",
"data": [
{
"_id": "671f5bb19993b532be4c3482",
"tags": [
"672f5b529193b532be4c612b",
"672f2b529191b532be4c615c"
],
"moderators": [
"64edcfba8eaf76400c6c2efa"
],
"author": {
"_id": "64edcfba8eaf76400c6c2efa",
"is": {
},
"data": {
},
"thumb": "/assets/default.png",
"email": "email@example.com",
"reg_email": "email@example.com",
"tools": [],
"projects": [],
"skills": [],
"languages": [],
"upwork_skills": [],
"__v": 0
},
"title": "The Future of Computational Intelligence",
"description": "This article explores the future of computational intelligence...",
"shortDescription": "In this article...",
"__v": 0
}
]
}
404 Not Found
The requested author ID does not exist or has no associated articles.
{
"status": "error",
"message": "No articles found for the specified author ID."
}
Response Fields
status (string): Status of the response, either "success" or "error".
data (array): List of articles written by the given author ID.
-
_id (string): Unique identifier of the article.
-
tags (array of strings): Array of tag IDs associated with the article.
-
moderators (array of strings): Array of user IDs who moderate the article.
-
author (object): An object containing author details:
-
_id (string): Unique identifier for the author.
-
is (object): Reserved for additional author metadata.
-
data (object): Reserved for additional author data.
-
thumb (string): URL to the author's profile picture or thumbnail.
-
email (string): Author's email address.
-
reg_email (string): Author's registered email address.
-
tools (array): Array of tools associated with the author.
-
projects (array): Array of projects associated with the author.
-
skills (array): Array of skills associated with the author.
-
languages (array): Array of languages associated with the author.
-
upwork_skills (array): Array of Upwork skills associated with the author.
-
__v (integer): Version key for the document (usually set to 0 initially).
-
title (string): Title of the article.
-
description (string): The full description of the article.
-
shortDescription (string): The short description of the article.
-
__v (integer): Version key for the document (usually set to 0 initially).
Notes
- Ensure that the
author_id provided in the request URL is valid and corresponds to an author in the system.
- If no articles are found for the given
author_id, a 404 response will be returned.
Get Local Tags by Author ID
URL: /api/article/tags/:author_id
Method: GET
Description: This endpoint retrieves a list of tags used by a specific author, identified by
their author_id. It allows users to access tags that have been used locally within the context of
articles written by the specified author.
Parameters
- Path Parameter:
:author_id (string) – Required. The unique identifier
of the author whose local tags you want to retrieve.
Request Example
This request fetches all tags used by the author with ID "64edcfba8eaf76400c6c2efa".
GET /api/article/tags/64edcfba8eaf76400c6c2efa
Responses
Success (200 OK)
A successful response will return a JSON object containing an array of tags used in the articles written by the
specified author. Each tag includes details such as its ID, name, description, author, and assigned moderators.
{
"status": "success",
"data": [
{
"_id": "672f5b529193b532be4c612b",
"moderators": [
"64edcfba8eaf76400c6c2efa"
],
"author": "64edcfba8eaf76400c6c2efa",
"name": "computational",
"description": "Techniques and methods for solving complex problems using algorithms and computational systems.",
"__v": 0
},
{
"_id": "672f2b529191b532be4c615c",
"moderators": [
"64edcfba8eaf76400c6c2efa"
],
"author": "64edcfba8eaf76400c6c2efa",
"name": "intelligence",
"description": "Exploration of smart systems and cognitive technologies that enable decision-making and problem-solving.",
"__v": 0
},
{
"_id": "672f2b519161b322b14c6150",
"moderators": [
"64edcfba8eaf76400c6c2efa"
],
"author": "64edcfba8eaf76400c6c2efa",
"name": "physics",
"description": "Study of natural laws and phenomena governing matter, energy, and their interactions.",
"__v": 0
}
]
}
404 Not Found
The requested author ID does not exist or has no associated tags.
{
"status": "error",
"message": "No tags found for the specified author ID."
}
Response Fields
status (string): Status of the response, either "success" or "error".
data (array): List of tags used by the given author ID.
-
_id (string): Unique identifier of the tag.
-
moderators (array of strings): Array of user IDs who are moderators for the tag.
-
author (string): User ID of the tag's author.
-
name (string): The name of the tag.
-
description (string): The description of the tag.
-
__v (integer): Version key for the document (usually set to 0 initially).
Notes
- Ensure that the
author_id provided in the request URL is valid and corresponds to an author in the system.
- If no tags are found for the given
author_id, a 404 response will be returned.
Get All Authors
URL: /api/article/authors
Method: GET
Description: This endpoint retrieves a list of all authors who have contributed articles. It allows users to see
the complete set of authors, including their information such as name and ID.
Parameters
- No Parameters: This endpoint does not require any path or query parameters.
Request Example
This request fetches a list of all available authors.
GET /api/article/authors
Response
Success (200 OK)
A successful response will return a JSON object containing an array of authors. Each author object provides detailed information
including ID, name, contact information, skills, and professional details.
{
"status": "success",
"data": [
{
"tools": [],
"projects": [],
"skills": [],
"languages": [],
"upwork_skills": [],
"_id": "64edd4b88eaf76400c6c2f32",
"thumb": "/api/user/image/64edd4b88eaf76400c6c2f32.jpg?1693913757053",
"is": {
"admin": false,
"designer": true,
"agent": true
},
"email": "angelina@webart.work",
"reg_email": "angelina@webart.work",
"data": {
"phone": "+380965951600",
"bio": null,
"role": "Junior HTML/CSS Developer \nAgent",
"location": "Kamianets-Podilskiy",
"upwork_link": null
},
"__v": 0,
"name": "Angelina"
},
{
"tools": [],
"projects": [],
"skills": [],
"languages": [],
"upwork_skills": [],
"_id": "64edd4c28eaf76400c6c2f38",
"thumb": "/api/user/image/64edd4c28eaf76400c6c2f38.jpg?1693309031910",
"is": {
"admin": false,
"designer": true
},
"email": "artem@webart.work",
"reg_email": "artem@webart.work",
"data": {
"phone": "+38 093 293 62 65",
"bio": "I am proficient in HTML, CSS and JavaScript, and my experience will help you create web applications that...",
"role": "Junior Frontend Developer",
"location": "Kamianets-Podilsky",
"upwork_link": null
},
"__v": 0,
"name": "Artem"
}
]
}
Response Fields
status (string): Status of the response, either "success" or "error".
data (array): List of of author profile objects.
-
tools (array): Array of tools associated with the author.
-
projects (array): Array of projects associated with the author.
-
skills (array): Array of skills associated with the author.
-
languages (array): Array of languages associated with the author.
-
upwork_skills (array): Array of Upwork skills associated with the author.
-
_id (string): Unique identifier of the author.
-
thumb (string): URL to the author's profile picture or thumbnail.
-
is (object): Reserved for additional author metadata.
-
email (string): Author's email address.
-
reg_email (string): Author's registered email address.
-
data (object): Reserved for additional author data:
-
phone (string): Author's phone number.
-
bio (string): Short biography of the author.
-
role (string): Author's current role or job title.
-
location (string): Author's location.
-
upwork_link (string): Link to the author's Upwork profile.
-
__v (integer): Version key for the document (usually set to 0 initially).
-
name (string): Author's name.
Notes
- This endpoint returns a complete list of all authors in the system.
Get Author by Author ID
URL: /api/article/author/:author_id
Method: GET
Description: This endpoint retrieves details about a specific author, identified by their author_id. It
allows users to access detailed information about an individual author.
Parameters
- Path Parameter:
:author_id (string) – Required. The unique identifier of the author whose
details you want to retrieve.
Request Example
This request fetches details of the author with ID "64edd4c28eaf76400c6c2f38".
GET /api/article/author/64edd4c28eaf76400c6c2f38
Responses
Success (200 OK)
A successful response will return a JSON object containing details of the specified author. Author object provides detailed information
including ID, name, contact information, skills, and professional details.
{
"status": "success",
"data": {
"tools": [],
"projects": [],
"skills": [],
"languages": [],
"upwork_skills": [],
"_id": "64edd4c28eaf76400c6c2f38",
"thumb": "/api/user/image/64edd4c28eaf76400c6c2f38.jpg?1693309031910",
"is": {
"admin": false,
"designer": true
},
"email": "artem@webart.work",
"reg_email": "artem@webart.work",
"data": {
"phone": "+38 093 293 62 65",
"bio": "I am proficient in HTML, CSS and JavaScript, and my experience will help you create web applications that...",
"role": "Junior Frontend Developer",
"location": "Kamianets-Podilsky",
"upwork_link": null
},
"__v": 0,
"name": "Artem"
}
}
404 Not Found
The requested author ID does not exist in the system.
{
"status": "error",
"message": "Author not found for the specified ID."
}
Response Fields
status (string): Status of the response, either "success" or "error".
data (object): Details of the specified author.
-
tools (array): Array of tools associated with the author.
-
projects (array): Array of projects associated with the author.
-
skills (array): Array of skills associated with the author.
-
languages (array): Array of languages associated with the author.
-
upwork_skills (array): Array of Upwork skills associated with the author.
-
_id (string): Unique identifier of the author.
-
thumb (string): URL to the author's profile picture or thumbnail.
-
is (object): Reserved for additional author metadata.
-
email (string): Author's email address.
-
reg_email (string): Author's registered email address.
-
data (object): Reserved for additional author data:
-
phone (string): Author's phone number.
-
bio (string): Short biography of the author.
-
role (string): Author's current role or job title.
-
location (string): Author's location.
-
upwork_link (string): Link to the author's Upwork profile.
-
__v (integer): Version key for the document (usually set to 0 initially).
-
name (string): Author's name.
Notes
- Ensure that the
author_id provided in the request URL is valid and corresponds to an author in the system.
- If the
author_id is invalid, a 404 response will be returned.