Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Panelbox
id6
titleContent on this page

...

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: 

Status
subtletrue
colourGreen
titleGET
 
Status
subtletrue
colourYellow
titlePUT
 
Status
subtletrue
colourBlue
titlePOST
 
Status
subtletrue
colourRed
titleDELETE


localtab

Query parameter 

Endpoint example:

Response

Returns the redirect setting:

{ "id
","marks":[{"type":"code"}]}]},{"type":"paragraph","content":[]},{"type":"paragraph","content":[{"type":"text","text":"Response","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"type":"text","text":"Returns the redirect setting:"}]},{"type":"codeBlock","attrs":{},"content":[{"type":"text","text":"{\n    \"id\" : 42,
\n    \"contentId\" : 65611,
\n    \"group\" : \"confluence-users\",
\n    \"isAnonymous\" : false\n}"}]},{"type":"paragraph","content":[]}]}},{"id":"c5830ac9-d130-92fd-6895-2eb234f28f2d","label":"PUT","body":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[]},{"type":"paragraph","content":[{"type":"text","text":"Query 
}

JSON Attributes in Request Body 

Request Body:

Localtabgrouplocaltabs
vertical
titleGET
Section
Column
width50%
ParameterTypeRequiredDescription
idLong(tick)The  id of the redirect. 
false
[{"id":"15005ac9-c252-3976-1995-8b88333c4a61","label":"GET","body":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[]},{"type":"paragraph","content":[{"type":"text","text":"Query parameter","marks":[{"type":"strong"}]}]},{"type":"table","attrs":{"isNumberColumnEnabled":false,"layout":"default"},"content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{"background":"#f4f5f7"},"content":[{"type":"paragraph","content":[{"type":"text","text":"Parameter"}]}]},{"type":"tableHeader","attrs":{"background":"#f4f5f7"},"content":[{"type":"paragraph","content":[{"type":"text","text":"Type"}]}]},{"type":"tableHeader","attrs":{"background":"#f4f5f7"},"content":[{"type":"paragraph","content":[{"type":"text","text":"Required"}]}]},{"type":"tableHeader","attrs":{"background":"#f4f5f7"},"content":[{"type":"paragraph","content":[{"type":"text","text":"Description"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"id"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Long"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"status","attrs":{"text":"Yes","color":"green","localId":"82be6390-0342-40dd-8166-4f82f86e9e9d","style":""}},{"type":"text","text":" "}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"The id of the redirect."}]}]}]}]},{"type":"paragraph","content":[{"type":"text","text":"Endpoint example:"}]},{"type":"paragraph","content":[{"type":"text","text":"/rest/homepageredirect/1.0/redirect?id=42
Column
width50%
Code Block
languagejs
linenumberstrue
Localtab
titlePUT
Section
Column
width50%
ParameterTypeRequiredDescription
idLong(tick)The id of the redirect. 
contentIdLong(tick)The id of the page or blog. Automatically detects pages Space Homepages.
groupStringThe group name or empty to update the redirect for anonymous users.
Column
width50%
Code Block
languagejs
linenumberstrue
{
	"id" : 42,
	"contentId" : 65611,
	"group" : "confluence-users"
}

Response

Returns the redirect setting:

Code Block
languagejs
linenumberstrue
{
	"id" : 42,
	"contentId" : 65611,
	"group" : "confluence-users",
	"isAnonymous" : false
}
Localtab
titlePOST
Section Column
width50%

JSON Attributes in Request Body  

ParameterTypeRequiredDescriptioncontentIdLong(tick)The id of the page or blog. Automatically detects pages Space Homepages.groupStringThe group name or empty to create a redirect for anonymous users. Column
width50%

Request Body:

Code Block
languagejs
linenumberstrue
{
	"contentId" : 65611,
	"group" : "confluence-users"
}

Response

Returns the redirect setting:

Code Block
languagejs
linenumberstrue
{
	"id" : 43,
	"contentId" : 65611,
	"group" : "confluence-users",
	"isAnonymous" : false
}
Localtab
titleDELETE
Section Column
width50%

Parameters 

ParameterTypeRequiredDescriptionidLong(tick)The  id of the redirect. 
Column
width50%

Response

Returns Status 200 when deleted successfully.

parameter","marks":[{"type":"strong"}]}]},{"type":"table","attrs":{"isNumberColumnEnabled":false,"layout":"default"},"content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Parameter"}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Type"}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Required"}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Description"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"id"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Long"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"status","attrs":{"text":"Yes","color":"green","localId":"9e21ca77-4dd4-4678-90ed-22e0825dd575","style":""}},{"type":"text","text":" "}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"The id of the redirect."}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"contentId"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Long"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"status","attrs":{"text":"Yes","color":"green","localId":"de280ffb-8d20-4cae-957b-db54db0a3eec","style":""}},{"type":"text","text":" "}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"The id of the page or blog. Automatically detects pages Space Homepages."}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"group"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"String"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"The group name or empty to update the redirect for anonymous users."}]}]}]}]},{"type":"paragraph","content":[]},{"type":"paragraph","content":[{"type":"text","text":"Request Body","marks":[{"type":"strong"}]}]},{"type":"codeBlock","attrs":{},"content":[{"type":"text","text":"{\n    \"id\" : 42,\n    \"contentId\" : 65611,\n    \"group\" : \"confluence-users\"\n}"}]},{"type":"paragraph","content":[]},{"type":"paragraph","content":[{"type":"text","text":"Response","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"type":"text","text":"Returns the redirect setting:"}]},{"type":"codeBlock","attrs":{},"content":[{"type":"text","text":"{\n    \"id\" : 42,\n    \"contentId\" : 65611,\n    \"group\" : \"confluence-users\",\n    \"isAnonymous\" : false\n}"}]},{"type":"paragraph","content":[]}]}},{"id":"a268c137-7718-5098-7b8c-57ee189a7750","label":"POST","body":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[]},{"type":"paragraph","content":[{"type":"text","text":"Query parameter","marks":[{"type":"strong"}]}]},{"type":"table","attrs":{"isNumberColumnEnabled":false,"layout":"default"},"content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Parameter"}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Type"}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Required"}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Description"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"contentId"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Long"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"status","attrs":{"text":"Yes","color":"green","localId":"f4a5cb11-4f8b-4bd4-a57b-e1ee92ac73fe","style":""}},{"type":"text","text":" "}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"The id of the page or blog. Automatically detects pages Space Homepages."}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"group"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"String"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"The group name or empty to update the redirect for anonymous users."}]}]}]}]},{"type":"paragraph","content":[]},{"type":"paragraph","content":[{"type":"text","text":"Request Body","marks":[{"type":"strong"}]}]},{"type":"codeBlock","attrs":{},"content":[{"type":"text","text":"{\n    \"contentId\" : 65611,\n    \"group\" : \"confluence-users\"\n}"}]},{"type":"paragraph","content":[]},{"type":"paragraph","content":[{"type":"text","text":"Response","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"type":"text","text":"Returns the redirect setting:"}]},{"type":"codeBlock","attrs":{},"content":[{"type":"text","text":"{\n    \"id\" : 43,\n    \"contentId\" : 65611,\n    \"group\" : \"confluence-users\",\n    \"isAnonymous\" : false\n}"}]},{"type":"paragraph","content":[]}]}},{"id":"8b54eb75-ce01-f7fa-42db-c9fbad5206dc","label":"DELETE","body":{"version":1,"type":"doc","content":[{"type":"paragraph","content":[]},{"type":"paragraph","content":[{"type":"text","text":"Query parameter","marks":[{"type":"strong"}]}]},{"type":"table","attrs":{"isNumberColumnEnabled":false,"layout":"default"},"content":[{"type":"tableRow","content":[{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Parameter"}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Type"}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Required"}]}]},{"type":"tableHeader","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Description"}]}]}]},{"type":"tableRow","content":[{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"id"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"Long"}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"status","attrs":{"text":"Yes","color":"green","localId":"787b1cda-53de-4c6f-8131-2242157be508","style":""}},{"type":"text","text":" "}]}]},{"type":"tableCell","attrs":{},"content":[{"type":"paragraph","content":[{"type":"text","text":"The id of the redirect."}]}]}]}]},{"type":"paragraph","content":[]},{"type":"paragraph","content":[{"type":"text","text":"Response","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"type":"text","text":"Returns Status 200 when deleted successfully."}]}]}}]

...

Get redirects

The endpoint to get all redirects.

Resource url:  /rest/homepageredirect/1.0/redirects

...

Methods: 

Status
subtletrue
colourGreen
titleGET

...

...


Parameters 

No parameters.

...

...

Response

language
[
    {
        "id": 42,

        "contentId": 65611,

        "anonymous": true
    
},
    {
        "id": 43,

        "group": "confluence-users",

        "contentId": 65611,

        "anonymous": false
    }
]
Code Block
js
titleResponse
linenumberstrue