On this page:

Didit API tutorial

Our API reference site is located here. This document shows you how to use some of the APIs as examples. You can treat this page as a starting API tutorial for your development. In each section of this page, we will describe a specific scenario that you could use each API endpoint for and give you tips on how to best use that API.

Getting started

In order to use our reference page you will need to create an API key in Didit. Please note that this API key is different than a general Atlassian API key. Didit has a specific API key that needs to get created and an Atlassian API key is not usable for the Didit API.

After you create the API key in Didit, make sure you authorize our API reference page to test it out.

The Didit API reference page with the Authorize button highlighted.
The Didit API reference page with the Authorize button highlighted.

It’s important that you type “ApiKey ” before you input your API key. The space after “ApiKey” is required. Your input to the authorize field should look something like this.

ApiKey 09235lkjaslkdfj23509sdfjl134-=`-24jlkasflkj2019358lkjasfklnlkxncasdfojh12498yjkn235n23kj53
An example of authorizing an API key in the Didit reference page.
An example of authorizing an API key in the Didit reference page.

Get all templates

One of the first API functions you might want to use is to get all templates. You can do this with our reference page. Be sure to click “Try out” first and then “Execute” to see how it works. The result will provide you with a curl script which can help you run the same function from your own machine.

An example of getting all templates with the checklist API.
An example of getting all templates with the checklist API.

The “Get all templates” API is useful if you want to programatically view all the templates in your Didit instance. Some instances could have hundreds or thousands of templates and having a list outside of Didit could be useful if you want to update some of the templates quickly. You could also use this API to view all checklist templates and ensure they meet compliance standards.

Create a new checklist template

Another handy API function is to create a template. You can do this with our reference page. Be sure to first authorize your account and then click “Try out” and then “Execute” to see how it works. If successful, you can see the new template in your instance. We provide some dummy checklist items to show you how to format your request. You can edit this to have your own checklist tasks, titles, and descriptions. There are a number of other options available to you when creating a template via API, check out the code on the reference page to discover more.

The entire process of creating a new template from the Didit API References page.
The entire process of creating a new template from the Didit API References page.

One use case for this API could be creating project onboarding templates when new repositories are created in Github/Bitbucket. Depending on the repository settings, you could generate a checklist template in your Jira and Confluence instance. Another use for this API is creating employee offboarding templates when HR systems detect departures. Depending on what department the employee belonged to, you could have a different checklist template created.

Update a checklist task in a checklist instance

You can also update the status of individual tasks in a Didit checklist instance using our API reference page. On top of this, you can add a note to the task or add an image. To find the instanceID, look at the end of the URL for the target checklist instance.

An example of updating a checklist from the Didit API references page.
An example of updating a checklist from the Didit API references page.

This API is useful if you want to update a checklist task when something happens in another tool. For example, if a release was deployed, you could check a task off for that in a checklist instance. Another example could be when doing system backups to mark a task “Database backup verified” when the backup is complete. Finally, if you are doing security scans, you could mark a security scan task as complete and attach scan reports to the corresponding Jira issue.

Create a checklist instance based on a checklist template

This API function allows you to create a checklist instance from a template. Using our reference page, you just need to reference the template UID in the first row and give the new checklist instance a name in the second row.

An example of creating a checklist based on a template via API.
An example of creating a checklist based on a template via API.

If you have standard processes in Jira and/or Confluence but they are often triggered by actions in external tools, this is a great API to work with. One use case for this API is when a deal is closed in your company’s CRM (i.e Salesforce or Hubspot), you could automatically create a project kickoff checklist. If you have signed up a customer for your SaaS product, you could create a customer onboarding checklist. Another example could be when a monitoring system detects an outage, you could use this API to create an incident response checklist.

Create a template-less checklist instance

You can create ad-hoc checklists via API as well. You just need to have a checklist name as well as a UID and title for each of your tasks. The reference page provides you with a good JSON template to start creating your code.

An example of how to create a checklist without it being based on a template.
An example of how to create a checklist without it being based on a template.

Not all checklists can be templatized. So, in some cases, you may need to create an ad-hoc checklist. You can use this API to create a custom troubleshooting checklist based on error codes or a system status. Another use case is a personalized onboarding checklist based on a new employee role and department. Finally, you could also create an audit checklist with tasks populated from a compliance database.

Link to this page: https://seibert.biz/diditapiguide