Custom properties

2 minute read

This page explains the available API endpoints for managing custom properties, including their parameters, responses, and examples. Use this information to define, retrieve, and update custom properties in your CloudBees platform environments and applications.

Retrieve a list of custom properties

Retrieve a list of custom properties associated with the specified applicationId. In the response, resourceId represents the ID of the application where the custom properties are defined.

Endpoint
GET /v2/applications/{applicationId}/custom-properties
Parameter name In Type Required? Description

applicationId

Path

String

Yes

The application ID.

Responses

The following table outlines the possible responses from this endpoint, including status codes, their meanings, and the associated schemas:

Status Code Description Schema

200

Success. The request succeeded, returning a list of custom properties for the specified application.

api.CustomProperty.ListCustomPropertiesResponse

Default

Error. Occurs when the applicationId is missing, incorrect, or the user lacks sufficient permissions.

google.rpc.Status

Response example
{ "customProperties": [ { "id": "prop123", "name": "exampleProperty", "type": "String", "description": "Example description", "resourceId": "application456", "cascUrl": "https://casc.example.com/flag-config" } ] }

Retrieve a custom property by name

Retrieve a specific custom property using its name.

Endpoint
GET /v2/applications/{applicationId}/custom-properties/by-name/{name}
Parameter name In Type Required? Description

applicationId

Path

String

Yes

The application ID.

name

Path

String

Yes

The name of the custom property

Responses

The following table outlines the possible responses from this endpoint, including status codes, their meanings, and schema.

Status Code Description Schema

200

Success. The request succeeded, and the response includes the details of the specified custom property.

api.customProperty.GetCustomPropertyResponse

Default

Error. Occurs when the applicationId or name is missing or incorrect, or the user lacks sufficient permissions.

google.rpc.Status

Response example
{ "customProperty": { "id": "string", "name": "string", "type": "Boolean", "description": "string", "resourceId": "string", "cascUrl": "string" } }

Retrieve a custom property by ID

Retrieve a specific custom property using its ID.

Endpoint
GET /v2/applications/{applicationId}/custom-properties/{propertyId}
Parameter name In Type Required? Description

applicationId

Path

String

Yes

The application ID.

propertyId

Path

String

Yes

The ID of the custom property.

Responses

The following table outlines the possible responses from this endpoint, including status codes, their meanings, and schema.

Status Code Description Schema

200

Success. The request succeeded, and the response includes the details of the specified custom property.

api.customProperty.GetCustomPropertyResponse

Default

Error. Occurs when the applicationId or propertyId is missing or incorrect, or the user lacks sufficient permissions.

google.rpc.Status

Response example
{ "customProperty": { "id": "string", "name": "string", "type": "Boolean", "description": "string", "resourceId": "string", "cascUrl": "string" } }

Add a custom property

Add a custom property to an application.

Endpoint
POST /v2/applications/{applicationId}/custom-properties
Parameter name In Type Required? Description

applicationId

Path

String

Yes

The application ID.

Request body example
{ "name": "string", "type": "Boolean | String | SemVer | Number | DateTime", "variants": ["true", "false"], "description": "string", "isPermanent": true }

Responses

The following table outlines the potential responses for this endpoint, including their status codes, descriptions, and schemas:

Status Code Description Schema

200

Success. The request succeeded, adding the custom property to the application.

api.CustomProperty.AddCustomPropertyResponse

Default

Error. Occurs when the applicationId, or type is missing or incorrect, or the user lacks sufficient permissions.

google.rpc.Status

Response example
{ "customProperty": { "id": "prop123", "name": "exampleProperty", "type": "String", "description": "Example description", "resourceId": "resource456" } }