Back to Collection Items
integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_QueryParams
oleobject loo_Resp
oleobject loo_SbResponseBody
oleobject loo_JResp
integer li_RespStatusCode
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loo_Http = create oleobject
// Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
li_rc = loo_Http.ConnectToNewObject("Chilkat.Http")
if li_rc < 0 then
destroy loo_Http
MessageBox("Error","Connecting to COM object failed")
return
end if
loo_QueryParams = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_QueryParams.ConnectToNewObject("Chilkat.JsonObject")
loo_QueryParams.UpdateInt("start",0)
loo_QueryParams.UpdateInt("limit",200)
loo_Resp = loo_Http.QuickRequestParams("GET","https://your-domain.atlassian.net/wiki/rest/api/group/:groupName/member",loo_QueryParams)
if loo_Http.LastMethodSuccess = 0 then
Write-Debug loo_Http.LastErrorText
destroy loo_Http
destroy loo_QueryParams
return
end if
loo_SbResponseBody = create oleobject
// Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat.StringBuilder")
loo_Resp.GetBodySb(loo_SbResponseBody)
loo_JResp = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_JResp.ConnectToNewObject("Chilkat.JsonObject")
loo_JResp.LoadSb(loo_SbResponseBody)
loo_JResp.EmitCompact = 0
Write-Debug "Response Body:"
Write-Debug loo_JResp.Emit()
li_RespStatusCode = loo_Resp.StatusCode
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode >= 400 then
Write-Debug "Response Header:"
Write-Debug loo_Resp.Header
Write-Debug "Failed."
destroy loo_Resp
destroy loo_Http
destroy loo_QueryParams
destroy loo_SbResponseBody
destroy loo_JResp
return
end if
destroy loo_Resp
destroy loo_Http
destroy loo_QueryParams
destroy loo_SbResponseBody
destroy loo_JResp
Curl Command
curl -G -d "start=0"
-d "limit=200"
https://your-domain.atlassian.net/wiki/rest/api/group/:groupName/member
Postman Collection Item JSON
{
"name": "Get group members",
"request": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/api/group/:groupName/member?start=0&limit=200",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"group",
":groupName",
"member"
],
"query": [
{
"key": "start",
"value": "0",
"description": "The starting index of the returned users."
},
{
"key": "limit",
"value": "200",
"description": "The maximum number of users to return per page.\nNote, this may be restricted by fixed system limits."
}
],
"variable": [
{
"key": "groupName",
"value": "<string>",
"type": "string",
"description": "(Required) The name of the group to be queried for its members."
}
]
},
"description": "Returns the users that are members of a group.\n\nUse updated Get group API\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\nPermission to access the Confluence site ('Can use' global permission)."
},
"response": [
{
"name": "Returned if the requested users are returned.",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/api/group/:groupName/member?start=0&limit=200",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"group",
":groupName",
"member"
],
"query": [
{
"key": "start",
"value": "0"
},
{
"key": "limit",
"value": "200"
}
],
"variable": [
{
"key": "groupName"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "null"
},
{
"name": "Returned if the calling user does not have permission to view users.",
"originalRequest": {
"method": "GET",
"header": [
],
"url": {
"raw": "{{baseUrl}}/api/group/:groupName/member?start=0&limit=200",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"group",
":groupName",
"member"
],
"query": [
{
"key": "start",
"value": "0"
},
{
"key": "limit",
"value": "200"
}
],
"variable": [
{
"key": "groupName"
}
]
}
},
"status": "Forbidden",
"code": 403,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
}
]
}