Skip to content
  • Auto
  • Light
  • Dark
Get Started

Create

Create Attribute Value
client.Attributes.New(ctx, body) (*ValueAttributeValueAttributeNewResponse, error)
post/api/v1/attributes

Create a new attribute value.

Parameters
bodyAttributeTypeIDfieldValuefieldAttributeNewParams
Hide ParametersShow Parameters
AttributeTypeIDfield
optional
param.Field[string]

The attributeTypeId field.

Valuefield
optional
param.Field[string]

The value field.

Returns
AttributeNewResponsestruct

CreateAttributeValueResponse is the response for creating an attribute value.

Hide ParametersShow Parameters
ValueIDstringAttributeTypeIDstringCreatedAtTimeDeletedAtTimeUpdatedAtTimeValuestringAttributeValue
optional

AttributeValue is the value of an attribute of a defined type.

Request example Go
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := conductoronesdk.NewClient(
    option.WithAPIKey("My API Key"),
  )
  attribute, err := client.Attributes.New(context.TODO(), conductoronesdk.AttributeNewParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", attribute.Value)
}
200 Example
{
  "value": {
    "id": "id",
    "attributeTypeId": "attributeTypeId",
    "value": "value"
  }
}