| POST | /v4/short-links/migrate |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
@DataContract
public static class MigrateShortLinksRequest
{
@DataMember(Name="sourceUsername")
@SerializedName("sourceUsername")
public String sourceUsername = null;
@DataMember(Name="targetUsername")
@SerializedName("targetUsername")
public String targetUsername = null;
@DataMember(Name="sourceGroupId")
@SerializedName("sourceGroupId")
public Long sourceGroupId = null;
@DataMember(Name="targetGroupId")
@SerializedName("targetGroupId")
public Long targetGroupId = null;
public String getSourceUsername() { return sourceUsername; }
public MigrateShortLinksRequest setSourceUsername(String value) { this.sourceUsername = value; return this; }
public String getTargetUsername() { return targetUsername; }
public MigrateShortLinksRequest setTargetUsername(String value) { this.targetUsername = value; return this; }
public Long getSourceGroupId() { return sourceGroupId; }
public MigrateShortLinksRequest setSourceGroupId(Long value) { this.sourceGroupId = value; return this; }
public Long getTargetGroupId() { return targetGroupId; }
public MigrateShortLinksRequest setTargetGroupId(Long value) { this.targetGroupId = value; return this; }
}
@DataContract
public static class MigrateShortLinksResponse
{
@DataMember(Name="linksMigrated")
@SerializedName("linksMigrated")
public Integer linksMigrated = null;
@DataMember(Name="responseStatus")
@SerializedName("responseStatus")
public ResponseStatus responseStatus = null;
public Integer getLinksMigrated() { return linksMigrated; }
public MigrateShortLinksResponse setLinksMigrated(Integer value) { this.linksMigrated = value; return this; }
public ResponseStatus getResponseStatus() { return responseStatus; }
public MigrateShortLinksResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
}
}
Java MigrateShortLinksRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v4/short-links/migrate HTTP/1.1
Host: shortlinks-api.qa.platform.georiot.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"sourceUsername":"String","targetUsername":"String","sourceGroupId":0,"targetGroupId":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"linksMigrated":0,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}