I have a content type: siteinfo
.
This content type has multiple fields: text, entity reference etc.
I want to use an external API to automatically fill some fields of the created node.
The API I want to use says that:
API returns consistent and well-structured data in XML & JSON format. Returned data contains parsed fields that can easily be used by your application. This is a RESTful based API.
And this is the API's output:
{
"status": 1,
"api_query": "siteinfo",
"whois_record": {
"domain_name": "example.com",
"query_time": "2016-05-05 14:01:12",
"create_date": "1995-08-14",
"update_date": "2015-08-14",
"expiry_date": "2016-08-13",
"domain_registrar": {
"iana_id": 376,
"registrar_name": "RESERVED-INTERNET ASSIGNED NUMBERS AUTHORITY",
"whois_server": "whois.iana.org",
"referral_url": "http://res-dom.iana.org"
},
"name_servers": [
"a.iana-servers.net",
"b.iana-servers.net"
],
},
}