Possible to Create a Review Task and Upload Files Using Command-Line or Other API?
Are you missing a feature? Request its implementation here.
-
- Posts: 161
- Joined: Thu Aug 30, 2018 10:06 pm
Possible to Create a Review Task and Upload Files Using Command-Line or Other API?
Post by dreifsnider »
Hi,
I have a team member looking to create a script that automatically builds DITA files. They are wanting to use an API in their script to subsequently create a Content Fusion review task and upload these generated DITA files to Content Fusion within their script.
Is this possible to do outside of the Content Fusion Connector plugin or web interface?
Thanks,
Daniel
I have a team member looking to create a script that automatically builds DITA files. They are wanting to use an API in their script to subsequently create a Content Fusion review task and upload these generated DITA files to Content Fusion within their script.
Is this possible to do outside of the Content Fusion Connector plugin or web interface?
Thanks,
Daniel
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Possible to Create a Review Task and Upload Files Using Command-Line or Other API?
Post by cristi_talau »
Hello,
Currently we do not have a public API for Content Fusion, but we acknowledge its utility and we plan to implement it in the future.
To make sure we cover your use, we would like to understand more details about how you plan to implement this script. There are two related decisions regarding an API for creating tasks:
Best,
Cristian
Currently we do not have a public API for Content Fusion, but we acknowledge its utility and we plan to implement it in the future.
To make sure we cover your use, we would like to understand more details about how you plan to implement this script. There are two related decisions regarding an API for creating tasks:
- How would your script authenticate to the CF server? On behalf of a particular user, or using a service account?
- If the script authenticates using a service account (like an API key), who would be the owner of the review task?
Best,
Cristian
-
- Posts: 161
- Joined: Thu Aug 30, 2018 10:06 pm
Re: Possible to Create a Review Task and Upload Files Using Command-Line or Other API?
Post by dreifsnider »
Hi Cristian,
Thank you for implementing this in a future Content Fusion update.
Regarding your question:
However, we can see the possibility and use case of having a service account be the one the authenticate. In this case, would it be possible to provide a parameter in the API to set the owner of the review task to a registered Content Fusion user? This parameter would default to the authenticated user if not specified.
I hope this answers your questions.
Thanks,
Daniel
Thank you for implementing this in a future Content Fusion update.
Regarding your question:
The current use case that we have is for the script to authenticate on behalf of the particular user running the script. We are currently using our company's LDAP to authenticate with Content Fusion, and so I imagine that my team member would need to provide their LDAP credentials in their script to run it. Another possible idea is that there would be a way for users to create a personal access token (PAT) and then pass this as their password to authenticate, similar to GitHub.How would your script authenticate to the CF server? On behalf of a particular user, or using a service account?
However, we can see the possibility and use case of having a service account be the one the authenticate. In this case, would it be possible to provide a parameter in the API to set the owner of the review task to a registered Content Fusion user? This parameter would default to the authenticated user if not specified.
I hope this answers your questions.
Thanks,
Daniel
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Possible to Create a Review Task and Upload Files Using Command-Line or Other API?
Post by cristi_talau »
Hello,
To authenticate from a CLI script, PAT would work, but I think it is challenging for users to manage the PAT securely and provide it every time they invoke the script. Regarding user & password, it also does not offer the best security.
In the service-account use-case, the script does not have an identity itself, so it should always provide the task owner ID. To get that ID, you would probably use an endpoint to get user ID by email. This scenario is best to use from another server aplication, e.g. an in-house CMS that knows the email of the current user.
If you can share more details on how these scripts are executed, we may come up with a better solution. For example, are they executed form a terminal, or from an integration server?
Best,
Cristian
To authenticate from a CLI script, PAT would work, but I think it is challenging for users to manage the PAT securely and provide it every time they invoke the script. Regarding user & password, it also does not offer the best security.
In the service-account use-case, the script does not have an identity itself, so it should always provide the task owner ID. To get that ID, you would probably use an endpoint to get user ID by email. This scenario is best to use from another server aplication, e.g. an in-house CMS that knows the email of the current user.
If you can share more details on how these scripts are executed, we may come up with a better solution. For example, are they executed form a terminal, or from an integration server?
Best,
Cristian
-
- Posts: 161
- Joined: Thu Aug 30, 2018 10:06 pm
Re: Possible to Create a Review Task and Upload Files Using Command-Line or Other API?
Post by dreifsnider »
Hi Cosmin,
Apologies for my delayed reply.
Apologies for my delayed reply.
That's good to hear that the script could automatically get the user ID and use this as the task owner ID. We don't use any CMS so we would need someway for the person running the script to enter their email, which would then be used to get their ID.In the service-account use-case, the script does not have an identity itself, so it should always provide the task owner ID. To get that ID, you would probably use an endpoint to get user ID by email. This scenario is best to use from another server application, e.g. an in-house CMS that knows the email of the current user.
This is still a very much proof-of-concept on our end, but our current use case is to execute the script from a terminal. We do not yet have a CLI or script language in mind (Bash, Python, etc). We might eventually end up using a combination of AWS Lambda and a GitHub webhook that could run the script automatically on a commit, for example, if some DITA files were added to a Git repository the script would execute and create a new review task and upload the committed files to Content Fusion.If you can share more details on how these scripts are executed, we may come up with a better solution. For example, are they executed form a terminal, or from an integration server?
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: Possible to Create a Review Task and Upload Files Using Command-Line or Other API?
Post by cristi_talau »
Hello,
Thanks for the details you provided. For me it seems that service account authentication would be the most appropriate for you.
I registered these details on our feature request and we will update this post when we have something that you can test.
Best,
Cristian
Thanks for the details you provided. For me it seems that service account authentication would be the most appropriate for you.
I registered these details on our feature request and we will update this post when we have something that you can test.
Best,
Cristian
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service