Validate the Content of a Site
/sites/management/api/v1/sites/{id}/validate
Validate the pages of an enterprise site with regards to translations. When a site is validated the pages are checked to see if the translations match up with the localization policy and language details of the site channel. Per page details are provided that give an indication to whether the page has missing translations and for what languages. Assets used on the page are also listed indicating the version of each asset, such as whether the asset is draft or published.
Introduced in release 19.4.1.
Authorization
To invoke this operation, the authenticated user or client application must have been shared with the resource and have one of the following sharing roles:
- Owner
- Manager
Path Alternative Identifiers
The default identifier for a Site resource is the Site Identifier. The Site resource supports alternative identifiers.
nameSite Name
Instead of the site identifier, the site name can be used to uniquely identify a site in the resource path. The default resource path parameter for a site is the site identifier, but when working with sites the human-readable site name is sometimes easier.
http://api.example.com/sites/management/api/v1/sites/name:MyNewProduct/validate
Introduced in release 19.4.1.
Successful Response Examples
This operation responds with the following success (2xx) responses. For a full list of response HTTP status codes and example bodies, consult the Response section of this operation.
200OK - Valid Site Results
A a successful validation result include details of the siteinfo
, structure
pages and a home page.
Request
POST https://api.example.com/sites/management/api/v1/sites/{id}/validate
Response Body
{ "valid": false, "pages": [ { "id": "siteinfo", "name": "siteinfo", "type": "siteinfo", "publishable": false, "languages": [ { "language": "fr-FR", "policyStatus": "required", "validation": "missing" }, { "language": "de-DE", "policyStatus": "optional", "validation": "ready" }, { "language": "es-ES", "policyStatus": "undefined", "validation": "excluded" } ], "usedAssets": [ ] }, { "id": "structure", "name": "structure", "type": "structure", "publishable": false, "languages": [ { "language": "fr-FR", "policyStatus": "required", "validation": "missing" }, { "language": "de-DE", "policyStatus": "optional", "validation": "ready" }, { "language": "es-ES", "policyStatus": "undefined", "validation": "excluded" } ], "usedAssets": [ ] }, { "id": "10", "name": "Home", "type": "page", "publishable": false, "languages": [ { "language": "fr-FR", "policyStatus": "required", "validation": "missing" }, { "language": "de-DE", "policyStatus": "optional", "validation": "ready" }, { "language": "es-ES", "policyStatus": "undefined", "validation": "excluded" } ], "usedAssets": [ { "id": "CORED2FDC62C23504F6AB47B1F6106F9DC73", "version": "draft" }, { "id": "CORE48AF98371AFC4568B260D4417E38A739", "version": "published" }, { "id": "CONTBD592905665C4652BFEAE6FD19E9F291", "version": "draft" }, { "id": "CONT9DE7B749A5E9438689492A0054C02707", "version": "draft" } ] } ] }
Client Error Response Examples
This operation responds with following client error (4xx) responses with exception details in the response body. For a full list of response HTTP status codes and example bodies, consult the Response section of this operation.
403Forbidden - Site Operation Forbidden
Your sharing role within the site does not allow you to perform the operation.
Error Code
OCE-SITEMGMT-009026
Resolution - Change the Sharing Role
Change the sharing role given to the authenticated user to the required role or higher.
Resolution - Change the Application Role
Ensure the user has a Standard User or Enterprise User Application Role.
Exception Detail Fields
This error type includes the following fields/values in the response:
Field Name | Description |
site | Site on which the operation is being performed. |
For detailed information about this exception detail type, consult the SiteOperationForbiddenExceptionDetail schema in the definitions section of the swagger document.
Example Response Body
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1", "title": "Site Operation Forbidden", "status": "403", "detail": "You do have a sharing role in this site, but your role does not allow you to use this operation.", "o:errorCode": "OCE-SITEMGMT-009026", "site": { "id": "FCA9C0E5CDCB549A19FFB85987A2352778961003B8A0" } }
Introduced in release 19.1.5.
404Not Found - Site Not Found
The site does not exist or has been deleted, or the authenticated user or client application does not have access to the site.
Error Code
OCE-SITEMGMT-009003
Resolution - Check Identifier
Check that the site identifier is valid.
Resolution - Check Membership
Check that the authenticated user is a member of the site or a site administrator.
Exception Detail Fields
This error type includes the following fields/values in the response:
Field Name | Description |
site | Site that does not exist or is not visible to the authenticated user. |
For detailed information about this exception detail type, consult the SiteNotFoundExceptionDetail schema in the definitions section of the swagger document.
Example Response Body
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1", "title": "Site Not Found", "status": "404", "detail": "Site does not exist or has been deleted, or the authenticated user or client application does not have access to the site.", "o:errorCode": "OCE-SITEMGMT-009003", "site": { "id": "FCA9C0E5CDCB549A19FFB85987A2352778961003B8A0" } }
409Conflict - Site Deleted
The operation cannot be performed on a soft deleted site. This error can only occur when the includeDeleted
query parameter is set to true
.
Error Code
OCE-SITEMGMT-009059
Resolution - Restore Site
Restore the site and then try the operation again.
Exception Detail Fields
This error type includes the following fields/values in the response:
Field Name | Description |
site | Site that is soft deleted, if the site identifier has been provided. |
For detailed information about this exception detail type, consult the SiteDeletedExceptionDetail schema in the definitions section of the swagger document.
Example Response Body
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1", "title": "Site Deleted", "status": "409", "detail": "The operation cannot be performed as the site has been soft deleted.", "o:errorCode": "OCE-SITEMGMT-009059", "site": { "id": "FCA9C0E5CDCB549A19FFB85987A2352778961003B8A0" } }
Introduced in release 19.4.1.
409Conflict - Missing Site Default Language
The site must have a default to perform this operation.
Error Code
OCE-SITEMGMT-001008
Example Response Body
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1", "title": "Missing Site Default Language", "status": "409", "detail": "Default language for the site is missing.", "o:errorCode": "OCE-SITEMGMT-001008" }
Introduced in release 19.4.1.
409Conflict - Missing Site Localization Policy
The site must have a localization policy to perform this operation.
Error Code
OCE-SITEMGMT-009074
Example Response Body
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1", "title": "Missing Site Localization Policy", "status": "409", "detail": "Localization policy for site is missing.", "o:errorCode": "OCE-SITEMGMT-009074" }
Introduced in release 19.4.1.
409Conflict - Invalid Site Default Language
Site has a default language that does not match the localization policy's required languages.
Error Code
OCE-SITEMGMT-009075
Exception Detail Fields
This error type includes the following fields/values in the response:
Field Name | Description |
defaultLanguage | Invalid default language. |
For detailed information about this exception detail type, consult the InvalidSiteDefaultLanguageExceptionDetail schema in the definitions section of the swagger document.
Example Response Body
{ "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1", "title": "Invalid Site Default Language", "status": "409", "detail": "Default Language '{defaultLanguage}' for site is not valid. The default language must be one of the localization policy's required languages.", "o:errorCode": "OCE-SITEMGMT-009075", "defaultLanguage": "en-US" }
Introduced in release 19.4.1.
Request
-
id: string
Immutable identifier for the site.
-
includeDeleted(optional): boolean
Resources that have been marked for deletion can be read, modified, and support extended operations as long this query parameter is set to
true
. When theincludeDeleted
query parameter is not sent then the response to read, modification, and extended operations will be identical to that which would be returned if the resource was permanently deleted.
Response
- application/json
- application/vnd.oracle.resource+json;type=singular
200 Response
-
Cache-Control: string
Directives for caching mechanisms.
-
Content-Length: string
Size of the response body.
-
Content-Type: string
Content type of the response.
-
object
SiteValidationResult
Result of site content validation against localization policy configured on site channel.
object
Result of site content validation against localization policy configured on site channel.
-
pages(optional):
array pages
List of page objects including
siteinfo
and structure. -
valid(optional):
boolean
Validation status of the site validation processing. A value of
true
indicates the site is validate.
array
List of page objects including siteinfo
and structure.
-
object
SitePageValidationResult
Result for an individual page for site content validation against localization policy configured on site channel.
object
Result for an individual page for site content validation against localization policy configured on site channel.
-
id(optional):
string
Page identifier.
-
languages(optional):
array languages
List of language validation information for each site page. The
siteinfo
andstructure
pages are included in this list. Lists all languages defined in the site channel localization policy plus languages the page is translated into. -
name(optional):
string
Page name.
-
publishable(optional):
boolean
Indicates if the page is publishable or not.
-
type(optional):
string
Page type.
-
usedAssets(optional):
array usedAssets
List of asset validation information for assets used by the site.
array
List of language validation information for each site page. The siteinfo
and structure
pages are included in this list. Lists all languages defined in the site channel localization policy plus languages the page is translated into.
array
List of asset validation information for assets used by the site.
-
object
LanguageValidationResult
Result for an individual page for site content validation against localization policy configured on the site channel.
object
Result for an individual page for site content validation against localization policy configured on the site channel.
-
language(optional):
string
Language.
-
policyStatus(optional):
string
Localization policy validation status for this language.
Valid values are:
-
required
- Required language translation is missing -
optional
- Required language translation is optional -
undefined
- Language not defined by localization policy
-
-
validation(optional):
string
Validation status for this language.
Valid values are:
-
missing
- Page language missing -
ready
- Page language ready -
excluded
- Page language excluded
-
object
Information about an asset used on a site page.
-
id(optional):
string
Asset identifier.
-
version(optional):
string
Asset version.
Valid values are:
-
draft
- A draft asset is not published during site publish -
published
- A published asset is published during site publish
-
{
"valid":false,
"pages":[
{
"id":"siteinfo",
"name":"siteinfo",
"type":"siteinfo",
"publishable":false,
"languages":[
{
"language":"fr-FR",
"policyStatus":"required",
"validation":"missing"
},
{
"language":"de-DE",
"policyStatus":"optional",
"validation":"ready"
},
{
"language":"es-ES",
"policyStatus":"undefined",
"validation":"excluded"
}
],
"usedAssets":[
]
},
{
"id":"structure",
"name":"structure",
"type":"structure",
"publishable":false,
"languages":[
{
"language":"fr-FR",
"policyStatus":"required",
"validation":"missing"
},
{
"language":"de-DE",
"policyStatus":"optional",
"validation":"ready"
},
{
"language":"es-ES",
"policyStatus":"undefined",
"validation":"excluded"
}
],
"usedAssets":[
]
},
{
"id":"10",
"name":"Home",
"type":"page",
"publishable":false,
"languages":[
{
"language":"fr-FR",
"policyStatus":"required",
"validation":"missing"
},
{
"language":"de-DE",
"policyStatus":"optional",
"validation":"ready"
},
{
"language":"es-ES",
"policyStatus":"undefined",
"validation":"excluded"
}
],
"usedAssets":[
{
"id":"CORED2FDC62C23504F6AB47B1F6106F9DC73",
"version":"draft"
},
{
"id":"CORE48AF98371AFC4568B260D4417E38A739",
"version":"published"
},
{
"id":"CONTBD592905665C4652BFEAE6FD19E9F291",
"version":"draft"
},
{
"id":"CONT9DE7B749A5E9438689492A0054C02707",
"version":"draft"
}
]
}
]
}
400 Response
401 Response
403 Response
-
allOf
SiteOperationForbiddenExceptionDetail
Introduced in release 19.1.5.
-
object
ExceptionDetail
In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.
-
object
SiteOperationForbiddenExceptionDetail-allOf[1]
object
In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.
-
detail(optional):
string
Description specific to this occurrence of the problem. The human-readable, potentially multi-line details describing the problem in more details.
-
instance(optional):
string(uri)
URI to the link that provides more detail about the error.
-
o:errorCode(optional):
string
Application error code, which is different from HTTP error code. This code should be used to check for specific errors, rather than comparing fields such as the
title
ordetail
. -
o:errorDetails(optional):
array o:errorDetails
Multiple errors can be organized in a hierarchical structure.
-
o:errorPath(optional):
string
XPath or JSON path to indicate where the error occurs.
-
status(optional):
integer(int32)
Corresponding HTTP status code for the error.
-
title(optional):
string
Short, human-readable summary of the problem. It is not advisable to use the title as a way of checking for specific errors, use the
o:errorCode
for this purpose. -
type(optional):
string(uri)
Absolute URI that identifies the problem type. When this URI dereferenced, it should provide a human-readable summary of the problem, for example, as a HTML page.
object
-
site(optional):
string
Site on which the operation is being performed.
Introduced in release 19.1.5.
array
Multiple errors can be organized in a hierarchical structure.
-
object
ExceptionDetail
In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.
{
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
"title":"Site Operation Forbidden",
"status":"403",
"detail":"You do have a sharing role in this site, but your role does not allow you to use this operation.",
"o:errorCode":"OCE-SITEMGMT-009026",
"site":{
"id":"FCA9C0E5CDCB549A19FFB85987A2352778961003B8A0"
}
}
404 Response
-
Cache-Control: string
Directives for caching mechanisms.
-
Content-Length: string
Size of the response body.
-
Content-Type: string
Content type of the response.
-
object
ExceptionDetail
In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.
-
object
SiteNotFoundExceptionDetail-allOf[1]
object
In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.
-
detail(optional):
string
Description specific to this occurrence of the problem. The human-readable, potentially multi-line details describing the problem in more details.
-
instance(optional):
string(uri)
URI to the link that provides more detail about the error.
-
o:errorCode(optional):
string
Application error code, which is different from HTTP error code. This code should be used to check for specific errors, rather than comparing fields such as the
title
ordetail
. -
o:errorDetails(optional):
array o:errorDetails
Multiple errors can be organized in a hierarchical structure.
-
o:errorPath(optional):
string
XPath or JSON path to indicate where the error occurs.
-
status(optional):
integer(int32)
Corresponding HTTP status code for the error.
-
title(optional):
string
Short, human-readable summary of the problem. It is not advisable to use the title as a way of checking for specific errors, use the
o:errorCode
for this purpose. -
type(optional):
string(uri)
Absolute URI that identifies the problem type. When this URI dereferenced, it should provide a human-readable summary of the problem, for example, as a HTML page.
object
-
site(optional):
string
Site that does not exist or is not visible to the authenticated user.
array
Multiple errors can be organized in a hierarchical structure.
-
object
ExceptionDetail
In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.
{
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
"title":"Site Not Found",
"status":"404",
"detail":"Site does not exist or has been deleted, or the authenticated user or client application does not have access to the site.",
"o:errorCode":"OCE-SITEMGMT-009003",
"site":{
"id":"FCA9C0E5CDCB549A19FFB85987A2352778961003B8A0"
}
}
406 Response
409 Response
-
allOf
SiteDeletedExceptionDetail
Introduced in release 19.4.1.
-
object
ExceptionDetail
In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.
-
object
SiteDeletedExceptionDetail-allOf[1]
object
In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.
-
detail(optional):
string
Description specific to this occurrence of the problem. The human-readable, potentially multi-line details describing the problem in more details.
-
instance(optional):
string(uri)
URI to the link that provides more detail about the error.
-
o:errorCode(optional):
string
Application error code, which is different from HTTP error code. This code should be used to check for specific errors, rather than comparing fields such as the
title
ordetail
. -
o:errorDetails(optional):
array o:errorDetails
Multiple errors can be organized in a hierarchical structure.
-
o:errorPath(optional):
string
XPath or JSON path to indicate where the error occurs.
-
status(optional):
integer(int32)
Corresponding HTTP status code for the error.
-
title(optional):
string
Short, human-readable summary of the problem. It is not advisable to use the title as a way of checking for specific errors, use the
o:errorCode
for this purpose. -
type(optional):
string(uri)
Absolute URI that identifies the problem type. When this URI dereferenced, it should provide a human-readable summary of the problem, for example, as a HTML page.
object
-
site(optional):
string
Site that is soft deleted, if the site identifier has been provided.
Introduced in release 19.4.1.
array
Multiple errors can be organized in a hierarchical structure.
-
object
ExceptionDetail
In addition to HTTP error code and error messages, it is often desirable to provide additional information to the client when a request fails. In such cases, the additional information will be included in the response body.
{
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
"title":"Site Deleted",
"status":"409",
"detail":"The operation cannot be performed as the site has been soft deleted.",
"o:errorCode":"OCE-SITEMGMT-009059",
"site":{
"id":"FCA9C0E5CDCB549A19FFB85987A2352778961003B8A0"
}
}
{
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
"title":"Missing Site Default Language",
"status":"409",
"detail":"Default language for the site is missing.",
"o:errorCode":"OCE-SITEMGMT-001008"
}
{
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
"title":"Missing Site Localization Policy",
"status":"409",
"detail":"Localization policy for site is missing.",
"o:errorCode":"OCE-SITEMGMT-009074"
}
{
"type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
"title":"Invalid Site Default Language",
"status":"409",
"detail":"Default Language '{defaultLanguage}' for site is not valid. The default language must be one of the localization policy's required languages.",
"o:errorCode":"OCE-SITEMGMT-009075",
"defaultLanguage":"en-US"
}