Skip to content

Latest commit

 

History

History
291 lines (217 loc) · 12.9 KB

ResourceActionsApi.md

File metadata and controls

291 lines (217 loc) · 12.9 KB

ResourceActionsApi

All URIs are relative to http://localhost

Method HTTP request Description
createResourceAction POST /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions Create Resource Action
deleteResourceAction DELETE /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id} Delete Resource Action
getResourceAction GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id} Get Resource Action
listResourceActions GET /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions List Resource Actions
updateResourceAction PATCH /v2/schema/{proj_id}/{env_id}/resources/{resource_id}/actions/{action_id} Update Resource Action

createResourceAction

ResourceActionRead createResourceAction(projId, envId, resourceId, resourceActionCreate)

Create Resource Action

Creates a new action that can affect the resource.

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = ResourceActionsApi()
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
val envId : kotlin.String = envId_example // kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
val resourceId : kotlin.String = resourceId_example // kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
val resourceActionCreate : ResourceActionCreate =  // ResourceActionCreate | 
try {
    val result : ResourceActionRead = apiInstance.createResourceAction(projId, envId, resourceId, resourceActionCreate)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ResourceActionsApi#createResourceAction")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ResourceActionsApi#createResourceAction")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
projId kotlin.String Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").
envId kotlin.String Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").
resourceId kotlin.String Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug").
resourceActionCreate ResourceActionCreate

Return type

ResourceActionRead

Authorization

Configure HTTPBearer: ApiClient.accessToken = ""

HTTP request headers

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

deleteResourceAction

deleteResourceAction(projId, envId, resourceId, actionId)

Delete Resource Action

Deletes the action and all its related data. This includes any permissions granted to perform the action.

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = ResourceActionsApi()
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
val envId : kotlin.String = envId_example // kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
val resourceId : kotlin.String = resourceId_example // kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
val actionId : kotlin.String = actionId_example // kotlin.String | Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\").
try {
    apiInstance.deleteResourceAction(projId, envId, resourceId, actionId)
} catch (e: ClientException) {
    println("4xx response calling ResourceActionsApi#deleteResourceAction")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ResourceActionsApi#deleteResourceAction")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
projId kotlin.String Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").
envId kotlin.String Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").
resourceId kotlin.String Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug").
actionId kotlin.String Either the unique id of the action, or the URL-friendly key of the action (i.e: the "slug").

Return type

null (empty response body)

Authorization

Configure HTTPBearer: ApiClient.accessToken = ""

HTTP request headers

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

getResourceAction

ResourceActionRead getResourceAction(projId, envId, resourceId, actionId)

Get Resource Action

Gets a single action defined on the resource, if such action exists.

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = ResourceActionsApi()
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
val envId : kotlin.String = envId_example // kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
val resourceId : kotlin.String = resourceId_example // kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
val actionId : kotlin.String = actionId_example // kotlin.String | Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\").
try {
    val result : ResourceActionRead = apiInstance.getResourceAction(projId, envId, resourceId, actionId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ResourceActionsApi#getResourceAction")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ResourceActionsApi#getResourceAction")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
projId kotlin.String Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").
envId kotlin.String Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").
resourceId kotlin.String Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the "slug").
actionId kotlin.String Either the unique id of the action, or the URL-friendly key of the action (i.e: the "slug").

Return type

ResourceActionRead

Authorization

Configure HTTPBearer: ApiClient.accessToken = ""

HTTP request headers

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

listResourceActions

kotlin.collections.List<ResourceActionRead> listResourceActions(projId, envId, resourceId, page, perPage)

List Resource Actions

Lists all the actions defined on the resource.

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = ResourceActionsApi()
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
val envId : kotlin.String = envId_example // kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
val resourceId : kotlin.String = resourceId_example // kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
val page : kotlin.Int = 56 // kotlin.Int | Page number of the results to fetch, starting at 1.
val perPage : kotlin.Int = 56 // kotlin.Int | The number of results per page (max 100).
try {
    val result : kotlin.collections.List<ResourceActionRead> = apiInstance.listResourceActions(projId, envId, resourceId, page, perPage)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ResourceActionsApi#listResourceActions")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ResourceActionsApi#listResourceActions")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
projId kotlin.String Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).
envId kotlin.String Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).
resourceId kotlin.String Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the &quot;slug&quot;).
page kotlin.Int Page number of the results to fetch, starting at 1. [optional] [default to 1]
perPage kotlin.Int The number of results per page (max 100). [optional] [default to 30]

Return type

kotlin.collections.List<ResourceActionRead>

Authorization

Configure HTTPBearer: ApiClient.accessToken = ""

HTTP request headers

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

updateResourceAction

ResourceActionRead updateResourceAction(projId, envId, resourceId, actionId, resourceActionUpdate)

Update Resource Action

Partially updates the action defined on a resource. Fields that will be provided will be completely overwritten.

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = ResourceActionsApi()
val projId : kotlin.String = projId_example // kotlin.String | Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\").
val envId : kotlin.String = envId_example // kotlin.String | Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\").
val resourceId : kotlin.String = resourceId_example // kotlin.String | Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\").
val actionId : kotlin.String = actionId_example // kotlin.String | Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\").
val resourceActionUpdate : ResourceActionUpdate =  // ResourceActionUpdate | 
try {
    val result : ResourceActionRead = apiInstance.updateResourceAction(projId, envId, resourceId, actionId, resourceActionUpdate)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling ResourceActionsApi#updateResourceAction")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling ResourceActionsApi#updateResourceAction")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
projId kotlin.String Either the unique id of the project, or the URL-friendly key of the project (i.e: the &quot;slug&quot;).
envId kotlin.String Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the &quot;slug&quot;).
resourceId kotlin.String Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the &quot;slug&quot;).
actionId kotlin.String Either the unique id of the action, or the URL-friendly key of the action (i.e: the &quot;slug&quot;).
resourceActionUpdate ResourceActionUpdate

Return type

ResourceActionRead

Authorization

Configure HTTPBearer: ApiClient.accessToken = ""

HTTP request headers

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