Get Logo List

GET https://restapi.actonsoftware.com/api/1/logo

This endpoint allows you to download the list of logos from the account.

Parameters

Name Parameter
Type
Allow
Multiple
Required/
Optional
Data Type Description
Authorization: Header False Required String Insert your generated access token.
(Bearer {access token})

Response

{
  "offset": 0,
  "count": 1,
  "totalCount": 1,
  "result": [
    {
      "url_str": "https://ci87.actonsoftware.com/acton/cx/a4a8/logo5.png",
      "url_str_ts": "https://ci87.actonsoftware.com/acton/cx/a4a8/logo5.png?ts=1567642320410",
      "alt_txt": "",
      "tool_tip": "",
      "target_url": "",
      "id": "i-4",
      "title": "Logo"
    }
  ]
}

Code Examples

cURLPythonJava

curl -X GET https://restapi.actonsoftware.com/api/1/logo -H "Authorization: Bearer 12345678-9abc-defg-hijk-lmnopqrs"

import requests

url = "https://restapi.actonsoftware.com/api/1/logo"

payload = {}
headers = {
  'Authorization': 'Bearer 12345678-9abc-defg-hijk-lmnopqrs'
}

response = requests.request("GET", url, headers=headers, data = payload)

print(response.text.encode('utf8'))

package content;

import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.JsonNode;
import com.mashape.unirest.http.Unirest;
import com.mashape.unirest.http.exceptions.UnirestException;
import org.json.JSONObject;
import util.Utility;

public class GetLogoExample
{
    static String BASE_URL         = "https://restapi.actonsoftware.com/";

    public static void main(String[] args)
        {
                getLogo();
                getLogoById();
        }
    public static void getLogo(){
    try
        {
        String accessToken  = Utility.getAccessToken();
        Unirest.setHttpClient(Utility.makeClient());
        Unirest.setDefaultHeader("Authorization", "Bearer " + accessToken);
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;HttpResponse<JsonNode> jsonResponse = Unirest.get(BASE_URL + "api/1/logo")
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;.header("accept", "application/json")
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;.asJson();

&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if(jsonResponse.getCode()==200){
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;JSONObject jsonResponseBody = jsonResponse.getBody().getObject();
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;System.out.println("The response body is : "+jsonResponseBody );
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}else {
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;System.out.println("The response is : "+ jsonResponse);
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}

&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp;catch (UnirestException e)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;e.printStackTrace();
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}

&nbsp;&nbsp; &nbsp;}

&nbsp;&nbsp; &nbsp;public static void getLogoById(){
&nbsp;&nbsp; &nbsp;try
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;String accessToken&nbsp; = Utility.getAccessToken();
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Unirest.setHttpClient(Utility.makeClient());
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;// provide logoid
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;String id = "<Provide Logo Id>";
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Unirest.setHttpClient(Utility.makeClient());
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Unirest.setDefaultHeader("Authorization", "Bearer " +accessToken );
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;HttpResponse jsonResponse = Unirest.get(BASE_URL + "api/1/logo/"+id)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;.header("accept", "application/json")
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;.asJson();

&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if(jsonResponse.getCode()==200){
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;JSONObject jsonResponseBody = ((JsonNode)jsonResponse.getBody()).getObject();
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;System.out.println("The response body is : "+jsonResponseBody );
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}else {
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;System.out.println("The response is : "+ jsonResponse);
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}

&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp;catch (UnirestException e)
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;e.printStackTrace();
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}
&nbsp;&nbsp; &nbsp;}
}