Skip to content

Latest commit

 

History

History
64 lines (45 loc) · 3.04 KB

File metadata and controls

64 lines (45 loc) · 3.04 KB

Connector.ApiResources

Overview

Available Operations

  • get - Get API Resource

get

Get API Resource

Example Usage

package hello.world;

import com.apideck.unify.Apideck;
import com.apideck.unify.models.errors.*;
import com.apideck.unify.models.operations.ConnectorApiResourcesOneResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws UnauthorizedResponse, PaymentRequiredResponse, NotFoundResponse, Exception {

        Apideck sdk = Apideck.builder()
                .appId("dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX")
                .apiKey(System.getenv().getOrDefault("API_KEY", ""))
            .build();

        ConnectorApiResourcesOneResponse res = sdk.connector().apiResources().get()
                .id("<id>")
                .resourceId("<id>")
                .call();

        if (res.getApiResourceResponse().isPresent()) {
            System.out.println(res.getApiResourceResponse().get());
        }
    }
}

Parameters

Parameter Type Required Description Example
appId Optional<String> The ID of your Unify application dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX
id String ✔️ ID of the record you are acting upon.
resourceId String ✔️ ID of the resource you are acting upon.

Response

ConnectorApiResourcesOneResponse

Errors

Error Type Status Code Content Type
models/errors/UnauthorizedResponse 401 application/json
models/errors/PaymentRequiredResponse 402 application/json
models/errors/NotFoundResponse 404 application/json
models/errors/APIException 4XX, 5XX */*