Skip to main content
POST
/
api
/
v1
/
apps
/
{app_id}
/
access_request_defaults
/
cancel
CancelAppAccessRequestsDefaults
package main

import(
	"context"
	conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
	"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
	"github.com/conductorone/conductorone-sdk-go/pkg/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := conductoronesdkgo.New(
        conductoronesdkgo.WithSecurity(shared.Security{
            BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
            Oauth: "<YOUR_OAUTH_HERE>",
        }),
    )

    res, err := s.AppAccessRequestsDefaults.CancelAppAccessRequestsDefaults(ctx, operations.C1APIAppV1AppAccessRequestsDefaultsServiceCancelAppAccessRequestsDefaultsRequest{
        AppID: "<id>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.AppAccessRequestDefaults != nil {
        // handle response
    }
}
{
  "appId": "<string>",
  "catalogIds": [
    "<string>"
  ],
  "defaultsEnabled": true,
  "durationGrant": "<string>",
  "durationUnset": {},
  "emergencyGrantEnabled": true,
  "emergencyGrantPolicyId": "<string>",
  "requestPolicyId": "<string>",
  "resourceTypeIds": [
    "<string>"
  ],
  "state": "APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_UNSPECIFIED"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Authorization
string
header
required

This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.

Path Parameters

app_id
string | null
required

The appId field.

Body

application/json

The CancelAccessRequestDefaultsRequest message.

Response

200 - application/json

Successful response

The AppAccessRequestDefaults message.

This message contains a oneof named max_grant_duration. Only a single field of the following list may be set at a time:

  • durationUnset
  • durationGrant
appId
string | null

The app id for the app access request rule

catalogIds
string[] | null

The request catalog ids for the app access request rule.

defaultsEnabled
boolean | null

If true the app level request configuration will be applied to specified resource types.

durationGrant
string<duration> | null
durationUnset
object
emergencyGrantEnabled
boolean | null

If emergency grants are enabled for this app access request rule.

emergencyGrantPolicyId
string | null

The policy id for the emergency grant policy.

requestPolicyId
string | null

The requestPolicyId field.

resourceTypeIds
string[] | null

The app resource type ids for which the app access request defaults are applied.

state
enum<string> | null

The last applied state of the app access request defaults.

Available options:
APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_UNSPECIFIED,
APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_RUNNING,
APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_SUCCESS,
APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_FAILED,
APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_CANCELING,
APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_CANCEL_SUCCESS,
APP_ACCESS_REQUEST_DEFAULTS_LAST_APPLY_STATE_CANCEL_ERROR