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

Content Types:

application/json
text/xml

Creates a KeyValueMapap, a simple structure for persistently storing name/value pairs (entry) for use at runtime, such as for profile-based access control, for supporting certain non-standard protocols, application specific behavior, and so on.

Note: KeyValueMaps can be scoped to the organization, environment, and API level

To scope KeyValueMaps 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
Errors
Failure 4xx with proper error message
{
  "code" : "keyvaluemap.service.keyvaluemap_already_exist",
  "message" : "keyvaluemap already exists",
  "contexts" : [ ]
}
Last updated: 32 minutes ago