LinkCheckerResource Resource

Resource for the link checker

POST /linkChecker/check

Check an external link for validity

Request Body
media type data type description
application/json CheckExternalLinkRequest (JSON) request containing the link to check
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
405 The feature link_checker is not activated.
Response Body
media type data type description
application/json CheckResponse (JSON) check response

Example

Request
POST /linkChecker/check
Content-Type: application/json
Accept: application/json

                
{
  "url" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "valid" : true,
  "reason" : "...",
  "messages" : [ {
    "fieldName" : "...",
    "message" : "...",
    "type" : "SUCCESS",
    "timestamp" : 12345,
    "image" : "...",
    "sender" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "id" : 12345
  }, {
    "fieldName" : "...",
    "message" : "...",
    "type" : "NEUTRAL",
    "timestamp" : 12345,
    "image" : "...",
    "sender" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "id" : 12345
  } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /linkChecker/pages

Get list of pages containing external links

Request Parameters
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
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
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
Response Codes
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.
Response Body
media type data type description
application/json PageList (JSON) response containing a list of pages with external links

Example

Request
GET /linkChecker/pages
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "messages" : [ {
    "fieldName" : "...",
    "message" : "...",
    "type" : "CRITICAL",
    "timestamp" : 12345,
    "image" : "...",
    "sender" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "id" : 12345
  }, {
    "fieldName" : "...",
    "message" : "...",
    "type" : "WARNING",
    "timestamp" : 12345,
    "image" : "...",
    "sender" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "id" : 12345
  } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /linkChecker/stats

Get link checker statistics

Request Parameters
name type description constraints
nodeId query optional node ID for getting node specific statistics int
Response Codes
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.
Response Body
media type data type description
application/json ExternalLinkStatistics (JSON) statistics response

Example

Request
GET /linkChecker/stats
Accept: application/json

              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "lastRun" : 12345,
  "valid" : 12345,
  "invalid" : 12345,
  "unchecked" : 12345,
  "messages" : [ {
    "fieldName" : "...",
    "message" : "...",
    "type" : "CRITICAL",
    "timestamp" : 12345,
    "image" : "...",
    "sender" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "id" : 12345
  }, {
    "fieldName" : "...",
    "message" : "...",
    "type" : "SUCCESS",
    "timestamp" : 12345,
    "image" : "...",
    "sender" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "id" : 12345
  } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /linkChecker/pages/{id}

Update the validity status for external links contained in the page. Update permissions on the page are required.

Request Parameters
name type description
id path page ID
Request Body
media type data type description
application/json UpdateExternalLinkStatusRequest (JSON) request containing external links with updated status
Response Codes
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.
Response Body
media type data type description
application/json GenericResponse (JSON) generic response

Example

Request
POST /linkChecker/pages/{id}
Content-Type: application/json
Accept: application/json

                
{
  "items" : [ {
    "id" : 12345,
    "contentId" : 12345,
    "contenttagId" : 12345,
    "contenttagName" : "...",
    "valueId" : 12345,
    "partName" : "...",
    "url" : "...",
    "text" : "...",
    "lastCheckTimestamp" : 12345,
    "lastStatus" : "unchecked",
    "lastReason" : "...",
    "history" : [ {
      "timestamp" : 12345,
      "status" : "valid",
      "reason" : "..."
    }, {
      "timestamp" : 12345,
      "status" : "unchecked",
      "reason" : "..."
    } ]
  }, {
    "id" : 12345,
    "contentId" : 12345,
    "contenttagId" : 12345,
    "contenttagName" : "...",
    "valueId" : 12345,
    "partName" : "...",
    "url" : "...",
    "text" : "...",
    "lastCheckTimestamp" : 12345,
    "lastStatus" : "invalid",
    "lastReason" : "...",
    "history" : [ {
      "timestamp" : 12345,
      "status" : "valid",
      "reason" : "..."
    }, {
      "timestamp" : 12345,
      "status" : "unchecked",
      "reason" : "..."
    } ]
  } ]
}
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "messages" : [ {
    "fieldName" : "...",
    "message" : "...",
    "type" : "WARNING",
    "timestamp" : 12345,
    "image" : "...",
    "sender" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "id" : 12345
  }, {
    "fieldName" : "...",
    "message" : "...",
    "type" : "INFO",
    "timestamp" : 12345,
    "image" : "...",
    "sender" : {
      "id" : 12345,
      "firstName" : "...",
      "lastName" : "...",
      "description" : "...",
      "email" : "...",
      "groups" : [ { }, { } ],
      "login" : "...",
      "password" : "..."
    },
    "id" : 12345
  } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}