Send Docs Feedback

Manage developer categories

A developer category is a grouping of developers or companies with similar characteristics, which allows you to configure monetization to operate on that specific cateogry. For example, you can create rate plans that apply to all developers who develop apps for revenue sharing by creating a developer category called "revenue_sharing" and adding developers to it. For more information on creating rate plans with developer categories, see Create rate plans.

Creating a developer category using the UI

To create a developer category in the management UI:

  1. Select in the Publish > Developer Categories in the management UI. This opens the Developer Categories page.

  2. Click +Add Developer Category.
  3. Enter a name for the new category and a short description. Then click the checkmark in Action column to accept the update (or the minus sign to cancel).

  4. Repeat steps 2 and 3 for each developer category you want to add, then click Save.

Creating a developer category using the API

To create a developer category, issue a POST request to /organizations/{org_name}/developer-categories.

When you issue the request, you specify the category name and description in the payload. For example:

$ curl -H "Content-Type:application/json" -X POST -d \

 '{
    "name": "Gold",
    "description": "Gold category"   
  }' \
POST "https://api.enterprise.apigee.com/v1/mint/organizations/{org_name}/developer-categories"  \
-u email:password

The response should look something like this:

{
  "description" : "Gold category",
  "id" : "aa6f960a-d9fd-416e-be39-c071418aabd0",
  "name" : "Gold"
}

Adding a company to a developer category using the UI

Use the following steps to add a company to a developer category in the management UI. (To add a developer to a developer category, use the API, as described in the next section.)

A company can belong to only one developer category.

  1. In the management UI, select Publish > Companies.
  2. Select the company you want.
  3. Click Edit on the company page.
  4. Select the Developer Category for the company, and click Save.

Adding a developer or company to a developer category using the API

You can add a developer or company to a developer category when you create the company or developer using a POST, or when updating the company or developer using a PUT. Following are the API resources to use:

When creating a company or developer, make a POST with the payload to:

  • /organizations/{org_name}/developers
  • /organizations/{org_name}/companies

When updating a company or developer, make a PUT with the payload to:

  • /organizations/{org_name}/developers/{developer_id}
  • /organizations/{org_name}/companies/{company_id}

When updating a developer with PUT, be sure to include all existing attribute settings in the call to retain those settings.

A company or developer can belong to only one developer category.

Specify the MINT_DEVELOPER_CATEGORY as an attribute in the request body with the category internal ID as the value. For example, the following request adds an already-created developer to the developer category named "Gold" category, which has an ID of aa6f960a-d9fd-416e-be39-c071418aabd0.

$ curl -H "Content-Type: application/json" -X PUT -d \
'{
   "email" : "developer@apigee.com",
    "developerId" : "K4jW2QLjZ1h8GFA8",
    "firstName" : "Dev",
    "lastName" : "One",
    "userName" : "devone",    
    "attributes" : [ {
      "name" : "MINT_REGISTRATION_ID",
      "value" : "dev1"
    }, {
      "name" : "MINT_DEVELOPER_LEGAL_NAME",
      "value" : "DEV ONE"
    }, {
      "name" : "MINT_DEVELOPER_TYPE",
      "value" : "TRUSTED"
    }, {
      "name" : "MINT_BILLING_TYPE",
      "value" : "PREPAID"
    }, {
      "name" : "MINT_IS_BROKER",
      "value" : "TRUE"
    }, {
      "name" : "MINT_DEVELOPER_CATEGORY",
      "value" : "aa6f960a-d9fd-416e-be39-c071418aabd0"
    }, {
      "name" : "MINT_DEVELOPER_ADDRESS",
      "value" : "{
                   "address1": "Dev One Address",
                   "city": "Pleasanton",
                   "country": "US",
                   "isPrimary": "true",
                   "state": "CA",
                   "zip": "94588"
                }"
    }
}' \
"https://api.enterprise.apigee.com/v1/mint/organizations/{org_name}/developers/K4jW2QLjZ1h8GFA8" \
-u email:password

Developer category configuration settings for the API

The following developer category configuration options are exposed to the API:

Name Description Default Required?
name

The property name MINT_DEVELOPER_CATEGORY.

N/A Yes
value

The ID of the developer category to which the developer is added.

N/A Yes, in order to set the developer category.

Retrieving developer categories using the API

You can retrieve a specific developer category or all developer categories in an organization. To retrieve a specific developer category, issue a GET request to /organizations/{org_name}/developer-categories/{category_id}, where {category_id} is the identification of the developer category (the ID is returned in the response when you create the developer category). For example:

$ curl -H "Accept:application/json" -X GET \
"https://api.enterprise.apigee.com/v1/mint/organizations/{org_name}/developer-categories/aa6f960a-d9fd-416e-be39-c071418aabd0" \
-u email:password

To retrieve all API developer categories for an organization, issue a GET request to /organizations/{org_id}/developer-categories. For example:

$ curl -H "Accept:application/json" -X GET \
"https://api.enterprise.apigee.com/v1/mint/organizations/{org_name}/developer-categories" \
-u email:password

Updating a developer category using the API

To update a developer category, issue a PUT request to /organizations/{org_name}/developer-categories/{category_id}, where {category_id} is the identification of the category to be updated. When you make the update, you need to specify in the request body the updated settings and the ID of the developer category. For example, the following request updates the description of a developer category (the update is highlighted):

$ curl -H "Content-Type: application/json" -X PUT -d \
 '{
    "id": "aa6f960a-d9fd-416e-be39-c071418aabd0",
    "description": "Premium category"   
  }' \
"https://api.enterprise.apigee.com/v1/mint/organizations/{org_name}/developer-categories/aa6f960a-d9fd-416e-be39-c071418aabd0" \
-u email:password

Deleting a developer category using the API

To delete a developer category, issue a DELETE request to /organizations/{org_name}/developer-categories/{category_id}, where {category_id} is the identification of the developer category to be deleted. For example:

$ curl -H "Accept:application/json" -X DELETE \
"https://api.enterprise.apigee.com /v1/mint/organizations/{org_name}/developer-categories/aa6f960a-d9fd-416e-be39-c071418aabd0" \
-u email:password

 

Help or comments?