- 08 Mar 2023
- 3 Minutes to read
- Contributors
- Print
- DarkLight
Create and publish multiple articles
- Updated on 08 Mar 2023
- 3 Minutes to read
- Contributors
- Print
- DarkLight
Creating new articles is one of the actions you would often perform in Document360. Creating and publishing multiple articles with API allows you to automate the authoring process.
You can create articles in any version. You are not restricted to only one version.
For example, you can create 2 articles in a category present in the V1 version and 3 articles in another category in the V2 version at the same time.
Publishing articles in this method can be done much faster and easier. Publishing each article separately will require more effort.
Basic requirements for creating articles
To create an article, you need the below values:
- Project version id
- Category id
- User id
Get Project version id
- Under Document360 Customer API, expand v2 → Project Versions
- Click Gets list of project versions → Send
This action will display all the versions available in the project - Copy the desired project version id available next to the 'id' property and paste it into notepad or the preferred space
Get Category id
- Under Project Versions, expand {project Version Id} and click Get the list of categories within project version
- In the Params tab, you can find the Path Variables section
- In the 'Value' field of projectVersionId, paste the project id copied in step 3 and click Send
This action will display all the categories in the desired version - Copy the desired category id available next to the 'id' property and paste it into notepad or the preferred space
Get User id
- Under v2, expand Teams and click Get all team accounts → Send
This action will display all the team accounts in the project. - Copy the desired user id available next to the 'id' property and paste it into notepad or the preferred space
Create multiple articles
- Under v2, expand Articles and click Adds multiple articles
- Navigate to the Body tab in the main window
The properties inside a JSON object '{}' apply to one article.
- By default, the properties for two sample articles are available. To add more articles, copy the object with article properties, and paste them the desired number of times at the bottom of the object
For example, If you want to create five more articles, copy the object with the article properties and paste them five times.
- When you paste at the bottom of the section, ensure that you paste it before close bracket ']'
- Ensure that you add a comma ',' next to all the close brace '}'
- Update all the properties available in the object:
- category_id - Paste the desired category id
- project_version_id - Paste the desired project version id
- title - Add the desired article title
- user_id - Paste the desired user id
- content - Add the desired article content
- order - Specify the desired position of the article in the category. Enter the previous number of the desired position
For example, If you want the new article to appear as the first in the category, enter the order property value as 0.
If you wish for the new article to appear as the fifth article in the category, enter the order property value as 4.
You can add articles into different categories and project versions. You are not restricted to articles within only one category or version.
- Click Send
- The new articles are created successfully. You can verify this with the 200 OK status and success property value as true
- Copy all article id's available next to the 'id' property and paste them into notepad or preferred space
Publish multiple articles
To publish multiple articles, you need the following values:
- Article id
- User id
Follow the below steps to publish multiple articles:
- Under v2, expand Articles and click Publishes multiple articles
- Navigate to the Body tab in the main window
The properties inside a JSON object '{}' apply to one article.
- By default, the properties for two sample articles are available. To publish more articles, copy the properties with the braces, and paste them the desired number of times at the bottom of the object
For example, If you want to publish five more articles, copy the article properties with braces and paste them five times.
- When you paste at the bottom of the object, ensure that you paste it before close bracket ']'
- Ensure that you add a comma ',' next to all the close brace '}'
- You can find the below properties:
- article_id - Paste the desired article id
- user_id - Paste the desired user id
- version_number - Add the desired article version number
- publish_message - Add the desired publish message for the article
- Click Send
- The desired articles are published successfully. You can verify this with the 200 OK status and success property value as true