Teams Details
Asked by KRISHNA CHAITANYA REMALLI:

Hi All,

I want to get all team members details based on their teams and I want to get their escalation policy.

I want to get those details as a file format.  
Is there any option to get those details.


Answers:
author: Rafael Meira
body: Hey [@KRISHNA CHAITANYA REMALLI](/t5/user/viewprofilepage/user-id/5348240)   

You should be able to retrieve all the details of team members based on their teams and their escalation policy through Opsgenie's API.

1. Use the "List teams" API to get all teams: \`GET <https://api.opsgenie.com/v2/teams>\`

2. For each team, get members using the "Get team" API: \`GET <https://api.opsgenie.com/v2/teams/{teamId>}\`

3. Get escalation info for each member using the "Get Escalation" API: \`GET <https://api.opsgenie.com/v2/escalations/{escalationId>}\`

These responses are in JSON format.   

Also, this is done entirely from your side using our API page:  
<https://docs.opsgenie.com/docs/api-overview>  

<br />

Best,  
Rafa

comments: author: KRISHNA CHAITANYA REMALLI
body: We can I find that in Opsgenie. Can you please navigate on this


author: Rafael Meira
body: Hello [@KRISHNA CHAITANYA REMALLI](/t5/user/viewprofilepage/user-id/5348240)   

Since the usage of APIs are on your side, the links above will direct you to it.  

But if you have any questions on the API links above, please let me know.  

<br />

Best,  
Rafa


author: KRISHNA CHAITANYA REMALLI
body: If I open that API links I am getting


author: Rafael Meira
body: Hello [@KRISHNA CHAITANYA REMALLI](/t5/user/viewprofilepage/user-id/5348240)   

Can you show me what you are getting?


author: KRISHNA CHAITANYA REMALLI
body: In the white screen I am getting this message

```
{"message":"Could not authenticate","took":0.001,"requestId":"cfc91427-82af-44c3-8774-95cb1cee6560"}
```


author: Mubeen Mohammed
body: Hello [@KRISHNA CHAITANYA REMALLI](/t5/user/viewprofilepage/user-id/5348240) greetings!

The error you shared while opening the URL is expected as these are just the endpoints that can be used in your API calls to extract the requested information and not the web URLs.  

For example below Is an example API call to GET your team details.  
curl -X GET '<https://api.opsgenie.com/v2/teams/YourTeamName?identifierType=name>' --header 'Authorization: GenieKey YourAPIKEY'   

From the above API call, you need to replace the "YourTeamName" section with your Opsgenie instance team name and the "YourAPIKEY" section with your API key acquired from your Opsgenie instance.  

You are required to follow the instructions provided at <https://docs.opsgenie.com/docs/api-overview> to retrieve any information or perform any action on your Opsgenie instance using the API.  

You can also make use of the Opsgenie Analytics option available from the Analytics section of your Opsgenie. (If you don't see the Analytics tab in your instance then reach out to your Opsgenie account Admin/Owner user for access). More details about Atlassian Analytics reports can be accessed from <https://support.atlassian.com/opsgenie/docs/view-reports-and-analytics-in-opsgenie/>  

I hope the details provided are helpful.

Regards

Mubeen Mohammed

Cloud Support Engineer


Tags: cloud