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 here 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:
CODE
{
"id" : 42,
"contentId" : 65611,
"group" : "confluence-users",
"isAnonymous" : false
}
PUT
Click here 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
CODE
{
"id" : 42,
"contentId" : 65611,
"group" : "confluence-users"
}
Response
Returns the redirect setting:
CODE
{
"id" : 42,
"contentId" : 65611,
"group" : "confluence-users",
"isAnonymous" : false
}
POST
Click here 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
CODE
{
"contentId" : 65611,
"group" : "confluence-users"
}
Response
Returns the redirect setting:
CODE
{
"id" : 43,
"contentId" : 65611,
"group" : "confluence-users",
"isAnonymous" : false
}
DELETE
Click here 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
CODE
[
{
"id": 42,
"contentId": 65611,
"anonymous": true
},
{
"id": 43,
"group": "confluence-users",
"contentId": 65611,
"anonymous": false
}
]