Skip to main content
POST
/
api
/
v1
/
apps
/
{app_id}
/
usage_controls
Update
package main

import(
	"context"
	"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
	conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
	"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.AppUsageControls.Update(ctx, operations.C1APIAppV1AppUsageControlsServiceUpdateRequest{
        AppID: "<id>",
    })
    if err != nil {
        log.Fatal(err)
    }
    if res.UpdateAppUsageControlsResponse != nil {
        // handle response
    }
}
{
  "appUsageControls": {
    "appId": "<string>",
    "notify": true,
    "notifyAfterDays": 123,
    "revoke": true,
    "revokeAfterDays": 123
  }
}

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
required

The app that this object belongs to.

Body

application/json

The UpdateAppUsageControlsRequest message contains the AppUsageControls object to update and the update mask.

appUsageControls
App Usage Controls · object

The AppUsageControls object describes some peripheral configuration for an app.

updateMask
string | null

Response

200 - application/json

The UpdateAppUsageControlsResponse message contains the updated AppUsageControls object.

The UpdateAppUsageControlsResponse message contains the updated AppUsageControls object.

appUsageControls
App Usage Controls · object

The AppUsageControls object describes some peripheral configuration for an app.