Retrieve ALL users contacts in JSM OPS

Michail Kotantakis
Contributor
February 5, 2025

Hello team

 

Could someone help with any advice in regards to how we can retrieve the contacts of all users in thenew JSM OPS ?

We have migrated fromops genie to JSM and i am testing the APIS, and all i can get is the contacts of my user , so the user of the API key in use( i am org admin)

I am using the List contacts endpoint

 

GET

List contactsExperimental

Returns the list of the contacts of a user.

OAuth 2.0 scopes required:
read:ops-config:jira-service-management

Request

Query parameters

Expand all
offset

integer

size

integer

Responses

200OK

Returned if the request is successful.

application/json

PaginatedResponseContactWithApplyOrderResponse
Show child properties

401Unauthorized404Not Found422Unprocessable Entity

/ This code sample uses the 'node-fetch' library: // https://www.npmjs.com/package/node-fetch const fetch = require('node-fetch'); fetch('https://api.atlassian.com/jsm/ops/api/{cloudId}/v1/users/contacts', { method: 'GET', headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:<api_token>' ).toString('base64')}`, 'Accept': 'application/json' } }) .then(response => { console.log( `Response: ${response.status} ${response.statusText}` ); return response.text(); }) .then(text => console.log(text)) .catch(err => console.error(err));
200Response
{ "values": [ { "id": "299003c3-8221-4a9f-b63d-2370c4caaaaa", "method": "email", "to": "test@example.com", "status": { "enabled": true }, "applyOrder": 0 }, { "id": "735a619b-e420-4d46-ab5c-45523011aaaa", "method": "sms", "to": "90-555-555-5555", "status": { "enabled": true }, "applyOrder": 1 } ], "links": { "next": "url?offset=2&size=1", "last": "url?offset=2&size=1" } }



Is there a way to pass any user identifier and get this user's contacts???

 

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events