Skip to content

Returns details on asynchronous jobs to modify a Group's members

Request

The calls to the POST, PUT or PATCH Groups Managements endpoints trigger a series of asynchronous jobs to create or update the list of the Group's members.

As these tasks are asynchronous, those API calls do not respond with the final list of the Group's members, but an unique Job identifier to inquire about the task.

This endpoint takes the jobId identifier, and returns details about the asynchronous job's execution.

The job could have already finished or still be running, and the response could include details on the number of members added, removed, processed, and error conditions (if any).

Security
oauth2_as_a_server(Required scopes: groups.read) or oauth2_as_a_user(Required scopes: groups.read)
Path
jobIdintegerrequired

The unique identifier of one asynchronous Job

curl -i -X GET \
  'https://partner.socialchorus.com/v2/Groups/JobReport/{jobId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Success

Bodyapplication/json
idinteger

Job unique identifier

Example:127
groupIdinteger

Group unique identifier

Example:3242
statusstring

Whether the asynchronous job is still ongoing or it has finished

Example:"finished"
requestTypestring

The type of request that launched the asynchronous job

Example:"group_update"
requestedChangesstring

JSON string wih details of the number of members to be changed by the API request

Example:"{\"create\":4,\"destroy\":7}"
requestReceivedAtstring

Date and time when the asynchronous job was launched

Example:"2024-04-11T12:59:28.043Z"
membersCreatedCountinteger

Number of members added to the group

Example:0
membersRemovedCountinteger

Number of members removed from the group

Example:1
membersProcessedCountinteger

Number of members processed. It could include additions, removals, or users ignored (for example, for being already in the group, or not being members of the program)

Example:11
membersPendingCountinteger

Number of members pending to the processed

Example:0
messagesstring

Additional details compiled during the job's execution, if any relevant applies, specially those related to the total number of members processed. For example: number of users not considered, for already being members, or users asked to be both added and removed, or system errors...

Example:"4 user(s) not added (already members?); 6 user(s) not removed (not members?)"
Response
{ "id": 127, "groupId": 3242, "status": "finished", "requestType": "group_update", "requestedChanges": "{\"create\":4,\"destroy\":7}", "requestReceivedAt": "2024-04-11T12:59:28.043Z", "membersCreatedCount": 0, "membersRemovedCount": 1, "membersProcessedCount": 11, "membersPendingCount": 0, "messages": "4 user(s) not added (already members?); 6 user(s) not removed (not members?)" }