Blog
On this page
Operations on blog resources. 6 endpoints, each relative to https://api.nxgen.cloud/api/v1 and authenticated as described under Authentication.
POST /blog
Add a new blog to a specific hierarchy level
Request body
Add Blog
{
"title": "string (required)",
"description": "string",
"content": "string",
"accessLevel": "string (required)",
"entityId": "string (required)",
"thumbnail": "string",
"jsonSchemaResult": "object",
"isAccessRestricted": "boolean"
}Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
400 | Invalid input | |
401 | Unauthorized | |
403 | Forbidden |
Example 200 response:
{
"_id": "62ea2a8328c7c9",
"uniqueId": "afd49a39338dc",
"accessLevel": "site",
"createdBy": "developer-1@dev.de",
"createdOn": 1659513475763,
"title": "new blog",
"description": "desc",
"content": "<p>test content</p>",
"isAccessRestricted": true,
"jsonSchemaResult": {},
"thumbnail": "",
"serviceProviderId": "",
"customerId": "",
"siteId": ""
}POST /blog/filter
Gets blog list with filtering, sorting and pagination. It allows hierarchical level searching. It can be filtered using specified hierarchy or it uses the logged in user hierarchy. This gives the option to get additional entity fields in the response. Also provides configuration meta data about entity.
Request body
Blog filtering and sorting
{
"filters": [
{
"columnName": "string (required)",
"type": "distinctList | date | number | StringConditionFilter (required)",
"filter": "object (required)"
}
],
"sortOrder": [
{
"columnName": "string",
"isAscending": "boolean"
}
],
"primaryColumns": [
"string"
],
"hierarchyLevel": "string",
"hierarchyId": "string",
"nPerPage": "number",
"pageNumber": "number",
"isConfigDetailRequired": "boolean",
"getConfig": "boolean",
"getChildOrParent": "boolean"
}Responses
Status | Description | Body |
|---|---|---|
200 | Success | object |
204 | No Content | |
400 | Invalid input | |
401 | Unauthorized | |
403 | Forbidden |
Example 200 response:
{
"dataResult": [
{
"_id": "62d76c65104ef771f6a11f0c",
"uniqueId": "62d76c65104ef771f6a11f0cas1209ji",
"title": "Blog 1",
"description": "description 1",
"accessLevel": "serviceprovider",
"isPublished": true,
"publishedOn": 1658285307,
"createdBy": "developer-1@dev.de",
"createdOn": 1658285307,
"modifiedBy": "",
"modifiedOn": 1658285307
},
{
"_id": "62d76f78104ef771f6a11f0e",
"uniqueId": "156c67kiokio04ef771f6a11f0cas1209ji",
"title": "Blog 2",
"description": "description 2",
"accessLevel": "serviceprovider",
"isPublished": true,
"publishedOn": 1658285307,
"createdBy": "developer-1@dev.de",
"createdOn": 1658285307,
"modifiedBy": "",
"modifiedOn": 1658285307
}
],
"totalRecordsCount": 15
}GET /blog/{id}
Get blog by Id
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
400 | Invalid input | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
Example 200 response:
{
"_id": "62ea2a8328c7c9",
"uniqueId": "afd49a39338dc",
"accessLevel": "site",
"createdBy": "developer-1@dev.de",
"createdOn": 1659513475763,
"modifiedBy": "developer-1@dev.de",
"modifiedOn": 1659514047995,
"title": "new blog",
"description": "desc",
"content": "<p>test content</p>",
"isAccessRestricted": true,
"jsonSchemaResult": {},
"thumbnail": "",
"serviceProviderId": "",
"customerId": "",
"siteId": ""
}PUT /blog/{id}
Update an existing blog
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body
To update a blog, provide the existing Id
{
"title": "string",
"description": "string",
"content": "string",
"thumbnail": "string",
"jsonSchemaResult": "object",
"isAccessRestricted": "boolean"
}Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
400 | Invalid input | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
Example 200 response:
{
"_id": "62ea2a8328c7c9",
"uniqueId": "afd49a39338dc",
"accessLevel": "site",
"createdBy": "developer-1@dev.de",
"createdOn": 1659513475763,
"modifiedBy": "developer-1@dev.de",
"modifiedOn": 1659514047995,
"title": "new blog",
"description": "desc",
"content": "<p>test content</p>",
"isAccessRestricted": true,
"jsonSchemaResult": {},
"thumbnail": "",
"serviceProviderId": "",
"customerId": "",
"siteId": ""
}PATCH /blog/{id}
Patch to publish the blog
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body
To publish the blog
{
"isPublished": "boolean"
}Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
Example 200 response:
{
"isSuccess": true
}DELETE /blog/{id}
Delete a blog by Id
Parameters
Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Responses
Status | Description | Body |
|---|---|---|
200 | Success | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
Example 200 response:
{
"isSuccess": true
}Thank you — your feedback goes to the team that owns this page.