Chilkat Online Tools

PureBasic / Support API / List Activities

Back to Collection Items

IncludeFile "CkJsonObject.pb"
IncludeFile "CkStringBuilder.pb"
IncludeFile "CkHttp.pb"
IncludeFile "CkHttpResponse.pb"

Procedure ChilkatExample()

    ; This example assumes the Chilkat API to have been previously unlocked.
    ; See Global Unlock Sample for sample code.

    http.i = CkHttp::ckCreate()
    If http.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    success.i

    CkHttp::setCkBasicAuth(http, 1)
    CkHttp::setCkLogin(http, "login")
    CkHttp::setCkPassword(http, "password")

    queryParams.i = CkJsonObject::ckCreate()
    If queryParams.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckUpdateString(queryParams,"since","<string>")

    CkHttp::ckSetRequestHeader(http,"Accept","application/json")

    resp.i = CkHttp::ckQuickRequestParams(http,"GET","https://example.zendesk.com/api/v2/activities",queryParams)
    If CkHttp::ckLastMethodSuccess(http) = 0
        Debug CkHttp::ckLastErrorText(http)
        CkHttp::ckDispose(http)
        CkJsonObject::ckDispose(queryParams)
        ProcedureReturn
    EndIf

    sbResponseBody.i = CkStringBuilder::ckCreate()
    If sbResponseBody.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkHttpResponse::ckGetBodySb(resp,sbResponseBody)

    jResp.i = CkJsonObject::ckCreate()
    If jResp.i = 0
        Debug "Failed to create object."
        ProcedureReturn
    EndIf

    CkJsonObject::ckLoadSb(jResp,sbResponseBody)
    CkJsonObject::setCkEmitCompact(jResp, 0)

    Debug "Response Body:"
    Debug CkJsonObject::ckEmit(jResp)

    respStatusCode.i = CkHttpResponse::ckStatusCode(resp)
    Debug "Response Status Code = " + Str(respStatusCode)
    If respStatusCode >= 400
        Debug "Response Header:"
        Debug CkHttpResponse::ckHeader(resp)
        Debug "Failed."
        CkHttpResponse::ckDispose(resp)

        CkHttp::ckDispose(http)
        CkJsonObject::ckDispose(queryParams)
        CkStringBuilder::ckDispose(sbResponseBody)
        CkJsonObject::ckDispose(jResp)
        ProcedureReturn
    EndIf

    CkHttpResponse::ckDispose(resp)

    ; Sample JSON response:
    ; (Sample code for parsing the JSON response is shown below)

    ; {
    ;   "activities": [
    ;     {
    ;       "actor": {
    ;         "name": "<string>",
    ;         "active": "<boolean>",
    ;         "alias": "<string>",
    ;         "chat_only": "<boolean>",
    ;         "created_at": "<string>",
    ;         "custom_role_id": "<integer>",
    ;         "default_group_id": "<integer>",
    ;         "details": "<string>",
    ;         "email": "<string>",
    ;         "external_id": "<string>",
    ;         "iana_time_zone": "<string>",
    ;         "id": "<integer>",
    ;         "last_login_at": "<string>",
    ;         "locale": "<string>",
    ;         "locale_id": "<integer>",
    ;         "moderator": "<boolean>",
    ;         "notes": "<string>",
    ;         "only_private_comments": "<boolean>",
    ;         "organization_id": "<integer>",
    ;         "phone": "<string>",
    ;         "photo": {
    ;           "adipisicing7": 56151302,
    ;           "irure_70": true
    ;         },
    ;         "remote_photo_url": "<string>",
    ;         "report_csv": "<boolean>",
    ;         "restricted_agent": "<boolean>",
    ;         "role": "<string>",
    ;         "role_type": "<integer>",
    ;         "shared": "<boolean>",
    ;         "shared_agent": "<boolean>",
    ;         "shared_phone_number": "<boolean>",
    ;         "signature": "<string>",
    ;         "suspended": "<boolean>",
    ;         "tags": "<array>",
    ;         "ticket_restriction": "<string>",
    ;         "time_zone": "<string>",
    ;         "two_factor_auth_enabled": "<boolean>",
    ;         "updated_at": "<string>",
    ;         "url": "<string>",
    ;         "user_fields": {
    ;           "tempor_f": 85786252.44695336
    ;         },
    ;         "verified": "<boolean>"
    ;       },
    ;       "actor_id": "<integer>",
    ;       "created_at": "<string>",
    ;       "id": "<integer>",
    ;       "object": {
    ;         "officia1a2": true,
    ;         "qui9": "voluptate mollit Excepteur ipsum veniam",
    ;         "irure_1cd": "id ea"
    ;       },
    ;       "target": {
    ;         "sede8": false
    ;       },
    ;       "title": "<string>",
    ;       "updated_at": "<string>",
    ;       "url": "<string>",
    ;       "user": {
    ;         "name": "<string>",
    ;         "active": "<boolean>",
    ;         "alias": "<string>",
    ;         "chat_only": "<boolean>",
    ;         "created_at": "<string>",
    ;         "custom_role_id": "<integer>",
    ;         "default_group_id": "<integer>",
    ;         "details": "<string>",
    ;         "email": "<string>",
    ;         "external_id": "<string>",
    ;         "iana_time_zone": "<string>",
    ;         "id": "<integer>",
    ;         "last_login_at": "<string>",
    ;         "locale": "<string>",
    ;         "locale_id": "<integer>",
    ;         "moderator": "<boolean>",
    ;         "notes": "<string>",
    ;         "only_private_comments": "<boolean>",
    ;         "organization_id": "<integer>",
    ;         "phone": "<string>",
    ;         "photo": {
    ;           "Ut975": -74534220.66145113,
    ;           "magna3e": false
    ;         },
    ;         "remote_photo_url": "<string>",
    ;         "report_csv": "<boolean>",
    ;         "restricted_agent": "<boolean>",
    ;         "role": "<string>",
    ;         "role_type": "<integer>",
    ;         "shared": "<boolean>",
    ;         "shared_agent": "<boolean>",
    ;         "shared_phone_number": "<boolean>",
    ;         "signature": "<string>",
    ;         "suspended": "<boolean>",
    ;         "tags": "<array>",
    ;         "ticket_restriction": "<string>",
    ;         "time_zone": "<string>",
    ;         "two_factor_auth_enabled": "<boolean>",
    ;         "updated_at": "<string>",
    ;         "url": "<string>",
    ;         "user_fields": {
    ;           "ut_d": "tempor",
    ;           "adipisicing_7": 28937910,
    ;           "magna_9": -45754090.269199036
    ;         },
    ;         "verified": "<boolean>"
    ;       },
    ;       "user_id": "<integer>",
    ;       "verb": "<string>"
    ;     },
    ;     {
    ;       "actor": {
    ;         "name": "<string>",
    ;         "active": "<boolean>",
    ;         "alias": "<string>",
    ;         "chat_only": "<boolean>",
    ;         "created_at": "<string>",
    ;         "custom_role_id": "<integer>",
    ;         "default_group_id": "<integer>",
    ;         "details": "<string>",
    ;         "email": "<string>",
    ;         "external_id": "<string>",
    ;         "iana_time_zone": "<string>",
    ;         "id": "<integer>",
    ;         "last_login_at": "<string>",
    ;         "locale": "<string>",
    ;         "locale_id": "<integer>",
    ;         "moderator": "<boolean>",
    ;         "notes": "<string>",
    ;         "only_private_comments": "<boolean>",
    ;         "organization_id": "<integer>",
    ;         "phone": "<string>",
    ;         "photo": {
    ;           "aliquipb6": false
    ;         },
    ;         "remote_photo_url": "<string>",
    ;         "report_csv": "<boolean>",
    ;         "restricted_agent": "<boolean>",
    ;         "role": "<string>",
    ;         "role_type": "<integer>",
    ;         "shared": "<boolean>",
    ;         "shared_agent": "<boolean>",
    ;         "shared_phone_number": "<boolean>",
    ;         "signature": "<string>",
    ;         "suspended": "<boolean>",
    ;         "tags": "<array>",
    ;         "ticket_restriction": "<string>",
    ;         "time_zone": "<string>",
    ;         "two_factor_auth_enabled": "<boolean>",
    ;         "updated_at": "<string>",
    ;         "url": "<string>",
    ;         "user_fields": {
    ;           "euc13": "pariatur"
    ;         },
    ;         "verified": "<boolean>"
    ;       },
    ;       "actor_id": "<integer>",
    ;       "created_at": "<string>",
    ;       "id": "<integer>",
    ;       "object": {
    ;         "pariatur_39": -13246316,
    ;         "voluptate_8": false,
    ;         "ipsum4": -24640571
    ;       },
    ;       "target": {
    ;         "est_d": 43464084.60404679
    ;       },
    ;       "title": "<string>",
    ;       "updated_at": "<string>",
    ;       "url": "<string>",
    ;       "user": {
    ;         "name": "<string>",
    ;         "active": "<boolean>",
    ;         "alias": "<string>",
    ;         "chat_only": "<boolean>",
    ;         "created_at": "<string>",
    ;         "custom_role_id": "<integer>",
    ;         "default_group_id": "<integer>",
    ;         "details": "<string>",
    ;         "email": "<string>",
    ;         "external_id": "<string>",
    ;         "iana_time_zone": "<string>",
    ;         "id": "<integer>",
    ;         "last_login_at": "<string>",
    ;         "locale": "<string>",
    ;         "locale_id": "<integer>",
    ;         "moderator": "<boolean>",
    ;         "notes": "<string>",
    ;         "only_private_comments": "<boolean>",
    ;         "organization_id": "<integer>",
    ;         "phone": "<string>",
    ;         "photo": {
    ;           "esse_b": "occaec",
    ;           "ut_e6f": "Ut est deserunt"
    ;         },
    ;         "remote_photo_url": "<string>",
    ;         "report_csv": "<boolean>",
    ;         "restricted_agent": "<boolean>",
    ;         "role": "<string>",
    ;         "role_type": "<integer>",
    ;         "shared": "<boolean>",
    ;         "shared_agent": "<boolean>",
    ;         "shared_phone_number": "<boolean>",
    ;         "signature": "<string>",
    ;         "suspended": "<boolean>",
    ;         "tags": "<array>",
    ;         "ticket_restriction": "<string>",
    ;         "time_zone": "<string>",
    ;         "two_factor_auth_enabled": "<boolean>",
    ;         "updated_at": "<string>",
    ;         "url": "<string>",
    ;         "user_fields": {
    ;           "voluptatef": -38514506.191917874,
    ;           "utba9": -99737083,
    ;           "ut_2": false
    ;         },
    ;         "verified": "<boolean>"
    ;       },
    ;       "user_id": "<integer>",
    ;       "verb": "<string>"
    ;     }
    ;   ],
    ;   "actors": [
    ;     {
    ;       "Excepteur1_": -85145004.89320306,
    ;       "consectetura8a": -98072772.2193171,
    ;       "id_e": -68362078.49006462,
    ;       "reprehenderit_93": 96874887,
    ;       "elit7": "dolor"
    ;     },
    ;     {
    ;       "ad_1a": "sunt nulla incididunt sed"
    ;     }
    ;   ],
    ;   "count": "<integer>",
    ;   "next_page": "<string>",
    ;   "previous_page": "<string>",
    ;   "users": [
    ;     {
    ;       "anim40": -83874192,
    ;       "quisa9": 17607150.376219943,
    ;       "fugiat_e": true,
    ;       "non_224": 21739369.8385354
    ;     },
    ;     {
    ;       "cillumeb": "ut nisi sunt deserunt"
    ;     }
    ;   ]
    ; }

    ; Sample code for parsing the JSON response...
    ; Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    Name.s
    Active.s
    Alias.s
    Chat_only.s
    Created_at.s
    Custom_role_id.s
    Default_group_id.s
    Details.s
    v_Email.s
    External_id.s
    Iana_time_zone.s
    Id.s
    Last_login_at.s
    Locale.s
    Locale_id.s
    Moderator.s
    Notes.s
    Only_private_comments.s
    Organization_id.s
    Phone.s
    Adipisicing7.i
    Irure_70.i
    Remote_photo_url.s
    Report_csv.s
    Restricted_agent.s
    Role.s
    Role_type.s
    v_Shared.s
    Shared_agent.s
    Shared_phone_number.s
    Signature.s
    Suspended.s
    Tags.s
    Ticket_restriction.s
    Time_zone.s
    Two_factor_auth_enabled.s
    Updated_at.s
    v_Url.s
    Tempor_f.s
    Verified.s
    actor_id.s
    created_at.s
    id.s
    Officia1a2.i
    Qui9.s
    Irure_1cd.s
    Sede8.i
    title.s
    updated_at.s
    url.s
    userName.s
    userActive.s
    userAlias.s
    userChat_only.s
    userCreated_at.s
    userCustom_role_id.s
    userDefault_group_id.s
    userDetails.s
    userEmail.s
    userExternal_id.s
    userIana_time_zone.s
    userId.s
    userLast_login_at.s
    userLocale.s
    userLocale_id.s
    userModerator.s
    userNotes.s
    userOnly_private_comments.s
    userOrganization_id.s
    userPhone.s
    Ut975.s
    Magna3e.i
    userRemote_photo_url.s
    userReport_csv.s
    userRestricted_agent.s
    userRole.s
    userRole_type.s
    userShared.s
    userShared_agent.s
    userShared_phone_number.s
    userSignature.s
    userSuspended.s
    userTags.s
    userTicket_restriction.s
    userTime_zone.s
    userTwo_factor_auth_enabled.s
    userUpdated_at.s
    userUrl.s
    Ut_d.s
    Adipisicing_7.i
    Magna_9.s
    userVerified.s
    user_id.s
    verb.s
    Aliquipb6.i
    Euc13.s
    Pariatur_39.i
    Voluptate_8.i
    Ipsum4.i
    Est_d.s
    Esse_b.s
    Ut_e6f.s
    Voluptatef.s
    Utba9.i
    Ut_2.i
    Excepteur1_.s
    consectetura8a.s
    id_e.s
    reprehenderit_93.i
    elit7.s
    ad_1a.s
    anim40.i
    quisa9.s
    fugiat_e.i
    non_224.s
    cillumeb.s

    count.s = CkJsonObject::ckStringOf(jResp,"count")
    next_page.s = CkJsonObject::ckStringOf(jResp,"next_page")
    previous_page.s = CkJsonObject::ckStringOf(jResp,"previous_page")
    i.i = 0
    count_i.i = CkJsonObject::ckSizeOfArray(jResp,"activities")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        Name = CkJsonObject::ckStringOf(jResp,"activities[i].actor.name")
        Active = CkJsonObject::ckStringOf(jResp,"activities[i].actor.active")
        Alias = CkJsonObject::ckStringOf(jResp,"activities[i].actor.alias")
        Chat_only = CkJsonObject::ckStringOf(jResp,"activities[i].actor.chat_only")
        Created_at = CkJsonObject::ckStringOf(jResp,"activities[i].actor.created_at")
        Custom_role_id = CkJsonObject::ckStringOf(jResp,"activities[i].actor.custom_role_id")
        Default_group_id = CkJsonObject::ckStringOf(jResp,"activities[i].actor.default_group_id")
        Details = CkJsonObject::ckStringOf(jResp,"activities[i].actor.details")
        v_Email = CkJsonObject::ckStringOf(jResp,"activities[i].actor.email")
        External_id = CkJsonObject::ckStringOf(jResp,"activities[i].actor.external_id")
        Iana_time_zone = CkJsonObject::ckStringOf(jResp,"activities[i].actor.iana_time_zone")
        Id = CkJsonObject::ckStringOf(jResp,"activities[i].actor.id")
        Last_login_at = CkJsonObject::ckStringOf(jResp,"activities[i].actor.last_login_at")
        Locale = CkJsonObject::ckStringOf(jResp,"activities[i].actor.locale")
        Locale_id = CkJsonObject::ckStringOf(jResp,"activities[i].actor.locale_id")
        Moderator = CkJsonObject::ckStringOf(jResp,"activities[i].actor.moderator")
        Notes = CkJsonObject::ckStringOf(jResp,"activities[i].actor.notes")
        Only_private_comments = CkJsonObject::ckStringOf(jResp,"activities[i].actor.only_private_comments")
        Organization_id = CkJsonObject::ckStringOf(jResp,"activities[i].actor.organization_id")
        Phone = CkJsonObject::ckStringOf(jResp,"activities[i].actor.phone")
        Adipisicing7 = CkJsonObject::ckIntOf(jResp,"activities[i].actor.photo.adipisicing7")
        Irure_70 = CkJsonObject::ckBoolOf(jResp,"activities[i].actor.photo.irure_70")
        Remote_photo_url = CkJsonObject::ckStringOf(jResp,"activities[i].actor.remote_photo_url")
        Report_csv = CkJsonObject::ckStringOf(jResp,"activities[i].actor.report_csv")
        Restricted_agent = CkJsonObject::ckStringOf(jResp,"activities[i].actor.restricted_agent")
        Role = CkJsonObject::ckStringOf(jResp,"activities[i].actor.role")
        Role_type = CkJsonObject::ckStringOf(jResp,"activities[i].actor.role_type")
        v_Shared = CkJsonObject::ckStringOf(jResp,"activities[i].actor.shared")
        Shared_agent = CkJsonObject::ckStringOf(jResp,"activities[i].actor.shared_agent")
        Shared_phone_number = CkJsonObject::ckStringOf(jResp,"activities[i].actor.shared_phone_number")
        Signature = CkJsonObject::ckStringOf(jResp,"activities[i].actor.signature")
        Suspended = CkJsonObject::ckStringOf(jResp,"activities[i].actor.suspended")
        Tags = CkJsonObject::ckStringOf(jResp,"activities[i].actor.tags")
        Ticket_restriction = CkJsonObject::ckStringOf(jResp,"activities[i].actor.ticket_restriction")
        Time_zone = CkJsonObject::ckStringOf(jResp,"activities[i].actor.time_zone")
        Two_factor_auth_enabled = CkJsonObject::ckStringOf(jResp,"activities[i].actor.two_factor_auth_enabled")
        Updated_at = CkJsonObject::ckStringOf(jResp,"activities[i].actor.updated_at")
        v_Url = CkJsonObject::ckStringOf(jResp,"activities[i].actor.url")
        Tempor_f = CkJsonObject::ckStringOf(jResp,"activities[i].actor.user_fields.tempor_f")
        Verified = CkJsonObject::ckStringOf(jResp,"activities[i].actor.verified")
        actor_id = CkJsonObject::ckStringOf(jResp,"activities[i].actor_id")
        created_at = CkJsonObject::ckStringOf(jResp,"activities[i].created_at")
        id = CkJsonObject::ckStringOf(jResp,"activities[i].id")
        Officia1a2 = CkJsonObject::ckBoolOf(jResp,"activities[i].object.officia1a2")
        Qui9 = CkJsonObject::ckStringOf(jResp,"activities[i].object.qui9")
        Irure_1cd = CkJsonObject::ckStringOf(jResp,"activities[i].object.irure_1cd")
        Sede8 = CkJsonObject::ckBoolOf(jResp,"activities[i].target.sede8")
        title = CkJsonObject::ckStringOf(jResp,"activities[i].title")
        updated_at = CkJsonObject::ckStringOf(jResp,"activities[i].updated_at")
        url = CkJsonObject::ckStringOf(jResp,"activities[i].url")
        userName = CkJsonObject::ckStringOf(jResp,"activities[i].user.name")
        userActive = CkJsonObject::ckStringOf(jResp,"activities[i].user.active")
        userAlias = CkJsonObject::ckStringOf(jResp,"activities[i].user.alias")
        userChat_only = CkJsonObject::ckStringOf(jResp,"activities[i].user.chat_only")
        userCreated_at = CkJsonObject::ckStringOf(jResp,"activities[i].user.created_at")
        userCustom_role_id = CkJsonObject::ckStringOf(jResp,"activities[i].user.custom_role_id")
        userDefault_group_id = CkJsonObject::ckStringOf(jResp,"activities[i].user.default_group_id")
        userDetails = CkJsonObject::ckStringOf(jResp,"activities[i].user.details")
        userEmail = CkJsonObject::ckStringOf(jResp,"activities[i].user.email")
        userExternal_id = CkJsonObject::ckStringOf(jResp,"activities[i].user.external_id")
        userIana_time_zone = CkJsonObject::ckStringOf(jResp,"activities[i].user.iana_time_zone")
        userId = CkJsonObject::ckStringOf(jResp,"activities[i].user.id")
        userLast_login_at = CkJsonObject::ckStringOf(jResp,"activities[i].user.last_login_at")
        userLocale = CkJsonObject::ckStringOf(jResp,"activities[i].user.locale")
        userLocale_id = CkJsonObject::ckStringOf(jResp,"activities[i].user.locale_id")
        userModerator = CkJsonObject::ckStringOf(jResp,"activities[i].user.moderator")
        userNotes = CkJsonObject::ckStringOf(jResp,"activities[i].user.notes")
        userOnly_private_comments = CkJsonObject::ckStringOf(jResp,"activities[i].user.only_private_comments")
        userOrganization_id = CkJsonObject::ckStringOf(jResp,"activities[i].user.organization_id")
        userPhone = CkJsonObject::ckStringOf(jResp,"activities[i].user.phone")
        Ut975 = CkJsonObject::ckStringOf(jResp,"activities[i].user.photo.Ut975")
        Magna3e = CkJsonObject::ckBoolOf(jResp,"activities[i].user.photo.magna3e")
        userRemote_photo_url = CkJsonObject::ckStringOf(jResp,"activities[i].user.remote_photo_url")
        userReport_csv = CkJsonObject::ckStringOf(jResp,"activities[i].user.report_csv")
        userRestricted_agent = CkJsonObject::ckStringOf(jResp,"activities[i].user.restricted_agent")
        userRole = CkJsonObject::ckStringOf(jResp,"activities[i].user.role")
        userRole_type = CkJsonObject::ckStringOf(jResp,"activities[i].user.role_type")
        userShared = CkJsonObject::ckStringOf(jResp,"activities[i].user.shared")
        userShared_agent = CkJsonObject::ckStringOf(jResp,"activities[i].user.shared_agent")
        userShared_phone_number = CkJsonObject::ckStringOf(jResp,"activities[i].user.shared_phone_number")
        userSignature = CkJsonObject::ckStringOf(jResp,"activities[i].user.signature")
        userSuspended = CkJsonObject::ckStringOf(jResp,"activities[i].user.suspended")
        userTags = CkJsonObject::ckStringOf(jResp,"activities[i].user.tags")
        userTicket_restriction = CkJsonObject::ckStringOf(jResp,"activities[i].user.ticket_restriction")
        userTime_zone = CkJsonObject::ckStringOf(jResp,"activities[i].user.time_zone")
        userTwo_factor_auth_enabled = CkJsonObject::ckStringOf(jResp,"activities[i].user.two_factor_auth_enabled")
        userUpdated_at = CkJsonObject::ckStringOf(jResp,"activities[i].user.updated_at")
        userUrl = CkJsonObject::ckStringOf(jResp,"activities[i].user.url")
        Ut_d = CkJsonObject::ckStringOf(jResp,"activities[i].user.user_fields.ut_d")
        Adipisicing_7 = CkJsonObject::ckIntOf(jResp,"activities[i].user.user_fields.adipisicing_7")
        Magna_9 = CkJsonObject::ckStringOf(jResp,"activities[i].user.user_fields.magna_9")
        userVerified = CkJsonObject::ckStringOf(jResp,"activities[i].user.verified")
        user_id = CkJsonObject::ckStringOf(jResp,"activities[i].user_id")
        verb = CkJsonObject::ckStringOf(jResp,"activities[i].verb")
        Aliquipb6 = CkJsonObject::ckBoolOf(jResp,"activities[i].actor.photo.aliquipb6")
        Euc13 = CkJsonObject::ckStringOf(jResp,"activities[i].actor.user_fields.euc13")
        Pariatur_39 = CkJsonObject::ckIntOf(jResp,"activities[i].object.pariatur_39")
        Voluptate_8 = CkJsonObject::ckBoolOf(jResp,"activities[i].object.voluptate_8")
        Ipsum4 = CkJsonObject::ckIntOf(jResp,"activities[i].object.ipsum4")
        Est_d = CkJsonObject::ckStringOf(jResp,"activities[i].target.est_d")
        Esse_b = CkJsonObject::ckStringOf(jResp,"activities[i].user.photo.esse_b")
        Ut_e6f = CkJsonObject::ckStringOf(jResp,"activities[i].user.photo.ut_e6f")
        Voluptatef = CkJsonObject::ckStringOf(jResp,"activities[i].user.user_fields.voluptatef")
        Utba9 = CkJsonObject::ckIntOf(jResp,"activities[i].user.user_fields.utba9")
        Ut_2 = CkJsonObject::ckBoolOf(jResp,"activities[i].user.user_fields.ut_2")
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"actors")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        Excepteur1_ = CkJsonObject::ckStringOf(jResp,"actors[i].Excepteur1_")
        consectetura8a = CkJsonObject::ckStringOf(jResp,"actors[i].consectetura8a")
        id_e = CkJsonObject::ckStringOf(jResp,"actors[i].id_e")
        reprehenderit_93 = CkJsonObject::ckIntOf(jResp,"actors[i].reprehenderit_93")
        elit7 = CkJsonObject::ckStringOf(jResp,"actors[i].elit7")
        ad_1a = CkJsonObject::ckStringOf(jResp,"actors[i].ad_1a")
        i = i + 1
    Wend
    i = 0
    count_i = CkJsonObject::ckSizeOfArray(jResp,"users")
    While i < count_i
        CkJsonObject::setCkI(jResp, i)
        anim40 = CkJsonObject::ckIntOf(jResp,"users[i].anim40")
        quisa9 = CkJsonObject::ckStringOf(jResp,"users[i].quisa9")
        fugiat_e = CkJsonObject::ckBoolOf(jResp,"users[i].fugiat_e")
        non_224 = CkJsonObject::ckStringOf(jResp,"users[i].non_224")
        cillumeb = CkJsonObject::ckStringOf(jResp,"users[i].cillumeb")
        i = i + 1
    Wend


    CkHttp::ckDispose(http)
    CkJsonObject::ckDispose(queryParams)
    CkStringBuilder::ckDispose(sbResponseBody)
    CkJsonObject::ckDispose(jResp)


    ProcedureReturn
EndProcedure

Curl Command

curl  -u login:password -G -d "since=%3Cstring%3E"
	-H "Accept: application/json"
https://example.zendesk.com/api/v2/activities

Postman Collection Item JSON

{
  "name": "List Activities",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/api/v2/activities?since=<string>",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v2",
        "activities"
      ],
      "query": [
        {
          "key": "since",
          "value": "<string>",
          "description": "A UTC time in ISO 8601 format to return ticket activities since said date."
        }
      ]
    },
    "description": "Lists ticket activities in the last 30 days affecting the agent making the request.\nAlso sideloads the following arrays of user records:\n\n- actors - All actors involved in the listed activities\n- users - All users involved in the listed activities\n\n#### Pagination\n\n- Cursor pagination (recommended)\n- Offset pagination\n\nSee [Pagination](/api-reference/introduction/pagination/).\n\nReturns a maximum of 100 records per page.\n\n#### Allowed For\n\n* Agents\n"
  },
  "response": [
    {
      "name": "Success response",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: basic",
            "key": "Authorization",
            "value": "Basic <credentials>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v2/activities?since=<string>",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "activities"
          ],
          "query": [
            {
              "key": "since",
              "value": "<string>",
              "description": "A UTC time in ISO 8601 format to return ticket activities since said date."
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"activities\": [\n    {\n      \"actor\": {\n        \"name\": \"<string>\",\n        \"active\": \"<boolean>\",\n        \"alias\": \"<string>\",\n        \"chat_only\": \"<boolean>\",\n        \"created_at\": \"<string>\",\n        \"custom_role_id\": \"<integer>\",\n        \"default_group_id\": \"<integer>\",\n        \"details\": \"<string>\",\n        \"email\": \"<string>\",\n        \"external_id\": \"<string>\",\n        \"iana_time_zone\": \"<string>\",\n        \"id\": \"<integer>\",\n        \"last_login_at\": \"<string>\",\n        \"locale\": \"<string>\",\n        \"locale_id\": \"<integer>\",\n        \"moderator\": \"<boolean>\",\n        \"notes\": \"<string>\",\n        \"only_private_comments\": \"<boolean>\",\n        \"organization_id\": \"<integer>\",\n        \"phone\": \"<string>\",\n        \"photo\": {\n          \"adipisicing7\": 56151302,\n          \"irure_70\": true\n        },\n        \"remote_photo_url\": \"<string>\",\n        \"report_csv\": \"<boolean>\",\n        \"restricted_agent\": \"<boolean>\",\n        \"role\": \"<string>\",\n        \"role_type\": \"<integer>\",\n        \"shared\": \"<boolean>\",\n        \"shared_agent\": \"<boolean>\",\n        \"shared_phone_number\": \"<boolean>\",\n        \"signature\": \"<string>\",\n        \"suspended\": \"<boolean>\",\n        \"tags\": \"<array>\",\n        \"ticket_restriction\": \"<string>\",\n        \"time_zone\": \"<string>\",\n        \"two_factor_auth_enabled\": \"<boolean>\",\n        \"updated_at\": \"<string>\",\n        \"url\": \"<string>\",\n        \"user_fields\": {\n          \"tempor_f\": 85786252.44695336\n        },\n        \"verified\": \"<boolean>\"\n      },\n      \"actor_id\": \"<integer>\",\n      \"created_at\": \"<string>\",\n      \"id\": \"<integer>\",\n      \"object\": {\n        \"officia1a2\": true,\n        \"qui9\": \"voluptate mollit Excepteur ipsum veniam\",\n        \"irure_1cd\": \"id ea\"\n      },\n      \"target\": {\n        \"sede8\": false\n      },\n      \"title\": \"<string>\",\n      \"updated_at\": \"<string>\",\n      \"url\": \"<string>\",\n      \"user\": {\n        \"name\": \"<string>\",\n        \"active\": \"<boolean>\",\n        \"alias\": \"<string>\",\n        \"chat_only\": \"<boolean>\",\n        \"created_at\": \"<string>\",\n        \"custom_role_id\": \"<integer>\",\n        \"default_group_id\": \"<integer>\",\n        \"details\": \"<string>\",\n        \"email\": \"<string>\",\n        \"external_id\": \"<string>\",\n        \"iana_time_zone\": \"<string>\",\n        \"id\": \"<integer>\",\n        \"last_login_at\": \"<string>\",\n        \"locale\": \"<string>\",\n        \"locale_id\": \"<integer>\",\n        \"moderator\": \"<boolean>\",\n        \"notes\": \"<string>\",\n        \"only_private_comments\": \"<boolean>\",\n        \"organization_id\": \"<integer>\",\n        \"phone\": \"<string>\",\n        \"photo\": {\n          \"Ut975\": -74534220.66145113,\n          \"magna3e\": false\n        },\n        \"remote_photo_url\": \"<string>\",\n        \"report_csv\": \"<boolean>\",\n        \"restricted_agent\": \"<boolean>\",\n        \"role\": \"<string>\",\n        \"role_type\": \"<integer>\",\n        \"shared\": \"<boolean>\",\n        \"shared_agent\": \"<boolean>\",\n        \"shared_phone_number\": \"<boolean>\",\n        \"signature\": \"<string>\",\n        \"suspended\": \"<boolean>\",\n        \"tags\": \"<array>\",\n        \"ticket_restriction\": \"<string>\",\n        \"time_zone\": \"<string>\",\n        \"two_factor_auth_enabled\": \"<boolean>\",\n        \"updated_at\": \"<string>\",\n        \"url\": \"<string>\",\n        \"user_fields\": {\n          \"ut_d\": \"tempor\",\n          \"adipisicing_7\": 28937910,\n          \"magna_9\": -45754090.269199036\n        },\n        \"verified\": \"<boolean>\"\n      },\n      \"user_id\": \"<integer>\",\n      \"verb\": \"<string>\"\n    },\n    {\n      \"actor\": {\n        \"name\": \"<string>\",\n        \"active\": \"<boolean>\",\n        \"alias\": \"<string>\",\n        \"chat_only\": \"<boolean>\",\n        \"created_at\": \"<string>\",\n        \"custom_role_id\": \"<integer>\",\n        \"default_group_id\": \"<integer>\",\n        \"details\": \"<string>\",\n        \"email\": \"<string>\",\n        \"external_id\": \"<string>\",\n        \"iana_time_zone\": \"<string>\",\n        \"id\": \"<integer>\",\n        \"last_login_at\": \"<string>\",\n        \"locale\": \"<string>\",\n        \"locale_id\": \"<integer>\",\n        \"moderator\": \"<boolean>\",\n        \"notes\": \"<string>\",\n        \"only_private_comments\": \"<boolean>\",\n        \"organization_id\": \"<integer>\",\n        \"phone\": \"<string>\",\n        \"photo\": {\n          \"aliquipb6\": false\n        },\n        \"remote_photo_url\": \"<string>\",\n        \"report_csv\": \"<boolean>\",\n        \"restricted_agent\": \"<boolean>\",\n        \"role\": \"<string>\",\n        \"role_type\": \"<integer>\",\n        \"shared\": \"<boolean>\",\n        \"shared_agent\": \"<boolean>\",\n        \"shared_phone_number\": \"<boolean>\",\n        \"signature\": \"<string>\",\n        \"suspended\": \"<boolean>\",\n        \"tags\": \"<array>\",\n        \"ticket_restriction\": \"<string>\",\n        \"time_zone\": \"<string>\",\n        \"two_factor_auth_enabled\": \"<boolean>\",\n        \"updated_at\": \"<string>\",\n        \"url\": \"<string>\",\n        \"user_fields\": {\n          \"euc13\": \"pariatur\"\n        },\n        \"verified\": \"<boolean>\"\n      },\n      \"actor_id\": \"<integer>\",\n      \"created_at\": \"<string>\",\n      \"id\": \"<integer>\",\n      \"object\": {\n        \"pariatur_39\": -13246316,\n        \"voluptate_8\": false,\n        \"ipsum4\": -24640571\n      },\n      \"target\": {\n        \"est_d\": 43464084.60404679\n      },\n      \"title\": \"<string>\",\n      \"updated_at\": \"<string>\",\n      \"url\": \"<string>\",\n      \"user\": {\n        \"name\": \"<string>\",\n        \"active\": \"<boolean>\",\n        \"alias\": \"<string>\",\n        \"chat_only\": \"<boolean>\",\n        \"created_at\": \"<string>\",\n        \"custom_role_id\": \"<integer>\",\n        \"default_group_id\": \"<integer>\",\n        \"details\": \"<string>\",\n        \"email\": \"<string>\",\n        \"external_id\": \"<string>\",\n        \"iana_time_zone\": \"<string>\",\n        \"id\": \"<integer>\",\n        \"last_login_at\": \"<string>\",\n        \"locale\": \"<string>\",\n        \"locale_id\": \"<integer>\",\n        \"moderator\": \"<boolean>\",\n        \"notes\": \"<string>\",\n        \"only_private_comments\": \"<boolean>\",\n        \"organization_id\": \"<integer>\",\n        \"phone\": \"<string>\",\n        \"photo\": {\n          \"esse_b\": \"occaec\",\n          \"ut_e6f\": \"Ut est deserunt\"\n        },\n        \"remote_photo_url\": \"<string>\",\n        \"report_csv\": \"<boolean>\",\n        \"restricted_agent\": \"<boolean>\",\n        \"role\": \"<string>\",\n        \"role_type\": \"<integer>\",\n        \"shared\": \"<boolean>\",\n        \"shared_agent\": \"<boolean>\",\n        \"shared_phone_number\": \"<boolean>\",\n        \"signature\": \"<string>\",\n        \"suspended\": \"<boolean>\",\n        \"tags\": \"<array>\",\n        \"ticket_restriction\": \"<string>\",\n        \"time_zone\": \"<string>\",\n        \"two_factor_auth_enabled\": \"<boolean>\",\n        \"updated_at\": \"<string>\",\n        \"url\": \"<string>\",\n        \"user_fields\": {\n          \"voluptatef\": -38514506.191917874,\n          \"utba9\": -99737083,\n          \"ut_2\": false\n        },\n        \"verified\": \"<boolean>\"\n      },\n      \"user_id\": \"<integer>\",\n      \"verb\": \"<string>\"\n    }\n  ],\n  \"actors\": [\n    {\n      \"Excepteur1_\": -85145004.89320306,\n      \"consectetura8a\": -98072772.2193171,\n      \"id_e\": -68362078.49006462,\n      \"reprehenderit_93\": 96874887,\n      \"elit7\": \"dolor\"\n    },\n    {\n      \"ad_1a\": \"sunt nulla incididunt sed\"\n    }\n  ],\n  \"count\": \"<integer>\",\n  \"next_page\": \"<string>\",\n  \"previous_page\": \"<string>\",\n  \"users\": [\n    {\n      \"anim40\": -83874192,\n      \"quisa9\": 17607150.376219943,\n      \"fugiat_e\": true,\n      \"non_224\": 21739369.8385354\n    },\n    {\n      \"cillumeb\": \"ut nisi sunt deserunt\"\n    }\n  ]\n}"
    }
  ]
}