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
Returns the list of the contacts of a user.
read:ops-config:jira-service-management
integer
integer
200OK
Returned if the request is successful.
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));
{ "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???
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.