# GCPRestApi

## get

Make GET call for GCPRestApi.

```
GCPRestApi.get(String requestUrl)

or

GCPRestApi.get(String requestUrl, String serviceAccountKeyPropName, 
String authenticationPath)

or

GCPRestApi.get(String requestUrl, String refreshToken, String clientId, 
String clientSecret)
```

#### Parameters

```
requestUrl
serviceAccountKeyPropName
authenticationPath
refreshToken
clientId
clientSecret
```

#### Returns

```
Object
```

## post

Make POST call for GCPRestApi.

```
GCPRestApi.post(String requestUrl, Object body)

or

GCPRestApi.post(String requestUrl, Object body, Map<String, String> headers)

or

GCPRestApi.post(String requestUrl, Object body, String serviceAccountKeyPropName, 
String authenticationPath)

or

GCPRestApi.post(String requestUrl, Object body, String refreshToken, String clientId, 
String clientSecret)

or 

GCPRestApi.post(String requestUrl, Object body, Map<String, String> headers,
      String refreshToken, String clientId, String clientSecret)
      
or

GCPRestApi.post(String requestUrl, Object body, Map<String, String> headers,
      String serviceAccountKeyPropName, String authenticationPath)
```

#### Parameters

```
requestUrl
body
serviceAccountKeyPropName
authenticationPath
refreshToken
clientId
clientId
headers
```

#### Returns

```
Object
```

## put

Make PUT call for GCPRestApi.

```
GCPRestApi.put(String requestUrl, Object body)

or

GCPRestApi.put(String requestUrl, Object body, String serviceAccountKeyPropName, 
String authenticationPath)

or

GCPRestApi.put(String requestUrl, Object body, String refreshToken, String clientId, 
String clientSecret)
```

#### Parameters

```
requestUrl
body
serviceAccountKeyPropName
authenticationPath
refreshToken
clientId
clientSecret
```

#### Returns

```
Object
```

## delete

Make DELETE call for GCPRestApi.

```
GCPRestApi.delete(String requestUrl, Object body)

or

GCPRestApi.delete(String requestUrl, Object body, String serviceAccountKeyPropName, 
String authenticationPath)

or

GCPRestApi.delete(String requestUrl, Object body, String refreshToken, String clientId, 
String clientSecret)
```

#### Parameters

```
requestUrl
body
serviceAccountKeyPropName
authenticationPath
refreshToken
clientId
clientSecret
```

#### Returns

```
Object
```

## patch

Make PATCH call for GCPRestApi.

```
GCPRestApi.patch(String requestUrl, Object body)

or

GCPRestApi.patch(String requestUrl, Object body, String serviceAccountKeyPropName,
                           String authenticationPath)

or

GCPRestApi.patch(String requestUrl, Object body, String refreshToken, String clientId,
                           String clientSecret)
```

#### Parameters

```
requestUrl
body
serviceAccountKeyPropName
authenticationPath
refreshToken
clientId
clientSecret
```

#### Returns

```
Object
```

## publish

publish message

```
GCPRestApi.publish(String topicId, Object message)
```

#### Parameters

```
topicId
message
```

#### Returns

```
Result
```

## subscribe

subscribe message

```
GCPRestApi.subscribe(String subscriptionId, MessageReceiver receiver)
```

#### Parameters

```
subscriptionId
receiver
```

#### Returns

```
Result
```

## unsubscribe

unsubscribe message

```
GCPRestApi.serviceAccountKeyToToken(String serviceAccountKeyPropName,
      String authenticationPath)
```

#### Parameters

```
serviceAccountKeyPropName
authenticationPath
```

#### Returns

```
GCPTokenInfo
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://trillo.gitbook.io/trillo-workbench-java-sdk/google-cloud-api-gcpapi/gcprestapi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
