Skip to content

Latest commit

 

History

History
425 lines (317 loc) · 15.7 KB

V1LinksApi.md

File metadata and controls

425 lines (317 loc) · 15.7 KB

V1LinksApi

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

createLink

InlineResponse2002 createLink(body, workspace)

Create a new link

Create a new link.

Example

// 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();
}

Parameters

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]

Return type

InlineResponse2002

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteLink

InlineResponse2003 deleteLink(id, workspace)

Delete a link

Delete a new link.

Example

// 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();
}

Parameters

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]

Return type

InlineResponse2003

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getLinkById

InlineResponse2002 getLinkById(id, workspace)

Get a link

Get details about a specific link.

Example

// 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();
}

Parameters

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]

Return type

InlineResponse2002

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listLinks

InlineResponse2001 listLinks(page, limit, domainId, sort, workspace, filter, tags)

List links

Get a list of links.

Example

// 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();
}

Parameters

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]

Return type

InlineResponse2001

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listTags

InlineResponse2004 listTags(workspace)

List tags

Get a list of tags.

Example

// 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();
}

Parameters

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]

Return type

InlineResponse2004

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

updateLink

InlineResponse2003 updateLink(id, body, workspace)

Update a link

Update a link.

Example

// 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();
}

Parameters

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]

Return type

InlineResponse2003

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateLinkTags

InlineResponse2003 updateLinkTags(id, body, workspace)

Update the tags

Update the tags of a link.

Example

// 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();
}

Parameters

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]

Return type

InlineResponse2003

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json