Skip to main content
GET/api/management/projects/{projectId}/redirects/

Parameters

NameParameter typeTypeFormatDescription
projectId(required)pathstring-The project identifier found in the project overview screen of the management console.
pageIndexquerynumberintegerThe index of the page.
pageSizequerynumberintegerThe number of results per page. The default is 25.
orderquerystring-A comma-separated list of the field Ids to order the results by. Prefix field Id with - for descending order.
statusCodequerynumber-Used to filter by status code
match.typequerystring-Used to filter by match.type
qquerystring-A simple query to perform a 'contains' search over key properties.

Responses

HTTP status codeReasonModel
200SuccessRedirect
401UnauthorizedError
403ForbiddenError
404Project not foundError
500Internal server errorError

Examples

Basic Pagination

HTTP
GET /api/management/projects/{projectId}/redirects/?pageindex=0&pagesize=2
{
	"pageIndex": 0,
	"pageSize": 2,
	"totalCount": 3,
	"pageCount": 2,
	"items": [
		{
			"id": "aab967ef-d2cf-43bb-96a4-c943b118c6f7",
			"sourceDomain": "example.com",
			"destination": "/new-path",
			"statusCode": 301,
			"appendSourcePathToDestination": false,
			"match": {
				"type": "beginsWith",
				"value": "/old-path"
			},
			"version": {
				"created": "2023-05-04T12:05:42.376971",
				"createdBy": "3376a167-3e97-407f-981b-600aecec0401",
				"modified": "2023-05-04T12:05:42.376975",
				"modifiedBy": "3376a167-3e97-407f-981b-600aecec0401"
			}
		},
		{
			"id": "bbf967ef-d2cf-43bb-96a4-c943b118c6f8",
			"sourceDomain": "example.com",
			"destination": "/exact-destination",
			"statusCode": 301,
			"appendSourcePathToDestination": false,
			"match": {
				"type": "exactMatch",
				"value": "/specific-path"
			},
			"version": {
				"created": "2023-06-10T10:20:30.456789",
				"createdBy": "3376a167-3e97-407f-981b-600aecec0401",
				"modified": "2023-06-10T10:20:30.456791",
				"modifiedBy": "3376a167-3e97-407f-981b-600aecec0401"
			}
		}
	]
}

Filtering by Status Code

HTTP
GET /api/management/projects/{projectId}/redirects/?statusCode=301
{
	"pageIndex": 0,
	"pageSize": 25,
	"totalCount": 3,
	"pageCount": 1,
	"items": [
		{
			"id": "aab967ef-d2cf-43bb-96a4-c943b118c6f7",
			"sourceDomain": "example.com",
			"destination": "/new-path",
			"statusCode": 301,
			"appendSourcePathToDestination": false,
			"match": {
				"type": "beginsWith",
				"value": "/old-path"
			},
			"version": {
				"created": "2023-05-04T12:05:42.376971",
				"createdBy": "3376a167-3e97-407f-981b-600aecec0401",
				"modified": "2023-05-04T12:05:42.376975",
				"modifiedBy": "3376a167-3e97-407f-981b-600aecec0401"
			}
		},
		{
			"id": "bbf967ef-d2cf-43bb-96a4-c943b118c6f8",
			"sourceDomain": "example.com",
			"destination": "/exact-destination",
			"statusCode": 301,
			"appendSourcePathToDestination": false,
			"match": {
				"type": "exactMatch",
				"value": "/specific-path"
			},
			"version": {
				"created": "2023-06-10T10:20:30.456789",
				"createdBy": "3376a167-3e97-407f-981b-600aecec0401",
				"modified": "2023-06-10T10:20:30.456791",
				"modifiedBy": "3376a167-3e97-407f-981b-600aecec0401"
			}
		},
		{
			"id": "ccf967ef-d2cf-43bb-96a4-c943b118c6f9",
			"sourceDomain": "example.com",
			"destination": "/regex-destination",
			"statusCode": 301,
			"appendSourcePathToDestination": true,
			"match": {
				"type": "regex",
				"value": "^/products/(.*){{APP}}quot;
			},
			"version": {
				"created": "2023-07-01T08:15:25.123456",
				"createdBy": "3376a167-3e97-407f-981b-600aecec0401",
				"modified": "2023-07-01T08:15:25.123459",
				"modifiedBy": "3376a167-3e97-407f-981b-600aecec0401"
			}
		}
	]
}

Filtering by Match Type

HTTP
GET /api/management/projects/{projectId}/redirects/?match.type=exactMatch
{
	"pageIndex": 0,
	"pageSize": 25,
	"totalCount": 1,
	"pageCount": 1,
	"items": [
		{
			"id": "bbf967ef-d2cf-43bb-96a4-c943b118c6f8",
			"sourceDomain": "example.com",
			"destination": "/exact-destination",
			"statusCode": 301,
			"appendSourcePathToDestination": false,
			"match": {
				"type": "exactMatch",
				"value": "/specific-path"
			},
			"version": {
				"created": "2023-06-10T10:20:30.456789",
				"createdBy": "3376a167-3e97-407f-981b-600aecec0401",
				"modified": "2023-06-10T10:20:30.456791",
				"modifiedBy": "3376a167-3e97-407f-981b-600aecec0401"
			}
		}
	]
}

Keyword Search

HTTP
GET /api/management/projects/{projectId}/redirects/?q=products
{
	"pageIndex": 0,
	"pageSize": 25,
	"totalCount": 1,
	"pageCount": 1,
	"items": [
		{
			"id": "ccf967ef-d2cf-43bb-96a4-c943b118c6f9",
			"sourceDomain": "example.com",
			"destination": "/regex-destination",
			"statusCode": 301,
			"appendSourcePathToDestination": true,
			"match": {
				"type": "regex",
				"value": "^/products/(.*){{APP}}quot;
			},
			"version": {
				"created": "2023-07-01T08:15:25.123456",
				"createdBy": "3376a167-3e97-407f-981b-600aecec0401",
				"modified": "2023-07-01T08:15:25.123459",
				"modifiedBy": "3376a167-3e97-407f-981b-600aecec0401"
			}
		}
	]
}

Sorting Results

HTTP
GET /api/management/projects/{projectId}/redirects/?order=-statusCode
{
	"pageIndex": 0,
	"pageSize": 25,
	"totalCount": 3,
	"pageCount": 1,
	"items": [
		{
			"id": "aab967ef-d2cf-43bb-96a4-c943b118c6f7",
			"sourceDomain": "example.com",
			"destination": "/new-path",
			"statusCode": 301,
			"appendSourcePathToDestination": false,
			"match": {
				"type": "beginsWith",
				"value": "/old-path"
			},
			"version": {
				"created": "2023-05-04T12:05:42.376971",
				"createdBy": "3376a167-3e97-407f-981b-600aecec0401",
				"modified": "2023-05-04T12:05:42.376975",
				"modifiedBy": "3376a167-3e97-407f-981b-600aecec0401"
			}
		},
		{
			"id": "bbf967ef-d2cf-43bb-96a4-c943b118c6f8",
			"sourceDomain": "example.com",
			"destination": "/exact-destination",
			"statusCode": 301,
			"appendSourcePathToDestination": false,
			"match": {
				"type": "exactMatch",
				"value": "/specific-path"
			},
			"version": {
				"created": "2023-06-10T10:20:30.456789",
				"createdBy": "3376a167-3e97-407f-981b-600aecec0401",
				"modified": "2023-06-10T10:20:30.456791",
				"modifiedBy": "3376a167-3e97-407f-981b-600aecec0401"
			}
		},
		{
			"id": "ccf967ef-d2cf-43bb-96a4-c943b118c6f9",
			"sourceDomain": "example.com",
			"destination": "/regex-destination",
			"statusCode": 301,
			"appendSourcePathToDestination": true,
			"match": {
				"type": "regex",
				"value": "^/products/(.*){{APP}}quot;
			},
			"version": {
				"created": "2023-07-01T08:15:25.123456",
				"createdBy": "3376a167-3e97-407f-981b-600aecec0401",
				"modified": "2023-07-01T08:15:25.123459",
				"modifiedBy": "3376a167-3e97-407f-981b-600aecec0401"
			}
		}
	]
}

Combining Filters

HTTP
GET /api/management/projects/{projectId}/redirects/?statusCode=301&match.type=beginsWith&q=old-path
{
	"pageIndex": 0,
	"pageSize": 25,
	"totalCount": 1,
	"pageCount": 1,
	"items": [
		{
			"id": "aab967ef-d2cf-43bb-96a4-c943b118c6f7",
			"sourceDomain": "example.com",
			"destination": "/new-path",
			"statusCode": 301,
			"appendSourcePathToDestination": false,
			"match": {
				"type": "beginsWith",
				"value": "/old-path"
			},
			"version": {
				"created": "2023-05-04T12:05:42.376971",
				"createdBy": "3376a167-3e97-407f-981b-600aecec0401",
				"modified": "2023-05-04T12:05:42.376975",
				"modifiedBy": "3376a167-3e97-407f-981b-600aecec0401"
			}
		}
	]
}

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request