I am trying to get activity stream of my jira instance using the below api and it is not working , can anybody point me in the right direction ?
Asked
Active
Viewed 8,142 times
4
-
I don't see any REST API "below". Could you be more concrete? What do you have already as resource, what have you tried, with what result? The question is very open and should be closed if not given more concrete. What does "get activity stream" means? – mliebelt Dec 25 '14 at 21:21
-
hi , i am trying to fetch my activity stream from my jira instance , as results are in Atom XML format and i have used the api given on the jira documentation site to display those feeds in my iOS application but it is not giving me the exact results. i have used http://localhost:3990/jira/rest/activities/1.0/ with my JIRA instace host name but it is not generating any results. Please let me know if you have any answers. – rteja Dec 25 '14 at 21:58
-
And all of that should be part of your question. Please read the FAQ before posting here ... – mliebelt Dec 25 '14 at 22:05
2 Answers
1
You should check this page out: https://developer.atlassian.com/docs/atlassian-platform-common-components/activity-streams/consuming-an-activity-streams-feed
The Atom feed of the activity stream works well only if you also log in in your feed reader.

Koshinae
- 2,240
- 2
- 30
- 40
1
Here is an example of consuming the activity stream through the Jira API using Basic Authentication. This is in C#, but the basic pattern can be applied anywhere:
string myJiraUsername = "username";
string myJiraPassword = "password"; //or API token
string authenticationHeaderValue = Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes(myJiraUsername + ":" + myJiraPassword));
System.Net.Http.HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", authenticationHeaderValue);
Task<HttpResponseMessage> task = client.GetAsync("https://mycompany.atlassian.net/activity");
task.Wait();
HttpResponseMessage response = task.Result;
string resultOfApiCall = "";
if (response.IsSuccessStatusCode)
{
resultOfApiCall = response.Content.ReadAsStringAsync().Result;
Console.WriteLine("This was returned by your API request:\n" + resultOfApiCall);
}

Josh Withee
- 9,922
- 3
- 44
- 62