Skip to content

Ramp: Retrieve the business's Ramp Router semantic tagging settings

Ramp aiSpend.getAiSpendTaggingSettingsResource: arguments, response, policy and SDK examples.

← AI spend operations · Get started

Operation ramp.get_ai_spend_tagging_settings_resource

Provider route: GET /developer/v1/ai-spend/tagging-settings. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/ramp with npm, or alter-sdk-ramp with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { RampIntegration } from "@alter-ai/ramp";
async function execute(input: Parameters<RampIntegration["aiSpend"]["getAiSpendTaggingSettingsResource"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new RampIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.aiSpend.getAiSpendTaggingSettingsResource(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_ramp import RampIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = RampIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.ai_spend.get_ai_spend_tagging_settings_resource(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Replace the business’s Ramp Router semantic tagging settings — response body

Referenced models: Replace the business’s Ramp Router semantic tagging settings — response body

Replace the business's Ramp Router semantic tagging settings — response body
FieldTypePresenceDescription and constraints
$objectRoot
configModelRequired within parentExpand Replace the business's Ramp Router semantic tagging settings — response body — config
Current tagging configuration.
versionJSONRequired within parent
version (anyOf 1)integerAlternativeIncreases by 1 each time the settings change; 0 means never saved. Send it as expected_version when updating.
version (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Replace the business's Ramp Router semantic tagging settings — response body — config

Replace the business's Ramp Router semantic tagging settings — response body — config
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
exclusionsarrayOptionalAPI keys or users whose requests are not tagged. Each subject may appear once.
Maximum items: 1000
exclusions[]ModelEach itemExpand Replace the business's Ramp Router semantic tagging settings — response body — config exclusions item
taxonomiesarrayOptionalTaxonomies to classify AI requests by. tag_key values must be unique.
Maximum items: 5
taxonomies[]ModelEach itemExpand Replace the business's Ramp Router semantic tagging settings — response body — config taxonomies item

Referenced models: Replace the business's Ramp Router semantic tagging settings — response body — config taxonomies item, Replace the business's Ramp Router semantic tagging settings — response body — config exclusions item

Replace the business's Ramp Router semantic tagging settings — response body — config taxonomies item
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
allow_unclassifiedbooleanOptionalWhether a request can be tagged unclassified when no label fits.
Default: true
descriptionstringRequired within parentWhat this taxonomy classifies. The characters < and > are removed.
Maximum length: 500
Minimum length: 1
enabledbooleanOptionalWhether this taxonomy is applied to requests.
Default: true
labelsarrayRequired within parentLabels a request can receive. Label names must be unique, and unclassified is reserved.
Maximum items: 50
Minimum items: 2
labels[]ModelEach itemExpand Replace the business's Ramp Router semantic tagging settings — response body — config taxonomies item labels item
tag_keystringRequired within parentTaxonomy identifier, such as team or project. 1-64 characters: lowercase letters, digits, underscores, periods, or hyphens, starting with a letter or digit.
Pattern: ^[a-z0-9][a-z0-9_.-]{0,63}$

Referenced models: Replace the business's Ramp Router semantic tagging settings — response body — config taxonomies item labels item

Replace the business's Ramp Router semantic tagging settings — response body — config exclusions item
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
subject_idstringRequired within parentFor api_key, the external_id of a RAMP API key. For user, the Ramp Router user ID.
Maximum length: 128
Minimum length: 1
subject_typestringRequired within parentKind of subject to exclude from tagging.
Known values: api_key, user
tag_keysarrayOptionalTaxonomies the subject is excluded from. Empty excludes it from every taxonomy.
tag_keys[]stringEach item
Replace the business's Ramp Router semantic tagging settings — response body — config taxonomies item labels item
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
descriptionstringRequired within parentWhen to choose this label. The characters < and > are removed.
Maximum length: 300
Minimum length: 1
labelstringRequired within parentLabel name. 1-64 characters: lowercase letters, digits, underscores, periods, or hyphens, starting with a letter or digit.
Pattern: ^[a-z0-9][a-z0-9_.-]{0,63}$

SDK function policy ID: ramp.get_ai_spend_tagging_settings_resource. Catalog operation: get_ai_spend_tagging_settings_resource. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["ai_spend:read"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.