Apigee API . organizations . developers . apps . keys

Instance Methods

apiproducts()

Returns the apiproducts Resource.

create()

Returns the create Resource.

close()

Close httplib2 connections.

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.

get(name, x__xgafv=None)

Gets details for a consumer key for a developer app, including the key and secret value, associated API products, and other information.

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.

updateDeveloperAppKey(name, action=None, body=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.

Method Details

close()
Close httplib2 connections.
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:

    {
  "apiProducts": [ # List of API products for which the credential can be used. **Note**: Do not specify the list of API products when creating a consumer key and secret for a developer app. Instead, use the UpdateDeveloperAppKey API to make the association after the consumer key and secret are created.
    "",
  ],
  "attributes": [ # List of attributes associated with the credential.
    { # Key-value pair to store extra metadata.
      "name": "A String", # API key of the attribute.
      "value": "A String", # Value of the attribute.
    },
  ],
  "consumerKey": "A String", # Consumer key.
  "consumerSecret": "A String", # Secret key.
  "expiresAt": "A String", # Time the developer app expires in milliseconds since epoch.
  "expiresInSeconds": "A String", # Input only. Expiration time, in seconds, for the consumer key. If not set or left to the default value of `-1`, the API key never expires. The expiration time can't be updated after it is set.
  "issuedAt": "A String", # Time the developer app was created in milliseconds since epoch.
  "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",
  ],
  "status": "A String", # Status of the credential. Valid values include `approved` or `revoked`.
}
get(name, x__xgafv=None)
Gets 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:

    {
  "apiProducts": [ # List of API products for which the credential can be used. **Note**: Do not specify the list of API products when creating a consumer key and secret for a developer app. Instead, use the UpdateDeveloperAppKey API to make the association after the consumer key and secret are created.
    "",
  ],
  "attributes": [ # List of attributes associated with the credential.
    { # Key-value pair to store extra metadata.
      "name": "A String", # API key of the attribute.
      "value": "A String", # Value of the attribute.
    },
  ],
  "consumerKey": "A String", # Consumer key.
  "consumerSecret": "A String", # Secret key.
  "expiresAt": "A String", # Time the developer app expires in milliseconds since epoch.
  "expiresInSeconds": "A String", # Input only. Expiration time, in seconds, for the consumer key. If not set or left to the default value of `-1`, the API key never expires. The expiration time can't be updated after it is set.
  "issuedAt": "A String", # Time the developer app was created in milliseconds since epoch.
  "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",
  ],
  "status": "A String", # Status of the credential. Valid values include `approved` or `revoked`.
}
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:

{
  "apiProducts": [ # List of API products for which the credential can be used. **Note**: Do not specify the list of API products when creating a consumer key and secret for a developer app. Instead, use the UpdateDeveloperAppKey API to make the association after the consumer key and secret are created.
    "",
  ],
  "attributes": [ # List of attributes associated with the credential.
    { # Key-value pair to store extra metadata.
      "name": "A String", # API key of the attribute.
      "value": "A String", # Value of the attribute.
    },
  ],
  "consumerKey": "A String", # Consumer key.
  "consumerSecret": "A String", # Secret key.
  "expiresAt": "A String", # Time the developer app expires in milliseconds since epoch.
  "expiresInSeconds": "A String", # Input only. Expiration time, in seconds, for the consumer key. If not set or left to the default value of `-1`, the API key never expires. The expiration time can't be updated after it is set.
  "issuedAt": "A String", # Time the developer app was created in milliseconds since epoch.
  "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",
  ],
  "status": "A String", # Status of the credential. Valid values include `approved` or `revoked`.
}

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

Returns:
  An object of the form:

    {
  "apiProducts": [ # List of API products for which the credential can be used. **Note**: Do not specify the list of API products when creating a consumer key and secret for a developer app. Instead, use the UpdateDeveloperAppKey API to make the association after the consumer key and secret are created.
    "",
  ],
  "attributes": [ # List of attributes associated with the credential.
    { # Key-value pair to store extra metadata.
      "name": "A String", # API key of the attribute.
      "value": "A String", # Value of the attribute.
    },
  ],
  "consumerKey": "A String", # Consumer key.
  "consumerSecret": "A String", # Secret key.
  "expiresAt": "A String", # Time the developer app expires in milliseconds since epoch.
  "expiresInSeconds": "A String", # Input only. Expiration time, in seconds, for the consumer key. If not set or left to the default value of `-1`, the API key never expires. The expiration time can't be updated after it is set.
  "issuedAt": "A String", # Time the developer app was created in milliseconds since epoch.
  "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",
  ],
  "status": "A String", # Status of the credential. Valid values include `approved` or `revoked`.
}
updateDeveloperAppKey(name, action=None, body=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:

{
  "apiProducts": [ # List of API products for which the credential can be used. **Note**: Do not specify the list of API products when creating a consumer key and secret for a developer app. Instead, use the UpdateDeveloperAppKey API to make the association after the consumer key and secret are created.
    "",
  ],
  "attributes": [ # List of attributes associated with the credential.
    { # Key-value pair to store extra metadata.
      "name": "A String", # API key of the attribute.
      "value": "A String", # Value of the attribute.
    },
  ],
  "consumerKey": "A String", # Consumer key.
  "consumerSecret": "A String", # Secret key.
  "expiresAt": "A String", # Time the developer app expires in milliseconds since epoch.
  "expiresInSeconds": "A String", # Input only. Expiration time, in seconds, for the consumer key. If not set or left to the default value of `-1`, the API key never expires. The expiration time can't be updated after it is set.
  "issuedAt": "A String", # Time the developer app was created in milliseconds since epoch.
  "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",
  ],
  "status": "A String", # Status of the credential. Valid values include `approved` or `revoked`.
}

  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:

    {
  "apiProducts": [ # List of API products for which the credential can be used. **Note**: Do not specify the list of API products when creating a consumer key and secret for a developer app. Instead, use the UpdateDeveloperAppKey API to make the association after the consumer key and secret are created.
    "",
  ],
  "attributes": [ # List of attributes associated with the credential.
    { # Key-value pair to store extra metadata.
      "name": "A String", # API key of the attribute.
      "value": "A String", # Value of the attribute.
    },
  ],
  "consumerKey": "A String", # Consumer key.
  "consumerSecret": "A String", # Secret key.
  "expiresAt": "A String", # Time the developer app expires in milliseconds since epoch.
  "expiresInSeconds": "A String", # Input only. Expiration time, in seconds, for the consumer key. If not set or left to the default value of `-1`, the API key never expires. The expiration time can't be updated after it is set.
  "issuedAt": "A String", # Time the developer app was created in milliseconds since epoch.
  "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",
  ],
  "status": "A String", # Status of the credential. Valid values include `approved` or `revoked`.
}