Complete Jira newbie here. I am writing my client in C#. I want to query User Stories by project and get a list of them which I will put in a CSV. I'm nervous about experimenting because I don't want to risk messing up any data. As far I can tell my api token is not a read-only token. There must be a recent/current end-to-end example of how to get a list of User Stories, via C#, which includes number, title/name and history/state-changes. Google has let me down so I'm here for the first time :)
Hi @Keith Thomas ,
Welcome to the community!
Jira offers a REST API which is what your client is most likely going to use. The way Jira's REST API is implemented follows the standards when it comes to http verbs, ie. as long as you only send a GET request, you will not mess up any data.
Your API token is basically you, it has the same permissions and can do the same things you can do when using the browser. Some people create functional users with limited permissions and use their API tokens to limit their scripts. Or you can get an app like ours (API Key Manager for Jira), to create custom, limited use API keys. But to be honest, I think you'll be fine with your API token and sticking with GET requests for the time being.
As for getting issues via API, I believe you'll want to use the JQL API, which allows you to retrieve all issues matching a JQL query, like this one for example:
issuetype = Story and project = "Your project"
Finally, there is also a developer community which you should definitely check out.
Hope that helps,
Oliver
Hi @Keith Thomas & welcome to the community,
I would recommend you take a look at https://www.nuget.org/packages/Atlassian.SDK and especially at https://bitbucket.org/farmas/atlassian.net-sdk/src/6af77fe0531977c11f97231e49899e5a89cf0f8a/docs/how-to-use-the-sdk.md
Good luck!
Rudy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, almost there. I've installed the Nuget Package but can't use the code snippets as I don't have a full example, i.e. nothing that includes a "using" statement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, the example uses username and password instead of the api key.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.