Was this helpful?

API Platform Base Path: https://api.enterprise.apigee.com/v1/o/{org_name}

API Resource Path: /keyvaluemaps

Creates a KeyValueMap

Verb: POST

Auth: Basic Auth

Media types:


Creates a KeyValueMap.

A key/value map is a simple structure for persistently storing name/value pairs as entries in a named map. The entries in a key/value map can be retrieved at runtime by policies or code running on the API Platform.

Key/value maps can be used to support profile-based access control, for supporting certain non-standard protocols, application specific behavior, and so on.

Key/value maps can be scoped to the organization, environment, and API proxy level.

To scope Key/value maps to these entities, use URI parameters as demonstrated in the sample requests.

Sample Request:
Scoped to organization: $ curl -H "Content-Type:application/json" -X POST -d \ '{ "entry" : [ { "name" : "dev", "value" : "user1" } ], "name" : "prodmap" }' \ -u myname:mypass https://api.enterprise.apigee.com/v1/o/{org_name}/keyvaluemaps Scoped to environment: $ curl -H "Content-Type:application/json" -X POST -d \ '{ "entry" : [ { "name" : "dev", "value" : "user1" } ], "name" : "prodmap" }' \ -u myname:mypass https://api.enterprise.apigee.com/v1/o/{org_name}/environments/{env_name}/keyvaluemaps Scoped to API: $ curl -H "Content-Type:application/json" -X POST -d \ '{ "entry" : [ { "name" : "dev", "value" : "user1" } ], "name" : "prodmap" }' \ -u myname:mypass https://api.enterprise.apigee.com/v1/o/{org_name}/apis/{api_name}/keyvaluemaps
Request Payload Elements:
Name Description Default Required?
entry The name/value pair for the entry, that defines the data to be stored N/A Yes
name The name of the map to be created N/A Yes
Sample Response:
  "entry" : [ {
    "name" : "dev",
    "value" : "user1"
  } ],
  "name" : "prodmap"
Response Payload Elements:
Name Description
entry The name/value pair for the entry, that defines the data to be stored
name The name of the map to be created
Failure 4xx with proper error message
  "code" : "keyvaluemap.service.keyvaluemap_already_exist",
  "message" : "keyvaluemap already exists",
  "contexts" : [ ]

Add new comment

Provide your email address if you wish to be contacted offline about your comment.
We will not display your email address as part of your comment.

We'd love your feedback and perspective! Please be as specific as possible.
Type the characters you see in this picture. (verify using audio)

Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.