Resource for the link checker
Check an external link for validity
media type | data type | description |
---|---|---|
application/json | CheckExternalLinkRequest (JSON) | request containing the link to check |
code | condition |
---|---|
200 | Check result is returned. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
405 | The feature link_checker is not activated. |
media type | data type | description |
---|---|---|
application/json | CheckResponse (JSON) | check response |
POST /linkChecker/check
Content-Type: application/json
Accept: application/json
{
"url" : "..."
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"valid" : true,
"reason" : "...",
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Get list of pages containing external links
name | type | description | default | constraints | multivalued |
---|---|---|---|---|---|
editable | query | Flag to restrict returned pages to those, that are editable by the user | false | boolean | no |
iscreator | query | (optional) true when only the pages created by the user shall be returned | false | boolean | no |
iseditor | query | (optional) true when only the pages last edited by the user shall be returned | false | boolean | no |
language | query | Optional filtering for page languages. Defaults to no filtering (i.e. returning pages of all languages). Filtering can be done by language code or ID. | yes | ||
nodeId | query | Optional node ID for getting pages of a single node/channel only | int | no | |
online | query | (optional) true to restrict to online pages, false to restrict to offline pages | boolean | no | |
page | query | Returned page, if paging is used. Paging starts with 1 |
1 | int | no |
pageSize | query | Page size for paging. If this is set to -1 no paging is used (all matching items are returned).
Setting this to 0 will return no items. |
-1 | int | no |
perms | query | Flag to add permission information for the returned items. | false | boolean | no |
q | query | Query string for filtering | no | ||
sort | query | Comma separated list of sorted attributes.
Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order |
name | no | |
status | query | Optional filtering for validity status. Defaults to no filtering (i.e. returning all pages with external links) | "invalid" or "unchecked" or "valid" | yes |
code | condition |
---|---|
200 | The pages containing external links are returned. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
405 | The feature link_checker is not activated. |
media type | data type | description |
---|---|---|
application/json | PageList (JSON) | response containing a list of pages with external links |
GET /linkChecker/pages
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"items" : [ { }, { } ],
"hasMoreItems" : true,
"numItems" : 12345,
"perms" : {
"property1" : [ "createfolder", "formreport" ],
"property2" : [ "inheritance", "userassignment" ]
},
"stagingStatus" : {
"property1" : {
"packageName" : "...",
"included" : true
},
"property2" : {
"packageName" : "...",
"included" : true
}
},
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Get link checker statistics
name | type | description | constraints |
---|---|---|---|
nodeId | query | optional node ID for getting node specific statistics | int |
online | query | (optional) true to restrict to online pages, false to restrict to offline pages | boolean |
code | condition |
---|---|
200 | LinkChecker statistics are returned. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
405 | The feature link_checker is not activated. |
media type | data type | description |
---|---|---|
application/json | ExternalLinkStatistics (JSON) | statistics response |
GET /linkChecker/stats
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"lastRun" : 12345,
"valid" : 12345,
"invalid" : 12345,
"unchecked" : 12345,
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Get the external links contained in a single page
name | type | description |
---|---|---|
id | path | page ID |
code | condition |
---|---|
200 | The external links of the page are returned. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
405 | The feature link_checker is not activated. |
media type | data type | description |
---|---|---|
application/json | ExternalLinkList (JSON) | response containing the external links of the page |
GET /linkChecker/pages/{id}
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"items" : [ { }, { } ],
"hasMoreItems" : true,
"numItems" : 12345,
"perms" : {
"property1" : [ "updateitems", "delete" ],
"property2" : [ "userassignment", "createitems" ]
},
"stagingStatus" : {
"property1" : {
"packageName" : "...",
"included" : true
},
"property2" : {
"packageName" : "...",
"included" : true
}
},
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Update the validity status for external links contained in the page. Update permissions on the page are required.
name | type | description |
---|---|---|
id | path | page ID |
media type | data type | description |
---|---|---|
application/json | UpdateExternalLinkStatusRequest (JSON) | request containing external links with updated status |
code | condition |
---|---|
200 | The status of the posted external links has been updated. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
405 | The feature link_checker is not activated. |
media type | data type | description |
---|---|---|
application/json | GenericResponse (JSON) | generic response |
POST /linkChecker/pages/{id}
Content-Type: application/json
Accept: application/json
{
"items" : [ {
"id" : 8,
"contentId" : 115,
"contenttagId" : 685,
"contenttagName" : "gtxalohapagelink2",
"valueId" : 2859,
"partName" : "URL",
"url" : "https://totally.invalid.url/",
"text" : "Webshop",
"lastCheckTimestamp" : 1591693475,
"lastStatus" : "invalid",
"lastReason" : "unknown host",
"history" : [ {
"timestamp" : 1591693475,
"status" : "invalid",
"reason" : "unknown host"
}, {
"timestamp" : 1591693475,
"status" : "invalid",
"reason" : "unknown host"
} ]
}, {
"id" : 8,
"contentId" : 115,
"contenttagId" : 685,
"contenttagName" : "gtxalohapagelink2",
"valueId" : 2859,
"partName" : "URL",
"url" : "https://totally.invalid.url/",
"text" : "Webshop",
"lastCheckTimestamp" : 1591693475,
"lastStatus" : "invalid",
"lastReason" : "unknown host",
"history" : [ {
"timestamp" : 1591693475,
"status" : "invalid",
"reason" : "unknown host"
}, {
"timestamp" : 1591693475,
"status" : "invalid",
"reason" : "unknown host"
} ]
} ]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Load a single link. Response contains additional information about occurrence of URL in the system
name | type | description | constraints |
---|---|---|---|
id | path | link ID | required int |
pageId | path | page ID |
code | condition |
---|---|
200 | Link information is returned. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
405 | The feature link_checker is not activated. |
media type | data type | description |
---|---|---|
application/json | ExternalLinkResponse (JSON) | link response |
GET /pages/115/links/8
Content-Type: */*
Accept: application/json
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"link" : {
"id" : 8,
"contentId" : 115,
"contenttagId" : 685,
"contenttagName" : "gtxalohapagelink2",
"valueId" : 2859,
"partName" : "URL",
"url" : "https://totally.invalid.url/",
"text" : "Webshop",
"lastCheckTimestamp" : 1591693475,
"lastStatus" : "invalid",
"lastReason" : "unknown host",
"history" : [ {
"timestamp" : 1591693475,
"status" : "invalid",
"reason" : "unknown host"
}, {
"timestamp" : 1591693475,
"status" : "invalid",
"reason" : "unknown host"
} ]
},
"page" : 1,
"node" : 3,
"global" : 17,
"messages" : [ { }, { } ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : "...",
"property" : "..."
}
}
Update a link (optionally together with other occurrences) by replacing the URL with the given URL.
name | type | description | default | constraints |
---|---|---|---|---|
id | path | link ID | required int | |
pageId | path | page ID | ||
wait | query | time in ms for the request to be done in foreground | 0 | long |
media type | data type | description |
---|---|---|
application/json | ReplaceExternalLinkRequest (JSON) | request containing the new URL and the replace scope |
code | condition |
---|---|
200 | Updating the links has been started. |
401 | No valid sid and session secret cookie were provided. |
403 | User has insufficient permissions. |
405 | The feature link_checker is not activated. |
media type | data type | description |
---|---|---|
application/json | GenericResponse (JSON) | response |
POST /pages/115/links/8
Content-Type: application/json
Accept: application/json
{
"url" : "https://totally.valid.url/",
"scope" : "all"
}
HTTP/1.1 200 OK
Content-Type: application/json
{
"messages" : [ {
"message" : "Occurrences have been replaced in 12 pages.\n4 pages could not be edited due to missing permissions.\n1 page was locked by another user.",
"type" : "INFO",
"timestamp" : 1591689489516
} ],
"responseInfo" : {
"responseCode" : "OK",
"responseMessage" : ""
}
}