> ## Documentation Index
> Fetch the complete documentation index at: https://docs.m3ter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Permissionpolicies

## Remove a PermissionPolicy from support users for an organization

**Function name:** `m3ter_RemovePermissionPolicyFromSupportUsers`
**Category:** WRITE
**HTTP method:** POST
**Destination:** m3ter

Remove a permission policy from support users for an organization.

### Parameters

| Name                       | Label              | Type                   | Required | Description                           | Constraints                                                           |
| -------------------------- | ------------------ | ---------------------- | :------: | ------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials        | M3terEntityParameter   |    Yes   | The m3ter credentials to use.         | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `permissionPolicyId`       | permissionPolicyId | LookupParameter        |    Yes   | UUID of the permission policy         | -                                                                     |
| `statePath`                | State Path         | StateVariableParameter |    No    | State variable to store the response. | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## Add a PermissionPolicy to a user

**Function name:** `m3ter_AddPermissionPolicyToUser`
**Category:** WRITE
**HTTP method:** POST
**Destination:** m3ter

Add a permission policy to a user.

### Parameters

| Name                       | Label              | Type                   | Required | Description                            | Constraints                                                           |
| -------------------------- | ------------------ | ---------------------- | :------: | -------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials        | M3terEntityParameter   |    Yes   | The m3ter credentials to use.          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `permissionPolicyId`       | permissionPolicyId | LookupParameter        |    Yes   | UUID of the permission policy          | -                                                                     |
| `requestPath`              | Request Path       | StateVariableParameter |    Yes   | State variable containing the request. | -                                                                     |
| `statePath`                | State Path         | StateVariableParameter |    No    | State variable to store the response.  | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## Add a PermissionPolicy to support users for an organization

**Function name:** `m3ter_AddPermissionPolicyToSupportUsers`
**Category:** WRITE
**HTTP method:** POST
**Destination:** m3ter

Add a permission policy  to support users for an organization.

### Parameters

| Name                       | Label              | Type                   | Required | Description                            | Constraints                                                           |
| -------------------------- | ------------------ | ---------------------- | :------: | -------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials        | M3terEntityParameter   |    Yes   | The m3ter credentials to use.          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `permissionPolicyId`       | permissionPolicyId | LookupParameter        |    Yes   | UUID of the permission policy          | -                                                                     |
| `requestPath`              | Request Path       | StateVariableParameter |    Yes   | State variable containing the request. | -                                                                     |
| `statePath`                | State Path         | StateVariableParameter |    No    | State variable to store the response.  | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## Add a PermissionPolicy to a service user

**Function name:** `m3ter_AddPermissionPolicyToServiceUser`
**Category:** WRITE
**HTTP method:** POST
**Destination:** m3ter

Add a permission policy to a service user.

### Parameters

| Name                       | Label              | Type                   | Required | Description                            | Constraints                                                           |
| -------------------------- | ------------------ | ---------------------- | :------: | -------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials        | M3terEntityParameter   |    Yes   | The m3ter credentials to use.          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `permissionPolicyId`       | permissionPolicyId | LookupParameter        |    Yes   | UUID of the permission policy          | -                                                                     |
| `requestPath`              | Request Path       | StateVariableParameter |    Yes   | State variable containing the request. | -                                                                     |
| `statePath`                | State Path         | StateVariableParameter |    No    | State variable to store the response.  | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## Remove a PermissionPolicy from a service user

**Function name:** `m3ter_RemovePermissionPolicyFromServiceUser`
**Category:** WRITE
**HTTP method:** POST
**Destination:** m3ter

Remove a permission policy from a service user.

### Parameters

| Name                       | Label              | Type                   | Required | Description                            | Constraints                                                           |
| -------------------------- | ------------------ | ---------------------- | :------: | -------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials        | M3terEntityParameter   |    Yes   | The m3ter credentials to use.          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `permissionPolicyId`       | permissionPolicyId | LookupParameter        |    Yes   | UUID of the permission policy          | -                                                                     |
| `requestPath`              | Request Path       | StateVariableParameter |    Yes   | State variable containing the request. | -                                                                     |
| `statePath`                | State Path         | StateVariableParameter |    No    | State variable to store the response.  | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## List PermissionPolicies

**Function name:** `m3ter_ListPermissionPolicies`
**Category:** READ
**HTTP method:** GET (paginated)
**Destination:** m3ter

Retrieve a list of PermissionPolicy entities

### Parameters

| Name                       | Label       | Type                   | Required | Description                           | Constraints                                                           |
| -------------------------- | ----------- | ---------------------- | :------: | ------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials | M3terEntityParameter   |    Yes   | The m3ter credentials to use.         | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `statePath`                | State Path  | StateVariableParameter |    No    | State variable to store the response. | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## Create Permission Policy

**Function name:** `m3ter_PostPermissionPolicy`
**Category:** WRITE
**HTTP method:** POST
**Destination:** m3ter

Create a new Permission Policy

**NOTE:** When you set up a policy statement for this call using the `permissionPolicy` request parameter to specify the `effect`, `action`, and `resource`, you must use all lower case and the format as shown in this example for a Permission Policy statement that grants full CRUD access to all meters:

```
"permissionPolicy" : [
	{
		"effect" : "allow",
		"action" : [
		"config:create",
		"config:delete",
		"config:retrieve",
		"config:update"
		]
		"resource" : [
		"config:meter/*"
		]
	}
]
```

For more details and further examples, see [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/organization-and-access-management/creating-and-managing-permissions#permission-policy-statements---available-actions-and-resources) in our main Documentation.

### Parameters

| Name                       | Label        | Type                   | Required | Description                            | Constraints                                                           |
| -------------------------- | ------------ | ---------------------- | :------: | -------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials  | M3terEntityParameter   |    Yes   | The m3ter credentials to use.          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `requestPath`              | Request Path | StateVariableParameter |    Yes   | State variable containing the request. | -                                                                     |
| `statePath`                | State Path   | StateVariableParameter |    No    | State variable to store the response.  | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## Remove a PermissionPolicy from a user group

**Function name:** `m3ter_RemovePermissionPolicyFromUserGroup`
**Category:** WRITE
**HTTP method:** POST
**Destination:** m3ter

Remove a permission policy from a user group.

### Parameters

| Name                       | Label              | Type                   | Required | Description                            | Constraints                                                           |
| -------------------------- | ------------------ | ---------------------- | :------: | -------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials        | M3terEntityParameter   |    Yes   | The m3ter credentials to use.          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `permissionPolicyId`       | permissionPolicyId | LookupParameter        |    Yes   | UUID of the permission policy          | -                                                                     |
| `requestPath`              | Request Path       | StateVariableParameter |    Yes   | State variable containing the request. | -                                                                     |
| `statePath`                | State Path         | StateVariableParameter |    No    | State variable to store the response.  | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## Retrieve Permission Policy

**Function name:** `m3ter_GetPermissionPolicy`
**Category:** READ
**HTTP method:** GET
**Destination:** m3ter

Retrieve the permission policy for the UUID

### Parameters

| Name                       | Label       | Type                   | Required | Description                                   | Constraints                                                           |
| -------------------------- | ----------- | ---------------------- | :------: | --------------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials | M3terEntityParameter   |    Yes   | The m3ter credentials to use.                 | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `id`                       | id          | LookupParameter        |    Yes   | The UUID of the PermissionPolicy to retrieve. | -                                                                     |
| `statePath`                | State Path  | StateVariableParameter |    No    | State variable to store the response.         | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## Update Permission Policy

**Function name:** `m3ter_PutPermissionPolicy`
**Category:** WRITE
**HTTP method:** PUT
**Destination:** m3ter

Update a Permission Policy for the UUID

**NOTE:** When you set up a policy statement for this call to specify the `effect`, `action`, and `resource`, you must use all lower case and the format as shown in this example - a Permission Policy statement that grants full CRUD access to all meters:

```
"permissionPolicy" : [
	{
		"effect" : "allow",
		"action" : [
		"config:create",
		"config:delete",
		"config:retrieve",
		"config:update"
		]
		"resource" : [
		"config:meter/*"
		]
	}
]
```

For more details and further examples, see [Understanding, Creating, and Managing Permission Policies](https://www.m3ter.com/docs/guides/organization-and-access-management/creating-and-managing-permissions#permission-policy-statements---available-actions-and-resources) in our main Documentation.

### Parameters

| Name                       | Label        | Type                   | Required | Description                                 | Constraints                                                           |
| -------------------------- | ------------ | ---------------------- | :------: | ------------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials  | M3terEntityParameter   |    Yes   | The m3ter credentials to use.               | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `id`                       | id           | LookupParameter        |    Yes   | The UUID of the PermissionPolicy to update. | -                                                                     |
| `requestPath`              | Request Path | StateVariableParameter |    Yes   | State variable containing the request.      | -                                                                     |
| `statePath`                | State Path   | StateVariableParameter |    No    | State variable to store the response.       | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## Delete Permission Policy

**Function name:** `m3ter_DeletePermissionPolicy`
**Category:** WRITE
**HTTP method:** DELETE
**Destination:** m3ter

Delete the PermissionPolicy for the UUID

### Parameters

| Name                       | Label       | Type                   | Required | Description                                 | Constraints                                                           |
| -------------------------- | ----------- | ---------------------- | :------: | ------------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials | M3terEntityParameter   |    Yes   | The m3ter credentials to use.               | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `id`                       | id          | LookupParameter        |    Yes   | The UUID of the PermissionPolicy to delete. | -                                                                     |
| `statePath`                | State Path  | StateVariableParameter |    No    | State variable to store the response.       | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## Add a PermissionPolicy to a user group

**Function name:** `m3ter_AddPermissionPolicyToUserGroup`
**Category:** WRITE
**HTTP method:** POST
**Destination:** m3ter

Add a permission Policy to a user group

### Parameters

| Name                       | Label              | Type                   | Required | Description                            | Constraints                                                           |
| -------------------------- | ------------------ | ---------------------- | :------: | -------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials        | M3terEntityParameter   |    Yes   | The m3ter credentials to use.          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `permissionPolicyId`       | permissionPolicyId | LookupParameter        |    Yes   | UUID of the permission policy          | -                                                                     |
| `requestPath`              | Request Path       | StateVariableParameter |    Yes   | State variable containing the request. | -                                                                     |
| `statePath`                | State Path         | StateVariableParameter |    No    | State variable to store the response.  | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |

## Remove a PermissionPolicy from a user

**Function name:** `m3ter_RemovePermissionPolicyFromUser`
**Category:** WRITE
**HTTP method:** POST
**Destination:** m3ter

Remove a permission policy from a user.

### Parameters

| Name                       | Label              | Type                   | Required | Description                            | Constraints                                                           |
| -------------------------- | ------------------ | ---------------------- | :------: | -------------------------------------- | --------------------------------------------------------------------- |
| `integrationCredentialsId` | Credentials        | M3terEntityParameter   |    Yes   | The m3ter credentials to use.          | m3terEntity: IntegrationCredentials, authType: M3TER\_SIGNED\_REQUEST |
| `permissionPolicyId`       | permissionPolicyId | LookupParameter        |    Yes   | UUID of the permission policy          | -                                                                     |
| `requestPath`              | Request Path       | StateVariableParameter |    Yes   | State variable containing the request. | -                                                                     |
| `statePath`                | State Path         | StateVariableParameter |    No    | State variable to store the response.  | -                                                                     |

### Exits

| Exit    | Description                                                                      |
| ------- | -------------------------------------------------------------------------------- |
| `NEXT`  | The API call succeeded.                                                          |
| `ERROR` | The API call failed. Error details are stored in the `m3shError` state variable. |
