All URIs are relative to https://api.hubapi.com
Method | HTTP request | Description |
---|---|---|
DeleteCmsV3UrlRedirectsUrlRedirectIdArchive | DELETE /cms/v3/url-redirects/{urlRedirectId} | Delete a redirect |
GetCmsV3UrlRedirectsGetPage | GET /cms/v3/url-redirects/ | Get current redirects |
GetCmsV3UrlRedirectsUrlRedirectIdGetById | GET /cms/v3/url-redirects/{urlRedirectId} | Get details for a redirect |
PatchCmsV3UrlRedirectsUrlRedirectIdUpdate | PATCH /cms/v3/url-redirects/{urlRedirectId} | Update a redirect |
PostCmsV3UrlRedirectsCreate | POST /cms/v3/url-redirects/ | Create a redirect |
void DeleteCmsV3UrlRedirectsUrlRedirectIdArchive (string urlRedirectId)
Delete a redirect
Delete one existing redirect, so it is no longer mapped.
using System.Collections.Generic;
using System.Diagnostics;
using HubSpot.NET.Api;
using HubSpot.NET.Client;
using HubSpot.NET.Model;
namespace Example
{
public class DeleteCmsV3UrlRedirectsUrlRedirectIdArchiveExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.hubapi.com";
var apiInstance = new RedirectsApi(config);
var urlRedirectId = "urlRedirectId_example"; // string | The ID of the target redirect.
try
{
// Delete a redirect
apiInstance.DeleteCmsV3UrlRedirectsUrlRedirectIdArchive(urlRedirectId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RedirectsApi.DeleteCmsV3UrlRedirectsUrlRedirectIdArchive: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
urlRedirectId | string | The ID of the target redirect. |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: /
Status code | Description | Response headers |
---|---|---|
204 | Delete succeeded | - |
0 | An error occurred. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CollectionResponseWithTotalUrlMapping GetCmsV3UrlRedirectsGetPage (DateTimeOffset? createdAt = null, DateTimeOffset? createdAfter = null, DateTimeOffset? createdBefore = null, DateTimeOffset? updatedAt = null, DateTimeOffset? updatedAfter = null, DateTimeOffset? updatedBefore = null, List sort = null, List properties = null, string after = null, string before = null, int? limit = null, bool? archived = null)
Get current redirects
Returns all existing URL redirects. Results can be limited and filtered by creation or updated date.
using System.Collections.Generic;
using System.Diagnostics;
using HubSpot.NET.Api;
using HubSpot.NET.Client;
using HubSpot.NET.Model;
namespace Example
{
public class GetCmsV3UrlRedirectsGetPageExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.hubapi.com";
var apiInstance = new RedirectsApi(config);
var createdAt = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTimeOffset? | Only return redirects created on exactly this date. (optional)
var createdAfter = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTimeOffset? | Only return redirects created after this date. (optional)
var createdBefore = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTimeOffset? | Only return redirects created before this date. (optional)
var updatedAt = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTimeOffset? | Only return redirects last updated on exactly this date. (optional)
var updatedAfter = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTimeOffset? | Only return redirects last updated after this date. (optional)
var updatedBefore = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTimeOffset? | Only return redirects last updated before this date. (optional)
var sort = new List<string>(); // List<string> | (optional)
var properties = new List<string>(); // List<string> | (optional)
var after = "after_example"; // string | The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional)
var before = "before_example"; // string | (optional)
var limit = 56; // int? | Maximum number of result per page (optional)
var archived = true; // bool? | Whether to return only results that have been archived. (optional)
try
{
// Get current redirects
CollectionResponseWithTotalUrlMapping result = apiInstance.GetCmsV3UrlRedirectsGetPage(createdAt, createdAfter, createdBefore, updatedAt, updatedAfter, updatedBefore, sort, properties, after, before, limit, archived);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RedirectsApi.GetCmsV3UrlRedirectsGetPage: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
createdAt | DateTimeOffset? | Only return redirects created on exactly this date. | [optional] |
createdAfter | DateTimeOffset? | Only return redirects created after this date. | [optional] |
createdBefore | DateTimeOffset? | Only return redirects created before this date. | [optional] |
updatedAt | DateTimeOffset? | Only return redirects last updated on exactly this date. | [optional] |
updatedAfter | DateTimeOffset? | Only return redirects last updated after this date. | [optional] |
updatedBefore | DateTimeOffset? | Only return redirects last updated before this date. | [optional] |
sort | List<string> | [optional] | |
properties | List<string> | [optional] | |
after | string | The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. | [optional] |
before | string | [optional] | |
limit | int? | Maximum number of result per page | [optional] |
archived | bool? | Whether to return only results that have been archived. | [optional] |
CollectionResponseWithTotalUrlMapping
No authorization required
- Content-Type: Not defined
- Accept: application/json, /
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
0 | An error occurred. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UrlMapping GetCmsV3UrlRedirectsUrlRedirectIdGetById (string urlRedirectId)
Get details for a redirect
Returns the details for a single existing URL redirect by ID.
using System.Collections.Generic;
using System.Diagnostics;
using HubSpot.NET.Api;
using HubSpot.NET.Client;
using HubSpot.NET.Model;
namespace Example
{
public class GetCmsV3UrlRedirectsUrlRedirectIdGetByIdExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.hubapi.com";
var apiInstance = new RedirectsApi(config);
var urlRedirectId = "urlRedirectId_example"; // string | The ID of the target redirect.
try
{
// Get details for a redirect
UrlMapping result = apiInstance.GetCmsV3UrlRedirectsUrlRedirectIdGetById(urlRedirectId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RedirectsApi.GetCmsV3UrlRedirectsUrlRedirectIdGetById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
urlRedirectId | string | The ID of the target redirect. |
No authorization required
- Content-Type: Not defined
- Accept: application/json, /
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
0 | An error occurred. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UrlMapping PatchCmsV3UrlRedirectsUrlRedirectIdUpdate (string urlRedirectId, UrlMapping urlMapping = null)
Update a redirect
Updates the settings for an existing URL redirect.
using System.Collections.Generic;
using System.Diagnostics;
using HubSpot.NET.Api;
using HubSpot.NET.Client;
using HubSpot.NET.Model;
namespace Example
{
public class PatchCmsV3UrlRedirectsUrlRedirectIdUpdateExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.hubapi.com";
var apiInstance = new RedirectsApi(config);
var urlRedirectId = "urlRedirectId_example"; // string |
var urlMapping = new UrlMapping(); // UrlMapping | (optional)
try
{
// Update a redirect
UrlMapping result = apiInstance.PatchCmsV3UrlRedirectsUrlRedirectIdUpdate(urlRedirectId, urlMapping);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RedirectsApi.PatchCmsV3UrlRedirectsUrlRedirectIdUpdate: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
urlRedirectId | string | ||
urlMapping | UrlMapping | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json, /
Status code | Description | Response headers |
---|---|---|
200 | successful operation | - |
0 | An error occurred. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UrlMapping PostCmsV3UrlRedirectsCreate (UrlMappingCreateRequestBody urlMappingCreateRequestBody = null)
Create a redirect
Creates and configures a new URL redirect.
using System.Collections.Generic;
using System.Diagnostics;
using HubSpot.NET.Api;
using HubSpot.NET.Client;
using HubSpot.NET.Model;
namespace Example
{
public class PostCmsV3UrlRedirectsCreateExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.hubapi.com";
var apiInstance = new RedirectsApi(config);
var urlMappingCreateRequestBody = new UrlMappingCreateRequestBody(); // UrlMappingCreateRequestBody | (optional)
try
{
// Create a redirect
UrlMapping result = apiInstance.PostCmsV3UrlRedirectsCreate(urlMappingCreateRequestBody);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RedirectsApi.PostCmsV3UrlRedirectsCreate: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
urlMappingCreateRequestBody | UrlMappingCreateRequestBody | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json, /
Status code | Description | Response headers |
---|---|---|
201 | successful operation | - |
0 | An error occurred. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]