Apigee API . organizations . developers . apps . keys

Instance Methods

apiproducts()

Returns the apiproducts Resource.

create()

Returns the create Resource.

delete(name, x__xgafv=None)

Deletes an app's consumer key and removes all API products

get(name, x__xgafv=None)

Returns details for a consumer key for a developer app, including the key

replaceDeveloperAppKey(name, body=None, x__xgafv=None)

Updates the scope of an app.

updateDeveloperAppKey(name, body=None, action=None, x__xgafv=None)

Adds an API product to a developer app key, enabling the app that holds

Method Details

delete(name, x__xgafv=None)
Deletes an app's consumer key and removes all API products
associated with the app. After the consumer key is deleted,
it cannot be used to access any APIs.

**Note**: After you delete a consumer key, you may want to:
1. Create a new consumer key and secret for the developer app using the
CreateDeveloperAppKey API, and
subsequently add an API product to the key using the
UpdateDeveloperAppKey API.
2. Delete the developer app, if it is no longer required.

Args:
  name: string, Name of the developer app key. Use the following structure in your request:
  `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}` (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
    "attributes": [ # List of attributes associated with the credential.
      { # Key-value pair to store extra metadata.
        "value": "A String", # Value of the attribute.
        "name": "A String", # API key of the attribute.
      },
    ],
    "consumerSecret": "A String", # Secret key.
    "expiresAt": "A String", # Time the developer app expires in milliseconds since epoch.
    "apiProducts": [ # List of API products for which the credential can be used.
      "",
    ],
    "issuedAt": "A String", # Time the developer app was created in milliseconds since epoch.
    "status": "A String", # Status of the credential. Valid values include `approved` or `revoked`.
    "consumerKey": "A String", # Consumer key.
    "scopes": [ # Scopes to apply to the app. The specified scope names must already
        # be defined for the API product that you associate with the app.
      "A String",
    ],
  }
get(name, x__xgafv=None)
Returns details for a consumer key for a developer app, including the key
and secret value, associated API products, and other information.

Args:
  name: string, Name of the developer app key. Use the following structure in your request:
  `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}` (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
    "attributes": [ # List of attributes associated with the credential.
      { # Key-value pair to store extra metadata.
        "value": "A String", # Value of the attribute.
        "name": "A String", # API key of the attribute.
      },
    ],
    "consumerSecret": "A String", # Secret key.
    "expiresAt": "A String", # Time the developer app expires in milliseconds since epoch.
    "apiProducts": [ # List of API products for which the credential can be used.
      "",
    ],
    "issuedAt": "A String", # Time the developer app was created in milliseconds since epoch.
    "status": "A String", # Status of the credential. Valid values include `approved` or `revoked`.
    "consumerKey": "A String", # Consumer key.
    "scopes": [ # Scopes to apply to the app. The specified scope names must already
        # be defined for the API product that you associate with the app.
      "A String",
    ],
  }
replaceDeveloperAppKey(name, body=None, x__xgafv=None)
Updates the scope of an app.

This API replaces the
existing scopes with those specified in the request.
Include or exclude any existing scopes that you want to retain or
delete, respectively. The specified scopes must already
be defined for the API products associated with the app.

This API sets the `scopes` element
under the `apiProducts` element in the attributes of the app.

Args:
  name: string, Name of the developer app key. Use the following structure in your request:
  `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}` (required)
  body: object, The request body.
    The object takes the form of:

{
  "attributes": [ # List of attributes associated with the credential.
    { # Key-value pair to store extra metadata.
      "value": "A String", # Value of the attribute.
      "name": "A String", # API key of the attribute.
    },
  ],
  "consumerSecret": "A String", # Secret key.
  "expiresAt": "A String", # Time the developer app expires in milliseconds since epoch.
  "apiProducts": [ # List of API products for which the credential can be used.
    "",
  ],
  "issuedAt": "A String", # Time the developer app was created in milliseconds since epoch.
  "status": "A String", # Status of the credential. Valid values include `approved` or `revoked`.
  "consumerKey": "A String", # Consumer key.
  "scopes": [ # Scopes to apply to the app. The specified scope names must already
      # be defined for the API product that you associate with the app.
    "A String",
  ],
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
    "attributes": [ # List of attributes associated with the credential.
      { # Key-value pair to store extra metadata.
        "value": "A String", # Value of the attribute.
        "name": "A String", # API key of the attribute.
      },
    ],
    "consumerSecret": "A String", # Secret key.
    "expiresAt": "A String", # Time the developer app expires in milliseconds since epoch.
    "apiProducts": [ # List of API products for which the credential can be used.
      "",
    ],
    "issuedAt": "A String", # Time the developer app was created in milliseconds since epoch.
    "status": "A String", # Status of the credential. Valid values include `approved` or `revoked`.
    "consumerKey": "A String", # Consumer key.
    "scopes": [ # Scopes to apply to the app. The specified scope names must already
        # be defined for the API product that you associate with the app.
      "A String",
    ],
  }
updateDeveloperAppKey(name, body=None, action=None, x__xgafv=None)
Adds an API product to a developer app key, enabling the app that holds
the key to access the API resources bundled in the API product.

In addition, you can add
attributes to a developer app key. This API replaces the
existing attributes with those specified in the request.
Include or exclude any existing attributes that you want to retain or
delete, respectively.

You can use the same key to access all API products
associated with the app.

Args:
  name: string, Name of the developer app key. Use the following structure in your request:
  `organizations/{org}/developers/{developer_email}/apps/{app}/keys/{key}` (required)
  body: object, The request body.
    The object takes the form of:

{
  "attributes": [ # List of attributes associated with the credential.
    { # Key-value pair to store extra metadata.
      "value": "A String", # Value of the attribute.
      "name": "A String", # API key of the attribute.
    },
  ],
  "consumerSecret": "A String", # Secret key.
  "expiresAt": "A String", # Time the developer app expires in milliseconds since epoch.
  "apiProducts": [ # List of API products for which the credential can be used.
    "",
  ],
  "issuedAt": "A String", # Time the developer app was created in milliseconds since epoch.
  "status": "A String", # Status of the credential. Valid values include `approved` or `revoked`.
  "consumerKey": "A String", # Consumer key.
  "scopes": [ # Scopes to apply to the app. The specified scope names must already
      # be defined for the API product that you associate with the app.
    "A String",
  ],
}

  action: string, Approve or revoke the consumer key by setting this value to
`approve` or `revoke`, respectively.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    {
    "attributes": [ # List of attributes associated with the credential.
      { # Key-value pair to store extra metadata.
        "value": "A String", # Value of the attribute.
        "name": "A String", # API key of the attribute.
      },
    ],
    "consumerSecret": "A String", # Secret key.
    "expiresAt": "A String", # Time the developer app expires in milliseconds since epoch.
    "apiProducts": [ # List of API products for which the credential can be used.
      "",
    ],
    "issuedAt": "A String", # Time the developer app was created in milliseconds since epoch.
    "status": "A String", # Status of the credential. Valid values include `approved` or `revoked`.
    "consumerKey": "A String", # Consumer key.
    "scopes": [ # Scopes to apply to the app. The specified scope names must already
        # be defined for the API product that you associate with the app.
      "A String",
    ],
  }