Redirect provides a REST API to create, read, update and delete redirects.
The ENDPOINT is /rest/homepageredirect/1.0/
Manage redirects
The endpoint to manage redirects.
Resource url: /rest/homepageredirect/1.0/redirect
Methods: GET PUT POST DELETE
GET
Click to expand...
Query parameter
|
Parameter
|
Type
|
Required
|
Description
|
|
id
|
Long
|
Yes
|
The id of the redirect.
|
Endpoint example:
/rest/homepageredirect/1.0/redirect?id=42
Response
Returns the redirect setting:
{
"id" : 42,
"contentId" : 65611,
"group" : "confluence-users",
"isAnonymous" : false
}
PUT
Click to expand...
Query parameter
|
Parameter
|
Type
|
Required
|
Description
|
|
id
|
Long
|
Yes
|
The id of the redirect.
|
|
contentId
|
Long
|
Yes
|
The id of the page or blog. Automatically detects pages Space Homepages.
|
|
group
|
String
|
|
The group name or empty to update the redirect for anonymous users.
|
Request Body
{
"id" : 42,
"contentId" : 65611,
"group" : "confluence-users"
}
Response
Returns the redirect setting:
{
"id" : 42,
"contentId" : 65611,
"group" : "confluence-users",
"isAnonymous" : false
}
POST
Click to expand...
Query parameter
|
Parameter
|
Type
|
Required
|
Description
|
|
contentId
|
Long
|
Yes
|
The id of the page or blog. Automatically detects pages Space Homepages.
|
|
group
|
String
|
|
The group name or empty to update the redirect for anonymous users.
|
Request Body
{
"contentId" : 65611,
"group" : "confluence-users"
}
Response
Returns the redirect setting:
{
"id" : 43,
"contentId" : 65611,
"group" : "confluence-users",
"isAnonymous" : false
}
DELETE
Click to expand...
Query parameter
|
Parameter
|
Type
|
Required
|
Description
|
|
id
|
Long
|
Yes
|
The id of the redirect.
|
Response
Returns Status 200 when deleted successfully.
Get redirects
The endpoint to get all redirects.
Resource url: /rest/homepageredirect/1.0/redirects
Methods: GET
Parameters
No parameters.
Response
[
{
"id": 42,
"contentId": 65611,
"anonymous": true
},
{
"id": 43,
"group": "confluence-users",
"contentId": 65611,
"anonymous": false
}
]