PowerBuilder / Support API / Show Activity
Back to Collection Items
integer li_rc
oleobject loo_Http
integer li_Success
oleobject loo_SbResponseBody
oleobject loo_JResp
integer li_RespStatusCode
string ls_Name
string ls_Active
string ls_Alias
string ls_Chat_only
string ls_Created_at
string ls_Custom_role_id
string ls_Default_group_id
string ls_Details
string ls_V_Email
string ls_External_id
string ls_Iana_time_zone
string ls_Id
string ls_Last_login_at
string ls_Locale
string ls_Locale_id
string ls_Moderator
string ls_Notes
string ls_Only_private_comments
string ls_Organization_id
string ls_Phone
string ls_Laborum485
string ls_Incididuntfe4
integer li_Ipsum_d
integer li_Non_4a
string ls_Remote_photo_url
string ls_Report_csv
string ls_Restricted_agent
string ls_Role
string ls_Role_type
string ls_V_Shared
string ls_Shared_agent
string ls_Shared_phone_number
string ls_Signature
string ls_Suspended
string ls_Tags
string ls_Ticket_restriction
string ls_Time_zone
string ls_Two_factor_auth_enabled
string ls_Updated_at
string ls_V_Url
integer li_Aute_e0
integer li_Quis02
string ls_Verified
string ls_Actor_id
string ls_ActivityCreated_at
string ls_ActivityId
integer li_Consequatf61
integer li_Labore__6
integer li_Anim_f0
string ls_Deserunt_fb
string ls_Title
string ls_ActivityUpdated_at
string ls_ActivityUrl
string ls_UserName
string ls_UserActive
string ls_UserAlias
string ls_UserChat_only
string ls_UserCreated_at
string ls_UserCustom_role_id
string ls_UserDefault_group_id
string ls_UserDetails
string ls_UserEmail
string ls_UserExternal_id
string ls_UserIana_time_zone
string ls_UserId
string ls_UserLast_login_at
string ls_UserLocale
string ls_UserLocale_id
string ls_UserModerator
string ls_UserNotes
string ls_UserOnly_private_comments
string ls_UserOrganization_id
string ls_UserPhone
integer li_Velit_d
integer li_Nulla68_
string ls_Elit1
string ls_UserRemote_photo_url
string ls_UserReport_csv
string ls_UserRestricted_agent
string ls_UserRole
string ls_UserRole_type
string ls_UserShared
string ls_UserShared_agent
string ls_UserShared_phone_number
string ls_UserSignature
string ls_UserSuspended
string ls_UserTags
string ls_UserTicket_restriction
string ls_UserTime_zone
string ls_UserTwo_factor_auth_enabled
string ls_UserUpdated_at
string ls_UserUrl
integer li_Dolor_c26
string ls_Elit891
string ls_Amet8
string ls_UserVerified
string ls_User_id
string ls_Verb
// 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_Http.BasicAuth = 1
loo_Http.Login = "login"
loo_Http.Password = "password"
loo_Http.SetRequestHeader("Accept","application/json")
loo_SbResponseBody = create oleobject
// Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
li_rc = loo_SbResponseBody.ConnectToNewObject("Chilkat.StringBuilder")
li_Success = loo_Http.QuickGetSb("https://example.zendesk.com/api/v2/activities/:activity_id",loo_SbResponseBody)
if li_Success = 0 then
Write-Debug loo_Http.LastErrorText
destroy loo_Http
destroy loo_SbResponseBody
return
end if
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_Http.LastStatus
Write-Debug "Response Status Code = " + string(li_RespStatusCode)
if li_RespStatusCode >= 400 then
Write-Debug "Response Header:"
Write-Debug loo_Http.LastHeader
Write-Debug "Failed."
destroy loo_Http
destroy loo_SbResponseBody
destroy loo_JResp
return
end if
// Sample JSON response:
// (Sample code for parsing the JSON response is shown below)
// {
// "activity": {
// "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": {
// "laborum485": "cupidatat occaecat sed esse deserunt",
// "incididuntfe4": "ut esse dolor dolore adipisicing",
// "ipsum_d": false,
// "non_4a": 96148739
// },
// "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": {
// "aute_e0": false,
// "quis02": 59243202
// },
// "verified": "<boolean>"
// },
// "actor_id": "<integer>",
// "created_at": "<string>",
// "id": "<integer>",
// "object": {
// "consequatf61": 91186207,
// "labore__6": true
// },
// "target": {
// "anim_f0": 93298900,
// "deserunt_fb": -19031432.480811536
// },
// "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": {
// "velit_d": false,
// "nulla68_": -89946385,
// "elit1": "id commodo cu"
// },
// "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": {
// "dolor_c26": 36781242,
// "elit891": -33618800.11537988,
// "amet8": "consectetur"
// },
// "verified": "<boolean>"
// },
// "user_id": "<integer>",
// "verb": "<string>"
// }
// }
// Sample code for parsing the JSON response...
// Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code
ls_Name = loo_JResp.StringOf("activity.actor.name")
ls_Active = loo_JResp.StringOf("activity.actor.active")
ls_Alias = loo_JResp.StringOf("activity.actor.alias")
ls_Chat_only = loo_JResp.StringOf("activity.actor.chat_only")
ls_Created_at = loo_JResp.StringOf("activity.actor.created_at")
ls_Custom_role_id = loo_JResp.StringOf("activity.actor.custom_role_id")
ls_Default_group_id = loo_JResp.StringOf("activity.actor.default_group_id")
ls_Details = loo_JResp.StringOf("activity.actor.details")
ls_V_Email = loo_JResp.StringOf("activity.actor.email")
ls_External_id = loo_JResp.StringOf("activity.actor.external_id")
ls_Iana_time_zone = loo_JResp.StringOf("activity.actor.iana_time_zone")
ls_Id = loo_JResp.StringOf("activity.actor.id")
ls_Last_login_at = loo_JResp.StringOf("activity.actor.last_login_at")
ls_Locale = loo_JResp.StringOf("activity.actor.locale")
ls_Locale_id = loo_JResp.StringOf("activity.actor.locale_id")
ls_Moderator = loo_JResp.StringOf("activity.actor.moderator")
ls_Notes = loo_JResp.StringOf("activity.actor.notes")
ls_Only_private_comments = loo_JResp.StringOf("activity.actor.only_private_comments")
ls_Organization_id = loo_JResp.StringOf("activity.actor.organization_id")
ls_Phone = loo_JResp.StringOf("activity.actor.phone")
ls_Laborum485 = loo_JResp.StringOf("activity.actor.photo.laborum485")
ls_Incididuntfe4 = loo_JResp.StringOf("activity.actor.photo.incididuntfe4")
li_Ipsum_d = loo_JResp.BoolOf("activity.actor.photo.ipsum_d")
li_Non_4a = loo_JResp.IntOf("activity.actor.photo.non_4a")
ls_Remote_photo_url = loo_JResp.StringOf("activity.actor.remote_photo_url")
ls_Report_csv = loo_JResp.StringOf("activity.actor.report_csv")
ls_Restricted_agent = loo_JResp.StringOf("activity.actor.restricted_agent")
ls_Role = loo_JResp.StringOf("activity.actor.role")
ls_Role_type = loo_JResp.StringOf("activity.actor.role_type")
ls_V_Shared = loo_JResp.StringOf("activity.actor.shared")
ls_Shared_agent = loo_JResp.StringOf("activity.actor.shared_agent")
ls_Shared_phone_number = loo_JResp.StringOf("activity.actor.shared_phone_number")
ls_Signature = loo_JResp.StringOf("activity.actor.signature")
ls_Suspended = loo_JResp.StringOf("activity.actor.suspended")
ls_Tags = loo_JResp.StringOf("activity.actor.tags")
ls_Ticket_restriction = loo_JResp.StringOf("activity.actor.ticket_restriction")
ls_Time_zone = loo_JResp.StringOf("activity.actor.time_zone")
ls_Two_factor_auth_enabled = loo_JResp.StringOf("activity.actor.two_factor_auth_enabled")
ls_Updated_at = loo_JResp.StringOf("activity.actor.updated_at")
ls_V_Url = loo_JResp.StringOf("activity.actor.url")
li_Aute_e0 = loo_JResp.BoolOf("activity.actor.user_fields.aute_e0")
li_Quis02 = loo_JResp.IntOf("activity.actor.user_fields.quis02")
ls_Verified = loo_JResp.StringOf("activity.actor.verified")
ls_Actor_id = loo_JResp.StringOf("activity.actor_id")
ls_ActivityCreated_at = loo_JResp.StringOf("activity.created_at")
ls_ActivityId = loo_JResp.StringOf("activity.id")
li_Consequatf61 = loo_JResp.IntOf("activity.object.consequatf61")
li_Labore__6 = loo_JResp.BoolOf("activity.object.labore__6")
li_Anim_f0 = loo_JResp.IntOf("activity.target.anim_f0")
ls_Deserunt_fb = loo_JResp.StringOf("activity.target.deserunt_fb")
ls_Title = loo_JResp.StringOf("activity.title")
ls_ActivityUpdated_at = loo_JResp.StringOf("activity.updated_at")
ls_ActivityUrl = loo_JResp.StringOf("activity.url")
ls_UserName = loo_JResp.StringOf("activity.user.name")
ls_UserActive = loo_JResp.StringOf("activity.user.active")
ls_UserAlias = loo_JResp.StringOf("activity.user.alias")
ls_UserChat_only = loo_JResp.StringOf("activity.user.chat_only")
ls_UserCreated_at = loo_JResp.StringOf("activity.user.created_at")
ls_UserCustom_role_id = loo_JResp.StringOf("activity.user.custom_role_id")
ls_UserDefault_group_id = loo_JResp.StringOf("activity.user.default_group_id")
ls_UserDetails = loo_JResp.StringOf("activity.user.details")
ls_UserEmail = loo_JResp.StringOf("activity.user.email")
ls_UserExternal_id = loo_JResp.StringOf("activity.user.external_id")
ls_UserIana_time_zone = loo_JResp.StringOf("activity.user.iana_time_zone")
ls_UserId = loo_JResp.StringOf("activity.user.id")
ls_UserLast_login_at = loo_JResp.StringOf("activity.user.last_login_at")
ls_UserLocale = loo_JResp.StringOf("activity.user.locale")
ls_UserLocale_id = loo_JResp.StringOf("activity.user.locale_id")
ls_UserModerator = loo_JResp.StringOf("activity.user.moderator")
ls_UserNotes = loo_JResp.StringOf("activity.user.notes")
ls_UserOnly_private_comments = loo_JResp.StringOf("activity.user.only_private_comments")
ls_UserOrganization_id = loo_JResp.StringOf("activity.user.organization_id")
ls_UserPhone = loo_JResp.StringOf("activity.user.phone")
li_Velit_d = loo_JResp.BoolOf("activity.user.photo.velit_d")
li_Nulla68_ = loo_JResp.IntOf("activity.user.photo.nulla68_")
ls_Elit1 = loo_JResp.StringOf("activity.user.photo.elit1")
ls_UserRemote_photo_url = loo_JResp.StringOf("activity.user.remote_photo_url")
ls_UserReport_csv = loo_JResp.StringOf("activity.user.report_csv")
ls_UserRestricted_agent = loo_JResp.StringOf("activity.user.restricted_agent")
ls_UserRole = loo_JResp.StringOf("activity.user.role")
ls_UserRole_type = loo_JResp.StringOf("activity.user.role_type")
ls_UserShared = loo_JResp.StringOf("activity.user.shared")
ls_UserShared_agent = loo_JResp.StringOf("activity.user.shared_agent")
ls_UserShared_phone_number = loo_JResp.StringOf("activity.user.shared_phone_number")
ls_UserSignature = loo_JResp.StringOf("activity.user.signature")
ls_UserSuspended = loo_JResp.StringOf("activity.user.suspended")
ls_UserTags = loo_JResp.StringOf("activity.user.tags")
ls_UserTicket_restriction = loo_JResp.StringOf("activity.user.ticket_restriction")
ls_UserTime_zone = loo_JResp.StringOf("activity.user.time_zone")
ls_UserTwo_factor_auth_enabled = loo_JResp.StringOf("activity.user.two_factor_auth_enabled")
ls_UserUpdated_at = loo_JResp.StringOf("activity.user.updated_at")
ls_UserUrl = loo_JResp.StringOf("activity.user.url")
li_Dolor_c26 = loo_JResp.IntOf("activity.user.user_fields.dolor_c26")
ls_Elit891 = loo_JResp.StringOf("activity.user.user_fields.elit891")
ls_Amet8 = loo_JResp.StringOf("activity.user.user_fields.amet8")
ls_UserVerified = loo_JResp.StringOf("activity.user.verified")
ls_User_id = loo_JResp.StringOf("activity.user_id")
ls_Verb = loo_JResp.StringOf("activity.verb")
destroy loo_Http
destroy loo_SbResponseBody
destroy loo_JResp
Curl Command
curl -u login:password -X GET
-H "Accept: application/json"
https://example.zendesk.com/api/v2/activities/:activity_id
Postman Collection Item JSON
{
"name": "Show Activity",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json"
}
],
"url": {
"raw": "{{baseUrl}}/api/v2/activities/:activity_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"activities",
":activity_id"
],
"variable": [
{
"key": "activity_id",
"value": "<integer>"
}
]
},
"description": "Lists a specific activity.\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/:activity_id",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"v2",
"activities",
":activity_id"
],
"variable": [
{
"key": "activity_id"
}
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "json",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"cookie": [
],
"body": "{\n \"activity\": {\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 \"laborum485\": \"cupidatat occaecat sed esse deserunt\",\n \"incididuntfe4\": \"ut esse dolor dolore adipisicing\",\n \"ipsum_d\": false,\n \"non_4a\": 96148739\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 \"aute_e0\": false,\n \"quis02\": 59243202\n },\n \"verified\": \"<boolean>\"\n },\n \"actor_id\": \"<integer>\",\n \"created_at\": \"<string>\",\n \"id\": \"<integer>\",\n \"object\": {\n \"consequatf61\": 91186207,\n \"labore__6\": true\n },\n \"target\": {\n \"anim_f0\": 93298900,\n \"deserunt_fb\": -19031432.480811536\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 \"velit_d\": false,\n \"nulla68_\": -89946385,\n \"elit1\": \"id commodo cu\"\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 \"dolor_c26\": 36781242,\n \"elit891\": -33618800.11537988,\n \"amet8\": \"consectetur\"\n },\n \"verified\": \"<boolean>\"\n },\n \"user_id\": \"<integer>\",\n \"verb\": \"<string>\"\n }\n}"
}
]
}