All URIs are relative to https://app.linksgpt.com
Method | HTTP request | Description |
---|---|---|
createLink | POST /api/v1/links | Create a new link |
deleteLink | DELETE /api/v1/links/{id} | Delete a link |
getLinkById | GET /api/v1/links/{id} | Get a link |
listLinks | GET /api/v1/links | List links |
listTags | GET /api/v1/links/tags | List tags |
updateLink | PUT /api/v1/links/{id} | Update a link |
updateLinkTags | PUT /api/v1/links/{id}/tags | Update the tags |
InlineResponse2002 createLink(body, workspace)
Create a new link
Create a new link.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.V1LinksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
V1LinksApi apiInstance = new V1LinksApi();
V1CreateLinkRequest body = new V1CreateLinkRequest(); // V1CreateLinkRequest |
String workspace = "workspace_example"; // String | Your workspace id, if you do not specify the workspace context, the default workspace (your main workspace) will be used. If apikey is used as the authentication mode, you do not need to set this parameter.
try {
InlineResponse2002 result = apiInstance.createLink(body, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling V1LinksApi#createLink");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
body | V1CreateLinkRequest | [optional] | |
workspace | String | Your workspace id, if you do not specify the workspace context, the default workspace (your main workspace) will be used. If apikey is used as the authentication mode, you do not need to set this parameter. | [optional] |
- Content-Type: application/json
- Accept: application/json
InlineResponse2003 deleteLink(id, workspace)
Delete a link
Delete a new link.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.V1LinksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
V1LinksApi apiInstance = new V1LinksApi();
String id = "id_example"; // String | Unique identifier of the short link you want to delete.
String workspace = "workspace_example"; // String | Your workspace id, if you do not specify the workspace context, the default workspace (your main workspace) will be used. If apikey is used as the authentication mode, you do not need to set this parameter.
try {
InlineResponse2003 result = apiInstance.deleteLink(id, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling V1LinksApi#deleteLink");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Unique identifier of the short link you want to delete. | |
workspace | String | Your workspace id, if you do not specify the workspace context, the default workspace (your main workspace) will be used. If apikey is used as the authentication mode, you do not need to set this parameter. | [optional] |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2002 getLinkById(id, workspace)
Get a link
Get details about a specific link.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.V1LinksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
V1LinksApi apiInstance = new V1LinksApi();
String id = "id_example"; // String | Unique identifier of the short link you want to get details for.
String workspace = "workspace_example"; // String | Your workspace id, if you do not specify the workspace context, the default workspace (your main workspace) will be used. If apikey is used as the authentication mode, you do not need to set this parameter.
try {
InlineResponse2002 result = apiInstance.getLinkById(id, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling V1LinksApi#getLinkById");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Unique identifier of the short link you want to get details for. | |
workspace | String | Your workspace id, if you do not specify the workspace context, the default workspace (your main workspace) will be used. If apikey is used as the authentication mode, you do not need to set this parameter. | [optional] |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2001 listLinks(page, limit, domainId, sort, workspace, filter, tags)
List links
Get a list of links.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.V1LinksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
V1LinksApi apiInstance = new V1LinksApi();
Long page = 789L; // Long | Current page.
Long limit = 789L; // Long | How many short links to load.
String domainId = "domainId_example"; // String | Filter short links which refer to a specific branded domain id.
String sort = "sort_example"; // String | Sorting criteria to apply to your short links collection.
String workspace = "workspace_example"; // String | Your workspace id, if you do not specify the workspace context, the default workspace (your main workspace) will be used. If apikey is used as the authentication mode, you do not need to set this parameter.
String filter = "filter_example"; // String | Filter short links according to title or link.
String tags = "tags_example"; // String | Filter short links according to tags.
try {
InlineResponse2001 result = apiInstance.listLinks(page, limit, domainId, sort, workspace, filter, tags);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling V1LinksApi#listLinks");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
page | Long | Current page. | |
limit | Long | How many short links to load. | [enum: 1, 100] |
domainId | String | Filter short links which refer to a specific branded domain id. | |
sort | String | Sorting criteria to apply to your short links collection. | [optional] |
workspace | String | Your workspace id, if you do not specify the workspace context, the default workspace (your main workspace) will be used. If apikey is used as the authentication mode, you do not need to set this parameter. | [optional] |
filter | String | Filter short links according to title or link. | [optional] |
tags | String | Filter short links according to tags. | [optional] |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2004 listTags(workspace)
List tags
Get a list of tags.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.V1LinksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
V1LinksApi apiInstance = new V1LinksApi();
String workspace = "workspace_example"; // String | Your workspace id, if you do not specify the workspace context, the default workspace (your main workspace) will be used. If apikey is used as the authentication mode, you do not need to set this parameter.
try {
InlineResponse2004 result = apiInstance.listTags(workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling V1LinksApi#listTags");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
workspace | String | Your workspace id, if you do not specify the workspace context, the default workspace (your main workspace) will be used. If apikey is used as the authentication mode, you do not need to set this parameter. | [optional] |
- Content-Type: Not defined
- Accept: application/json
InlineResponse2003 updateLink(id, body, workspace)
Update a link
Update a link.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.V1LinksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
V1LinksApi apiInstance = new V1LinksApi();
String id = "id_example"; // String | Unique identifier of the short link you want to update.
V1UpdateLinkRequest body = new V1UpdateLinkRequest(); // V1UpdateLinkRequest |
String workspace = "workspace_example"; // String | Your workspace id, if you do not specify the workspace context, the default workspace (your main workspace) will be used. If apikey is used as the authentication mode, you do not need to set this parameter.
try {
InlineResponse2003 result = apiInstance.updateLink(id, body, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling V1LinksApi#updateLink");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Unique identifier of the short link you want to update. | |
body | V1UpdateLinkRequest | [optional] | |
workspace | String | Your workspace id, if you do not specify the workspace context, the default workspace (your main workspace) will be used. If apikey is used as the authentication mode, you do not need to set this parameter. | [optional] |
- Content-Type: application/json
- Accept: application/json
InlineResponse2003 updateLinkTags(id, body, workspace)
Update the tags
Update the tags of a link.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.V1LinksApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: ApiKeyAuth
ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
ApiKeyAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.setApiKeyPrefix("Token");
V1LinksApi apiInstance = new V1LinksApi();
String id = "id_example"; // String | Unique identifier of the short link you want to update tags.
V1ReTagRequest body = new V1ReTagRequest(); // V1ReTagRequest |
String workspace = "workspace_example"; // String | Your workspace id, if you do not specify the workspace context, the default workspace (your main workspace) will be used. If apikey is used as the authentication mode, you do not need to set this parameter.
try {
InlineResponse2003 result = apiInstance.updateLinkTags(id, body, workspace);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling V1LinksApi#updateLinkTags");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | Unique identifier of the short link you want to update tags. | |
body | V1ReTagRequest | [optional] | |
workspace | String | Your workspace id, if you do not specify the workspace context, the default workspace (your main workspace) will be used. If apikey is used as the authentication mode, you do not need to set this parameter. | [optional] |
- Content-Type: application/json
- Accept: application/json