123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281 |
- ---
- swagger: '2.0'
- info:
- version: 1.0.0
- title: GeoServer UrlCheck
- description: An URL External Access Check is the check performed on user provided URLs that GeoServer will use to access remote resources.
- contact:
- name: GeoServer
- email: 'geoserver-users@osgeo.org'
- url: 'https://geoserver.org/comm/'
- host: localhost:8080
- basePath: /geoserver/rest
- paths:
- /urlchecks:
- get:
- operationId: getUrlChecks
- tags:
- - "UrlChecks"
- summary: Get a list of URL checks
- description: Displays a list of all URL checks on the server. Use the "Accept:" header to specify format or append an extension to the endpoint (example "/urlchecks.xml" for XML)
- produces:
- - text/html
- - application/json
- - application/xml
- responses:
- 200:
- description: OK
- schema:
- $ref: "#/definitions/urlChecks"
- examples:
- text/html: |
- <html>
- <head>
- <title>GeoServer Configuration</title>
- <meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
- </head>
- <body>
- <ul>
- <li><a href="http://localhost:8080/geoserver/rest/urlchecks/external.html">external</a></li>
- <li><a href="http://localhost:8080/geoserver/rest/urlchecks/icons.html">icons</a></li>
- <li><a href="http://localhost:8080/geoserver/rest/urlchecks/safeWFS.html">safeWFS</a></li>
- </ul>
- </body>
- </html>
- application/xml: |
- <urlChecks>
- <urlCheck>
- <name>external</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/urlchecks/external.xml" type="application/atom+xml"/>
- </urlCheck>
- <urlCheck>
- <name>icons</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/urlchecks/icons.xml" type="application/atom+xml"/>
- </urlCheck>
- <urlCheck>
- <name>safeWFS</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/urlchecks/safeWFS.xml" type="application/atom+xml"/>
- </urlCheck>
- </urlChecks>
- application/json: |
- {"urlchecks":{"urlcheck":[
- {"name":"external","href":"http:\/\/localhost:8080\/geoserver\/rest\/urlchecks\/external.json"},
- {"name":"icons","href":"http:\/\/localhost:8080\/geoserver\/rest\/urlchecks\/icons.json"},
- {"name":"safeWFS","href":"http:\/\/localhost:8080\/geoserver\/rest\/urlchecks\/safeWFS.json"}]}}
- 401:
- description: Unauthorized
- post:
- operationId: postUrlChecks
- tags:
- - "UrlChecks"
- summary: add a new URL check to GeoServer
- description: Adds a new URL check to the server
- parameters:
- - name: urlcheckBody
- description: The url check body to upload.
- in: body
- required: true
- schema:
- $ref: "#/definitions/urlCheck"
- consumes:
- - application/json
- - application/xml
- produces:
- - text/html
- - application/json
- - application/xml
- responses:
- 201:
- description: Created
- schema:
- type: string
- headers:
- Location:
- description: URL where the newly created URL check can be found
- type: string
- 400:
- description: Unable to add provided URL check as it misses required fields
- 409:
- description: Unable to add URL check as it already exists
- put:
- operationId: putUrlChecks
- description: Not permitted.
- tags:
- - "UrlChecks"
- responses:
- 405:
- description: Not permitted
- delete:
- operationId: deleteUrlChecks
- description: Not permitted.
- tags:
- - "UrlChecks"
- responses:
- 405:
- description: Not permitted
- /urlchecks/{urlcheckname}:
- get:
- operationId: getUrlCheck
- tags:
- - "UrlChecks"
- summary: Retrieve a URL check
- description: Retrieves a single URL check definition. Use the "Accept:" header to specify format or
- append an extension to the endpoint (example "/urlchecks/{urlcheck}.xml" for XML).
- produces:
- - application/xml
- - application/json
- - text/html
- parameters:
- - name: urlcheckname
- description: the name of the URL check to fetch.
- in: path
- required: true
- type: string
- responses:
- 200:
- description: OK
- schema:
- $ref: "#/definitions/urlCheck"
- examples:
- application/xml: |
- <urlChecks>
- <urlCheck>
- <name>icons</name>
- <atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="alternate" href="http://localhost:8080/geoserver/rest/urlchecks/icons.xml" type="application/atom+xml"/>
- </urlCheck>
- </urlChecks>
- application/json: |
- {
- "urlCheck": {
- "name": "icons",
- "description": "External graphic icons",
- "enabled": true,
- "regex": "^https://styles.server.net/icons/.*$"
- }
- }
- 404:
- description: URL check does not exist
- post:
- tags:
- - "UrlChecks"
- operationId: postUrlCheck
- description: Not permitted.
- parameters:
- - name: urlcheckname
- description: the name of the URL check to fetch.
- in: path
- required: true
- type: string
- responses:
- 405:
- description: Not permitted
- put:
- summary: Update a URL check
- tags:
- - "UrlChecks"
- description: Changes the URL check with the provided data.
- operationId: putUrlCheck
- consumes:
- - application/json
- - application/xml
- responses:
- 200:
- description: Modified
- 400:
- description: Cannot perform the change to the URL check as required fields are missing
- 404:
- description: Url check not found
- parameters:
- - name: urlcheckname
- in: path
- description: name of URL check.
- required: true
- type: string
- - name: urlcheckBody
- description: The url check body to perform the change against.
- in: body
- required: true
- schema:
- $ref: "#/definitions/urlCheck"
- delete:
- operationId: deleteUrlCheck
- tags:
- - "UrlChecks"
- parameters:
- - name: urlcheckname
- in: path
- description: name of URL check to delete.
- required: true
- type: string
- responses:
- 200:
- description: Successfully deleted URL check
- 404:
- description: Url check doesn't exist
- definitions:
- urlCheck:
- type: object
- description: >
- The body for a URL check request.
-
- For a PUT, only values which should be changed need to be included.
-
-
- JSON or XML style requests should follow the schemas below:
- - application/xml:
-
- ```
- <regexUrlCheck>
- <name>string</name>
- <description>string</description>
- <enabled>false</enabled>
- <regex>string</regex>
- </regexUrlCheck>
- ```
- - application/json:
-
- ```
- {
- "regexUrlCheck": {
- "name": "string",
- "description": "string",
- "enabled": false,
- "regex": "string"
- }
- }
- ```
- required:
- - name
- - regex
- properties:
- name:
- type: string
- description: name of the URL check
- description:
- type: string
- description: description for the URL check
- enabled:
- type: boolean
- description: enabled status of the URL check
- default: false
- regex:
- type: string
- description: regex to perform the check with
- urlChecks:
- type: array
- items:
- $ref: "#/definitions/urlCheck"
|