filtered_search api in freshworks CRM not returning custom attributes - crm

I need data from freshworks CRM rest api and I am using /api/filtered_search/[entity] api to get data modified between 2 time periods. This query is returning correct data. But the result doesn't include all the attributes of a record as the result from view api /api/sales_accounts/view/[view_id]. What should I do to get all attributes of records that are modified between 2 time periods ?
Sample query:
curl -H "Authorization: Token token=XXXXXXX -X POST https://personal-XXXX.myfreshworks.com/crm/sales/api/filtered_search/sales_account?include=owner -d '{ "filter_rule" : [{"attribute" : "updated_at", "operator":"is_in_the_range", "value":["2021-02-10T10:00:00", "2021-02-10T15:00:00"]}] }'
Result:
{
"id": 70000227816,
"name": "Everstage Acc 1",
"last_contacted": null,
"last_contacted_mode": null,
"city": null,
"state": null,
"country": null,
"phone": "1234567890",
"open_deals_amount": "0.0",
"won_deals_amount": "0.0",
"avatar": null,
"created_at": "2021-02-08T22:46:03+05:30",
"updated_at": "2021-02-10T12:31:56+05:30",
"recent_note": null,
"last_contacted_via_sales_activity": null,
"last_contacted_sales_activity_mode": null,
"last_assigned_at": "2021-02-08T22:46:04+05:30",
"facebook": null,
"twitter": null,
"linkedin": null,
"owner_id": 70000012204
}
Expected Result:
{
"id": 70000227816,
"name": "Everstage Acc 1",
"address": "12, abc street, 1st cross, 2nd main",
"city": null,
"state": null,
"zipcode": null,
"country": null,
"number_of_employees": 11,
"annual_revenue": 12,
"website": null,
"owner_id": 70000012204,
"phone": "1234567890",
"open_deals_amount": "0.0",
"open_deals_count": 0,
"won_deals_amount": "0.0",
"won_deals_count": 0,
"last_contacted": null,
"last_contacted_mode": null,
"facebook": null,
"twitter": null,
"linkedin": null,
"links": {
"conversations": "/crm/sales/sales_accounts/70000227816/conversations/all?include=email_conversation_recipients%2Ctargetable%2Cphone_number%2Cphone_caller%2Cnote%2Cuser&per_page=3",
"document_associations": "/crm/sales/sales_accounts/70000227816/document_associations",
"notes": "/crm/sales/sales_accounts/70000227816/notes?include=creater",
"tasks": "/crm/sales/sales_accounts/70000227816/tasks?include=creater,owner,updater,targetable,users,task_type",
"appointments": "/crm/sales/sales_accounts/70000227816/appointments?include=creater,owner,updater,targetable,appointment_attendees"
},
"custom_field": {
"cf_customer_succses_email_id": "customer2#abc.com"
},
"created_at": "2021-02-08T22:46:03+05:30",
"updated_at": "2021-02-10T12:31:56+05:30",
"avatar": null,
"parent_sales_account_id": null,
"recent_note": null,
"last_contacted_via_sales_activity": null,
"last_contacted_sales_activity_mode": null,
"completed_sales_sequences": null,
"active_sales_sequences": null,
"last_assigned_at": "2021-02-08T22:46:04+05:30",
"tags": [],
"is_deleted": false,
"team_user_ids": null
}

You can get the list of Sales Account using /api/sales_accounts/view/[view_id] with sort and sort type as updated_at and desc to get the latest updated records. The filtered search API /api/filtered_search/[entity] gives only basic details. Try https://developers.freshsales.io/api/#view_account API for complete attributes per record

Related

Project Nested values in KQL from target resources

I am new to KQL, struggling to project values inside target resources but not able to retrieve the required values can you please help me below.
AuditLogs
| where ActivityDisplayName contains "Update user" and InitiatedBy contains "Testuser"
| where TargetResources contains "Id=xxxxxxxx"
wanted to project id and userprinciplename which are coming inside the targetresources, attached screenshot below link for reference
https://ibb.co/DpzZkks
Sample Json
[{
"id": "xyz",
"displayName": null,
"type": "User",
"userPrincipalName": "ABC",
"modifiedProperties": [{
"displayName": "xxxxxx",
"oldValue": "xxxxx",
"newValue": "yyyyy"
},
{
"displayName": "xxxxx",
"oldValue": "[{xxxx}]",
"newValue": "[{xxxx}]"
},
{
"displayName": "Included Updated Properties",
"oldValue": null,
"newValue": "xxxxx"
},
{
"displayName": "TargetId.UserType",
"oldValue": null,
"newValue": "\"Member\""
}
],
"administrativeUnits": []
}]
if TargetResources is of type string, you can use parse_json() to make it of type dynamic, then access its properties as follows:
| extend TargetResources = parse_json(TargetResources)
| project A = tostring(TargetResources.PropertyA),
B = tolong(TargetResources.PropertyB),
C = TargetResources.PropertyC
if TargetResources is already of type dynamic, you can simply access its properties as shown above, without having to invoke parse_json().
relevant documentation topics:
the dynamic data type
the parse_json() function
for example:
print input = '{"key1":1, "key2":"value2", "key3":{"key4":4.4}}'
| extend input = parse_json(input)
| project v1 = tolong(input.key1),
v2 = tostring(input.key2),
v4 = todouble(input.key3.key4)
v1
v2
v4
1
value2
4.4
UPDATE, based on the provided data sample
when dealing with arrays, you can use mv-expand or mv-apply to expand elements in the arrays for further processing
examples:
examples:
print TargetResources = dynamic([{
"id": "xyz",
"displayName": null,
"type": "User",
"userPrincipalName": "ABC",
"modifiedProperties": [{
"displayName": "xxxxxx",
"oldValue": "xxxxx",
"newValue": "yyyyy"
},
{
"displayName": "xxxxx",
"oldValue": "[{xxxx}]",
"newValue": "[{xxxx}]"
},
{
"displayName": "Included Updated Properties",
"oldValue": null,
"newValue": "xxxxx"
},
{
"displayName": "TargetId.UserType",
"oldValue": null,
"newValue": "\"Member\""
}
],
"administrativeUnits": []
}])
| mv-expand TargetResources
| project TargetResources.id, TargetResources.userPrincipalName
TargetResources_id
TargetResources_userPrincipalName
xyz
ABC
print TargetResources = dynamic([{
"id": "xyz",
"displayName": null,
"type": "User",
"userPrincipalName": "ABC",
"modifiedProperties": [{
"displayName": "xxxxxx",
"oldValue": "xxxxx",
"newValue": "yyyyy"
},
{
"displayName": "xxxxx",
"oldValue": "[{xxxx}]",
"newValue": "[{xxxx}]"
},
{
"displayName": "Included Updated Properties",
"oldValue": null,
"newValue": "xxxxx"
},
{
"displayName": "TargetId.UserType",
"oldValue": null,
"newValue": "\"Member\""
}
],
"administrativeUnits": []
}])
| mv-expand TargetResources
| mv-expand TargetResources.modifiedProperties
| project TargetResources_modifiedProperties
TargetResources_modifiedProperties
{ "displayName": "xxxxxx", "oldValue": "xxxxx", "newValue": "yyyyy"}
{ "displayName": "xxxxx", "oldValue": "[{xxxx}]", "newValue": "[{xxxx}]"}
{ "displayName": "Included Updated Properties", "oldValue": null, "newValue": "xxxxx"}
{ "displayName": "TargetId.UserType", "oldValue": null, "newValue": ""Member""}

Kusto Query Specific child records

Is there a way to setup a where clause in Kusto to get specific records with child records
Like if I wanted Kyle from below
Where address has Code = street and that value= grant AND Code = Number and that value= 55555
{
"Firstname": "Bob",
"lastName": "stevens"
"address": [
{
"code": "street",
"value": "Olsen"
},
{
"code": "Number",
"value": "123456"
}
},
{
"Firstname": "Kyle",
"lastName": "richards"
"address": [
{
"code": "street",
"value": "grant"
},
{
"code": "Number",
"value": "55555"
}
}
you could try using mv-apply, and filter for records in which the number of conditions met is as expected:
datatable(i:int, d:dynamic)
[
1, dynamic({"Firstname": "Bob", "lastName": "stevens", "address": [{ "code": "street", "value": "Olsen" }, { "code": "Number", "value": "123456" }]}),
2, dynamic({"Firstname": "Kyle", "lastName": "richards", "address": [{ "code": "street", "value": "grant" }, { "code": "Number", "value": "55555" }]}),
3, dynamic({"Firstname": "Kyle", "lastName": "richards", "address": [{ "code": "street", "value": "grant" }, { "code": "Number", "value": "11111" }]})
]
| mv-apply address = d.address on (
summarize c = countif((address.code == 'street' and address.value == 'grant') or
(address.code == 'Number' and address.value == 55555))
| where c == 2
)
| project-away c
i
d
2
{ "Firstname": "Kyle", "lastName": "richards", "address": [ { "code": "street", "value": "grant" }, { "code": "Number", "value": "55555" } ]}
update: in reply to your comment:
I'm trying to do this with a sproc, Would i need to put this into a datatable then query it like that? If so how do I put a query into a datatable
First, there are no stored procedures in Kusto. there are stored functions.
Second, if you want to invoke a similar logic over an existing table, you can define a stored function that takes a tabular argument as its input. And, optionally, use the invoke operator.
For example:
.create function my_function(T:(d:dynamic)) {
T
| mv-apply address = d.address on (
summarize c = countif((address.code == 'street' and address.value == 'grant') or
(address.code == 'Number' and address.value == 55555))
| where c == 2
)
| project-away c
}
let my_table = datatable(i:int, d:dynamic)
[
1, dynamic({"Firstname": "Bob", "lastName": "stevens", "address": [{ "code": "street", "value": "Olsen" }, { "code": "Number", "value": "123456" }]}),
2, dynamic({"Firstname": "Kyle", "lastName": "richards", "address": [{ "code": "street", "value": "grant" }, { "code": "Number", "value": "55555" }]}),
3, dynamic({"Firstname": "Kyle", "lastName": "richards", "address": [{ "code": "street", "value": "grant" }, { "code": "Number", "value": "11111" }]})
];
my_table
| invoke my_function()

StartDocumentAnalysis is not producing TABLE data

Am trying to detect and extract TABLE/FORMS data from a multi-page PDF (Async operation), which as per docs, "StartDocumentAnalysis" API is the right one. However,the outputs differ in each case when doing from console and from automation (using above API).
Case1: When analyzing same multi-page PDF from Textract console, I see 13 Tables are detected along with Forms/Lines/Words.
{
"BlockType": "CELL",
"Confidence": 67.00711822509766,
"RowIndex": 1,
"ColumnIndex": 2,
"RowSpan": 1,
"ColumnSpan": 1,
"Geometry": {....},
},
"Id": "fba85b26-3340-4f00-912c-5b86f253b7cd",
"Relationships": [
{
"Type": "CHILD",
"Ids": [
"684d019a-8c89-4cc1-81a0-702e581938f6",
"de8def9a-de59-4f70-ae2f-1624b1b607d7"
]
}
],
"Page": 3,
"childText": "Ficus Bank ",
"SearchKey": "Ficus Bank "
}
Case2: When using "StartDocumentAnalysis" API on same PDF from S3, the BlockType ="TABLE" are present in the output but without any data.
{
"BlockType": "CELL",
"ColumnIndex": 2,
"ColumnSpan": 1,
"Confidence": 67.00711822509766,
"EntityTypes": null,
"Geometry": {....},
},
,
"Hint": null,
"Id": "77c2a38a-c36c-4d8d-ba32-7e51a022ee23",
"Page": 3,
"Query": null,
"Relationships": [
{
"Ids": [
"e9b3b510-1041-4d6a-ab42-1fa42643038e",
"0a4d2092-c09e-4a56-aafe-700c006b85a3"
],
"Type": "CHILD"
}
],
"RowIndex": 1,
"RowSpan": 1,
"SelectionStatus": null,
"Text": null,
"TextType": null
},
Observation: The below two keys ("childText" & "SearchKey") are missing from the Async API's output from CELL type of TABLE blocktype.
"childText": "Ficus Bank ",
"SearchKey": "Ficus Bank "
Any info/direction would be appreciated.

Docker expose service to achieve dockerized wordpress multisite

I have been trying to enable Wordpress multisite network for a dockerized Wordpress application.
The application can be accessed via IP and port like this:
http://0.0.0.0:8282
When I enable WP_ALLOW_MULTISITE in wp-config.php I get the error from Wordpress that I can not use domain names with port e.g. :8282
in this particular case.
So I was looking for a way how to expose some domain name from Docker container, instead of 0.0.0.0:8282
I found this example:
https://www.theimpossiblecode.com/blog/docker-wordpress-multisite-with-subdomains/
And I went over the example to make it work, as it is described. Then I intend to look for a way how to implement it for my particular application.
The problem:
I started by exposing a service, described on linked page:
https://www.theimpossiblecode.com/blog/docker-expose-service/
I used the enclosed docker-compose.yml from that page, and when I run
$ docker-compose up -d
the containers appear to be working:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
edaeb215b3eb wordpress:latest "docker-entrypoint.s…" 34 minutes ago Up 34 minutes 80/tcp dockwpress_wordpress_1
5dc6fa8480c6 mysql:5.7 "docker-entrypoint.s…" 34 minutes ago Up 34 minutes 3306/tcp, 33060/tcp dockwpress_db_1
But, I can't access: http://dockerwp and $ dig dockerwp yields this:
; <<>> DiG 9.10.6 <<>> dockerwp
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 23290
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;dockerwp. IN A
;; Query time: 34 msec
;; SERVER: 10.11.137.100#53(10.11.137.100)
;; WHEN: Thu Dec 13 17:05:34 GMT 2018
;; MSG SIZE rcvd: 37
When inspecting the container I see that the dockerwp domain name has been exposed (the "com.theimpossiblecode.expose.host": "dockerwp" line).
$ docker inspect edaeb215b3eb
[
{
"Id": "edaeb215b3eb37e681fed81099c2de65425a4a6c735529366112ba5436e937cb",
"Created": "2018-12-13T16:28:55.122420503Z",
"Path": "docker-entrypoint.sh",
"Args": [
"apache2-foreground"
],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 10823,
"ExitCode": 0,
"Error": "",
"StartedAt": "2018-12-13T16:28:55.733061919Z",
"FinishedAt": "0001-01-01T00:00:00Z"
},
"Image": "sha256:55b751a7663f6d4fdd0d5f3785b0a846868147dceff99dd169f0a33214be3452",
"ResolvConfPath": "/var/lib/docker/containers/edaeb215b3eb37e681fed81099c2de65425a4a6c735529366112ba5436e937cb/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/edaeb215b3eb37e681fed81099c2de65425a4a6c735529366112ba5436e937cb/hostname",
"HostsPath": "/var/lib/docker/containers/edaeb215b3eb37e681fed81099c2de65425a4a6c735529366112ba5436e937cb/hosts",
"LogPath": "/var/lib/docker/containers/edaeb215b3eb37e681fed81099c2de65425a4a6c735529366112ba5436e937cb/edaeb215b3eb37e681fed81099c2de65425a4a6c735529366112ba5436e937cb-json.log",
"Name": "/dockwpress_wordpress_1",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "",
"ExecIDs": null,
"HostConfig": {
"Binds": [],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {}
},
"NetworkMode": "dockwpress_default",
"PortBindings": {},
"RestartPolicy": {
"Name": "always",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": [],
"CapAdd": null,
"CapDrop": null,
"Dns": null,
"DnsOptions": null,
"DnsSearch": null,
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "shareable",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": null,
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "runc",
"ConsoleSize": [
0,
0
],
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": null,
"BlkioDeviceReadBps": null,
"BlkioDeviceWriteBps": null,
"BlkioDeviceReadIOps": null,
"BlkioDeviceWriteIOps": null,
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": null,
"DeviceCgroupRules": null,
"DiskQuota": 0,
"KernelMemory": 0,
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": false,
"PidsLimit": 0,
"Ulimits": null,
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware"
],
"ReadonlyPaths": [
"/proc/asound",
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/8ab6c3eb7bb9e80de85a5c39849775d339d9466c182b236eca411f1cb32d7f29-init/diff:/var/lib/docker/overlay2/44b78d4977abf7cab796267c277db0e31efd5190f917dce4167237070fb0317e/diff:/var/lib/docker/overlay2/1d3fb40ede0d5e2626d4d1ea19e93cb15702a7bcb569bf2811e652d25409623f/diff:/var/lib/docker/overlay2/f59d3c961f65e7ad1297bf888ed04905dff998a31a5796c7c903a8f854749a3b/diff:/var/lib/docker/overlay2/af222f8ba1e9c68b16935d08a0325ec8ff173a2944082e8d3e568a2c738d591f/diff:/var/lib/docker/overlay2/1bac18c6dc58c3ebd7982dd3ccdfb7fdbc4037de6277c20d84baba95babaf4c1/diff:/var/lib/docker/overlay2/32df749d5027d957ebba6167f8715bbbc117c0787c8d5849f318391d427dfcaf/diff:/var/lib/docker/overlay2/e6927c13204369a44dc8f4de4a8ab8a3307b0f8fa5eb758a565a67a1b923451a/diff:/var/lib/docker/overlay2/a6299eec8f02b0c2a190a9646b7576209e0e39f6bae1d81f543daaabe0dd89d4/diff:/var/lib/docker/overlay2/d0e4d7ff78e7373c4f3885e8cad840617764e9a803bda6eb30e681cdc910bf51/diff:/var/lib/docker/overlay2/fc48c85e773fd6d0e52b4a84116224d2ee0a396a470df44b009fb56ef8276704/diff:/var/lib/docker/overlay2/77aea6e322140a30aff363c97e67bad3f2ab78f301ebdadc89275f9e1e86ad0d/diff:/var/lib/docker/overlay2/fec4aae10fb644332df8a1c286c9635a1ae85f2d9aaf8838ae08b7e6f3268a8d/diff:/var/lib/docker/overlay2/41bfdb4f1afa0d88890af4deb33c403e5816a6b2823d3a9ed5fb19079b4faa9b/diff:/var/lib/docker/overlay2/5aa746815fbdaeedc7a727ca34072f1183af9bc0ba7908b480e37ee9f5884761/diff:/var/lib/docker/overlay2/aa6c25c7e61f3512a55f69ed5c39f492b80a500704bdc9a91af8ff811f74f58d/diff:/var/lib/docker/overlay2/41c27f1bb64072e7deebc7eee4b46f3c38b63e2bc56ebfaf9c88159f1d6c67c2/diff:/var/lib/docker/overlay2/512ece5edecc822e72e5d939d75339e02582696dbc5205f756516c4b635ff9d3/diff:/var/lib/docker/overlay2/7bd7bb38c22c9ee4dd2c38d2c32ac12bbb2034c759879a26b73b351ac7a5e26e/diff:/var/lib/docker/overlay2/602c7d2fa85ca8e4945236214ffb852abcfd716f5626d273b510b470d7878d02/diff",
"MergedDir": "/var/lib/docker/overlay2/8ab6c3eb7bb9e80de85a5c39849775d339d9466c182b236eca411f1cb32d7f29/merged",
"UpperDir": "/var/lib/docker/overlay2/8ab6c3eb7bb9e80de85a5c39849775d339d9466c182b236eca411f1cb32d7f29/diff",
"WorkDir": "/var/lib/docker/overlay2/8ab6c3eb7bb9e80de85a5c39849775d339d9466c182b236eca411f1cb32d7f29/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "volume",
"Name": "bd2706aae2dbddaa65a85e77ca89efc3844dc600f72e1e8b1f9b6803cbb8459c",
"Source": "/var/lib/docker/volumes/bd2706aae2dbddaa65a85e77ca89efc3844dc600f72e1e8b1f9b6803cbb8459c/_data",
"Destination": "/var/www/html",
"Driver": "local",
"Mode": "",
"RW": true,
"Propagation": ""
}
],
"Config": {
"Hostname": "edaeb215b3eb",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"80/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"WORDPRESS_DB_HOST=db:3306",
"WORDPRESS_DB_USER=wordpress",
"WORDPRESS_DB_PASSWORD=wordpress",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"PHPIZE_DEPS=autoconf \t\tdpkg-dev \t\tfile \t\tg++ \t\tgcc \t\tlibc-dev \t\tmake \t\tpkg-config \t\tre2c",
"PHP_INI_DIR=/usr/local/etc/php",
"APACHE_CONFDIR=/etc/apache2",
"APACHE_ENVVARS=/etc/apache2/envvars",
"PHP_EXTRA_BUILD_DEPS=apache2-dev",
"PHP_EXTRA_CONFIGURE_ARGS=--with-apxs2 --disable-cgi",
"PHP_CFLAGS=-fstack-protector-strong -fpic -fpie -O2",
"PHP_CPPFLAGS=-fstack-protector-strong -fpic -fpie -O2",
"PHP_LDFLAGS=-Wl,-O1 -Wl,--hash-style=both -pie",
"GPG_KEYS=1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F",
"PHP_VERSION=7.2.13",
"PHP_URL=https://secure.php.net/get/php-7.2.13.tar.xz/from/this/mirror",
"PHP_ASC_URL=https://secure.php.net/get/php-7.2.13.tar.xz.asc/from/this/mirror",
"PHP_SHA256=14b0429abdb46b65c843e5882c9a8c46b31dfbf279c747293b8ab950c2644a4b",
"PHP_MD5=",
"WORDPRESS_VERSION=5.0",
"WORDPRESS_SHA1=67758958f14c1dcefe37ce6558d470a4e142893b"
],
"Cmd": [
"apache2-foreground"
],
"ArgsEscaped": true,
"Image": "wordpress:latest",
"Volumes": {
"/var/www/html": {}
},
"WorkingDir": "/var/www/html",
"Entrypoint": [
"docker-entrypoint.sh"
],
"OnBuild": null,
"Labels": {
"com.docker.compose.config-hash": "c8ce0ffef4cef318c23c0e6142dcb5b42a97df29507969c72a99e95b3343f0ec",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "dockwpress",
"com.docker.compose.service": "wordpress",
"com.docker.compose.version": "1.23.2",
"com.theimpossiblecode.expose.host": "dockerwp"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "83bdba7bf688685fa842ab8c1c38a53f26af088c2fd1063492ae55cb73cc6cd6",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"80/tcp": null
},
"SandboxKey": "/var/run/docker/netns/83bdba7bf688",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "",
"Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "",
"IPPrefixLen": 0,
"IPv6Gateway": "",
"MacAddress": "",
"Networks": {
"dockwpress_default": {
"IPAMConfig": null,
"Links": null,
"Aliases": [
"wordpress",
"edaeb215b3eb"
],
"NetworkID": "6b7d8cc32a6e208f379a8ecfdf88910c85c575e284ad2e3632520fe86ec937ad",
"EndpointID": "a7d991d525463bb83b2eedb78baf59358d8a543f3b5244034eaea6cce99ef525",
"Gateway": "172.28.0.1",
"IPAddress": "172.28.0.3",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:1c:00:03",
"DriverOpts": null
}
}
}
}
]
What could be causing the http://dockerwp to be not accessible?
Browser shows this error:
This site can’t be reached dockerwp’s server IP address could not be found.
Did you mean http://docker.com/?
Search Google for docker wp
ERR_NAME_NOT_RESOLVED
Thank you.
dockerwp in http://dockerwp is a domain name that does not exist.
You example is only valid if you deploy your wp site to their platform which will give you a subdomain called "dockerwp". The label om.theimpossiblecode.expose.host is read by their reverse proxy to create this effect.
In conclusion you can't set hostname with this configuration. You will be better off just access your site with localhost:port.
The solution is to use Nginx proxy server e.g. https://github.com/jwilder/nginx-proxy
So by using two containers, one is the proxy and another is Wordpress application docker container, you can add vhost entries to /etc/hosts as 127.0.0.1 devwebsite.local for any of required virtual hosts. Those have to be configured for the WP container, the VIRTUAL_HOST env. variable.
Here is the example:https://github.com/djuro/dockerMultisiteWordpress, the Dockerfile and docker-compose.yml in particular.
I used 2 more containers, for database and GUI db tool (Adminer), but those are both optional.

How can I get the top 100 Freebase films ranked by "popularity"?

I basically just want a list of "big time movies"....
I'm not sure which property to use for this - I tried the gross_revenue fields but they all seem to come back blank:
[{
"type": "/film/film",
"limit": 100,
"name": null,
"id": null,
"/common/topic/image": {
"id": null,
"limit": 1
},
"gross_revenue": null
}]
Any thoughts from any Freebase experts?
The expected type for the gross revenue property is a dated monetary value, so it has not only a number, but a currency and a date associated with it. Even if it had a number, your original query wouldn't return the top 100 because it's not sorting them, so you're just getting the first 100 random films.
This query will give you the 100 films with the largest number for gross revenue value, without taking into account currency or inflation:
[{
"type": "/film/film",
"limit": 100,
"name": null,
"id": null,
"/common/topic/image": {
"id": null,
"limit": 1
},
"gross_revenue": [{
"amount": null,
"currency": null,
"valid_date": null
}],
"sort": "-gross_revenue.amount"
}]

Resources