User tests: Successful: Unsuccessful:
Pull Request for Issue #43813 .
Added schema.org data handling to the endpoints of com_content, com_contact
GET {{base_path}}/api/index.php/v1/content/articles
GET {{base_path}}/api/index.php/v1/content/articles/nn
GET {{base_path}}/api/index.php/v1/contacts
GET {{base_path}}/api/index.php/v1/contacts/nn
POST {{base_path}}/api/index.php/v1/content/articles
Example payload:
{
"alias": "my-article001",
"articletext": "My text",
"catid": 2,
"language": "*",
"metadesc": "",
"metakey": "",
"title": "Here's an article",
"schema": {
"schemaType": "Article",
"Article": {
"@type": "Article",
"image": "",
"headline": "head",
"description": "desc",
"author": {
"@type": "person",
"name": "nik",
"url": "http://www.alikonweb.it",
"logo": {
"@type": "ImageObject",
"url": ""
},
"email": "alikon@alikonweb.it",
"address": {
"@type": "PostalAddress",
"addressLocality": "loc",
"postalCode": "0000",
"streetAddress": "via x"
}
},
"datePublished": "",
"dateModified": "",
"genericField": []
}
}
}PATCH {{base_path}}/api/index.php/v1/content/articles/nn
Example payload:
{
"introtext": "My patched text with schema.org",
"catid": 2,
"language": "*",
"metadesc": "",
"metakey": "",
"title": "Here's an article",
"schema": {
"schemaType": "Article",
"Article": {
"@type": "Article",
"image": "",
"headline": "head",
"description": "desc",
"author": {
"@type": "person",
"name": "nik",
"url": "http://www.alikonweb.it",
"logo": {
"@type": "ImageObject",
"url": ""
},
"email": "alikon@alikonweb.it",
"address": {
"@type": "PostalAddress",
"addressLocality": "loc",
"postalCode": "0090",
"streetAddress": "via y"
}
},
"datePublished": "",
"dateModified": "",
"genericField": []
}
}
}Be aware that with PATCH you need to pass the whole schema structure if don't pass it is like you want to remove it
DELETE {{base_path}}/api/index.php/v1/content/articles/nn
POST {{base_path}}/api/index.php/v1/contacts
Example payload:
{"alias":"b-contact","catid":4,"language":"*","name":"randomFullName",
"schema": {
"schemaType": "Organization",
"Organization": {
"@type": "Organization",
"name": "nikola",
"image": "",
"url": "http://www.demo.alikonweb.it",
"email": "demo@alikonweb.it",
"address": {
"@type": "PostalAddress",
"addressLocality": "roma",
"postalCode": "00100",
"streetAddress": "viale egeo"
},
"genericField": []
}
}
}PATCH {{base_path}}/api/index.php/v1/contacts/nn
Example payload:
{"alias":"b-contact","catid":4,"language":"*","name":"randomFullNameetc",
"schema": {
"schemaType": "Organization",
"Organization": {
"@type": "Organization",
"url": "http://www.demo.alikonweb.it",
"email": "demo@alikonweb.it",
"address": {
"@type": "PostalAddress",
"addressLocality": "Milan",
"postalCode": "00100",
"streetAddress": "viale egeo"
},
"genericField": []
}
}
}Be aware that with PATCH you need to pass the whole schema structure if don't pass it is like you want to remove it
DELETE {{base_path}}/api/index.php/v1/contacts/nn
N/A
schemaorg data returned in the response
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Labels |
Added:
PR-6.1-dev
|
||
| Labels |
Added:
Webservices
|
||
| Category | ⇒ | Front End Plugins |
| Category | Front End Plugins | ⇒ | Administration com_content Front End Plugins |
| Title |
|
||||||
| Category | Front End Plugins Administration com_content | ⇒ | Administration com_contact com_content Front End Plugins |