Overview
Updates metadata for an API Proxy, including name, description, categories, and sharing type. Metadata is used for API Proxy organization, discovery, and access control.
Endpoint
PATCH /apiops/projects/{projectName}/apiProxies/{apiProxyName}/settings/metadata/
Authentication
Requires a Personal API Access Token.
Authorization: Bearer YOUR_TOKEN
Request
| Header |
Value |
Required |
| Authorization |
Bearer {token} |
Yes |
| Content-Type |
application/json |
Yes |
Path Parameters
| Parameter |
Type |
Required |
Description |
| projectName |
string |
Yes |
Project name |
| apiProxyName |
string |
Yes |
API Proxy name |
Request Body
Full JSON Body Example - Update All Metadata
{
"name": "Updated API Name",
"description": "Updated API description",
"categoryList": [
"Payment",
"E-commerce",
"Public"
],
"sharingType": "BOTH"
}
Full JSON Body Example - Update Name Only
{
"name": "New API Name"
}
Full JSON Body Example - Update Description and Categories
{
"description": "Updated description for the API",
"categoryList": [
"Finance",
"Banking"
]
}
Full JSON Body Example - Update Sharing Type
{
"sharingType": "EXTERNAL"
}
Request Body Fields
| Field |
Type |
Required |
Default |
Description |
| name |
string |
No |
- |
API Proxy name. Must be unique within the project if provided |
| description |
string |
No |
- |
API Proxy description |
| categoryList |
array[string] |
No |
- |
List of category names for API Proxy organization |
| sharingType |
string |
No |
- |
Sharing type for API Proxy. See EnumSharingType |
EnumSharingType (sharingType)
BOTH - Share with both internal and external users
NONE - Do not share (private)
EXTERNAL - Share only with external users
INTERNAL - Share only with internal users
Notes
- All fields are optional
- At least one field must be provided
- If
name is provided, it must be unique within the project
categoryList can be empty array to clear all categories
description can be set to empty string to clear description
sharingType controls who can access the API Proxy
Response
Success Response (200 OK)
Response Fields
| Field |
Type |
Description |
| success |
boolean |
Indicates if the request was successful |
Error Response (400 Bad Request)
{
"error": "bad_request",
"error_description": "ApiProxy (name: Updated API Name) is already exist!"
}
Common Causes
- Provided
name already exists in the project
- Invalid
sharingType value
Error Response (401 Unauthorized)
{
"error": "unauthorized_client",
"error_description": "Invalid token"
}
Error Response (404 Not Found)
{
"error": "not_found",
"error_description": "ApiProxy (name: MyAPI) was not found!"
}
cURL Example
curl -X PATCH \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/settings/metadata/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated API Name",
"description": "Updated API description",
"categoryList": [
"Payment",
"E-commerce",
"Public"
],
"sharingType": "BOTH"
}'
Example 2: Update Name Only
curl -X PATCH \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/settings/metadata/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "New API Name"
}'
Example 3: Update Description and Categories
curl -X PATCH \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/settings/metadata/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"description": "Updated description for the API",
"categoryList": [
"Finance",
"Banking"
]
}'
Example 4: Update Sharing Type
curl -X PATCH \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/settings/metadata/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sharingType": "EXTERNAL"
}'
Example 5: Clear Categories
curl -X PATCH \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/settings/metadata/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"categoryList": []
}'
Notes and Warnings
- Name Uniqueness:
- API Proxy names must be unique within the project
- If you try to set a name that already exists, the request will fail
- Name changes are immediate and affect API Proxy identification
- Partial Updates:
- You can update any combination of fields
- Fields not provided will remain unchanged
- Empty arrays clear categories
- Sharing Type:
BOTH - API Proxy is visible to both internal and external users
INTERNAL - API Proxy is visible only to internal users
EXTERNAL - API Proxy is visible only to external users
NONE - API Proxy is private (not shared)
- Categories:
- Categories are used for API Proxy organization and discovery
- Multiple categories can be assigned to a single API Proxy
- Categories are case-sensitive
- Empty array clears all categories
- Description:
- Description provides additional information about the API Proxy
- Can be used for documentation and discovery
- Can be set to empty string to clear description
- Permissions:
- Requires
ROLE_MANAGE_PROXIES permission
- Immediate Effect:
- Metadata changes take effect immediately
- Name changes affect API Proxy identification
- Sharing type changes affect API Proxy visibility
- API Proxy Discovery:
- Metadata is used for API Proxy discovery and search
- Categories help users find relevant API Proxies
- Description provides context about API Proxy purpose