1. Overview

The Runtime Attribute Service Meta API provides RESTful endpoints to create, read, update, and remove runtime attributes. For more information, see Runtime Attributes

1.1. Version information

Version : 1.0.0

1.2. URI scheme

Host : localhost:9002
BasePath : /odata2webservices/RuntimeAttributeService
Schemes : HTTPS

1.3. Tags

  • Attribute Descriptors : Requests for information about Attribute Descriptors that exist in the system.

  • Metadata : Requests for EDMX documents. The metadata is an Entity Data Model XML (EDMX) document that describes the entity types and their properties.

1.4. Consumes

  • application/json

1.5. Produces

  • application/json

1.6. External Docs

2. Paths

2.1. View the EDMX document for RuntimeAttributeService Attribute Descriptors

GET /$metadata

2.1.1. Description

Requests for EDMX documents. The metadata is an Entity Data Model XML (EDMX) document that describes the entity types and their properties.

2.1.2. Responses

HTTP Code Description Schema

200

A valid EDMX schema.

No Content

401

Unauthorized exception responses

403

Forbidden exception responses

2.1.3. Produces

  • application/xml

2.1.4. Tags

  • Metadata

2.2. Create/Update AttributeDescriptors.

POST /AttributeDescriptors

2.2.1. Description

Creates a new Attribute Descriptor or updates an existing Attribute Descriptor if a corresponding one is found. For more information about the post behavior see Runtime Attribute Examples

2.2.2. Parameters

Type Name Description Schema

Header

Post-Persist-Hook
optional

The execute method for the PostPersistHook invokes right after the item persists in the SAP Commerce platform. For more details see Persistence Hooks

string

Header

Pre-Persist-Hook
optional

The execute method for the PrePersistHook invokes right before the Attribute Descriptor sent in the POST or PATCH request persists in the SAP Commerce platform. For more details see Persistence Hooks

string

Header

integrationMessageId
optional

The integrationMessageId header allows the user to trace any InboundRequest back to the original POST, PATCH or DELETE request.

string

Body

body
required

2.2.3. Responses

HTTP Code Description Schema

201

Indicates the Attribute Descriptor has been successfully created/updated.

400

Error responses that may occur due to an error occurring during an attempt to create a new Item.

401

Unauthorized exception responses

403

Forbidden exception responses

415

Provided Media-Type is not supported

2.2.4. Consumes

  • application/json

2.2.5. Produces

  • application/json

2.2.6. Tags

  • Attribute Descriptors

2.2.7. Example HTTP response

Response 400
{
  "error" : {
    "code" : "invalid_key",
    "message" : {
      "lang" : "en",
      "value" : "Key [payloadKey] in the payload does not match the key [pathKey] in the path."
    }
  }
}
Response 401
{
  "error" : {
    "code" : "unauthorized",
    "message" : {
      "lang" : "en",
      "value" : "user must be authenticated"
    }
  }
}
Response 403
{
  "error" : {
    "code" : "forbidden",
    "message" : {
      "lang" : "en",
      "value" : "user is not authorized for the operation"
    }
  }
}
Response 415
{
  "error" : {
    "code" : "null",
    "message" : {
      "lang" : "en",
      "value" : "Media type [application/x-www-form-urlencoded] is not supported."
    }
  }
}

2.3. View AttributeDescriptors.

GET /AttributeDescriptors

2.3.1. Description

View details about AttributeDescriptors.

2.3.2. Parameters

Type Name Description Schema

Query

$expand
optional

Specifies navigation properties for associated entries that will be inlined in the response body. By default, these navigation properties are represented as deferred links pointing to the item resource. See $expand

string

Query

$filter
optional

A predicate expression for selecting a subset of the items identified by the resource path. See $filter

string

Query

$inlinecount
optional

Specifies if the total number of items should be included in the response. See $inlinecount

enum (allpages, none)

Query

$skip
optional

The number of matching items to skip over before returning the result set. If skip is larger than the number of matching items then no items will be returned. See $skip

integer (int32)

Query

$top
optional

The maximum number of items to return. If it’s greater than or equal to the number of matching items existing in the platform, then all items will be returned. If it’s less than the number of matching items in the platform, a subset containing top number of items will be returned. See $top

integer (int32)

2.3.3. Responses

HTTP Code Description Schema

200

A collection of 0 or more AttributeDescriptors.

400

Error responses that may occur due to an exception related to the filter query parameter.

401

Unauthorized exception responses

403

Forbidden exception responses

404

Not Found exception responses for GET operations.

2.3.4. Produces

  • application/json

2.3.5. Tags

  • Attribute Descriptors

2.3.6. Example HTTP response

Response 400
{
  "error" : {
    "code" : "filter_not_supported",
    "message" : {
      "lang" : "en",
      "value" : "Nested filter [attributeType/code] of more than one level is not supported."
    }
  }
}
Response 401
{
  "error" : {
    "code" : "unauthorized",
    "message" : {
      "lang" : "en",
      "value" : "user must be authenticated"
    }
  }
}
Response 403
{
  "error" : {
    "code" : "forbidden",
    "message" : {
      "lang" : "en",
      "value" : "user is not authorized for the operation"
    }
  }
}
Response 404
{
  "error" : {
    "code" : "null",
    "message" : {
      "lang" : "en",
      "value" : "Could not find property with name: 'nonExistingItemAttributeName'."
    }
  }
}

2.4. View an individual AttributeDescriptor.

GET /AttributeDescriptors('{integrationKey}')

2.4.1. Description

Retrieves an AttributeDescriptor by its integrationKey.

2.4.2. Parameters

Type Name Description Schema

Path

integrationKey
required

key: integrationKey

string

Query

$expand
optional

Specifies navigation properties for associated entries that will be inlined in the response body. By default, these navigation properties are represented as deferred links pointing to the item resource. See $expand

string

2.4.3. Responses

HTTP Code Description Schema

200

Success response with the retrieved AttributeDescriptor.

400

Error responses that may occur when a DELETE request is made in an attempt to delete an item.

401

Unauthorized exception responses

403

Forbidden exception responses

404

Not Found exception responses for GET operations.

2.4.4. Produces

  • application/json

2.4.5. Tags

  • Attribute Descriptors

2.4.6. Example HTTP response

Response 400
{
  "error" : {
    "code" : "invalid_key",
    "message" : {
      "lang" : "en",
      "value" : "The integration key [0215Cssss%7C] is invalid. Please consult the IntegrationKey definition of [AttributeDescriptor] for configuration details."
    }
  }
}
Response 401
{
  "error" : {
    "code" : "unauthorized",
    "message" : {
      "lang" : "en",
      "value" : "user must be authenticated"
    }
  }
}
Response 403
{
  "error" : {
    "code" : "forbidden",
    "message" : {
      "lang" : "en",
      "value" : "user is not authorized for the operation"
    }
  }
}
Response 404
{
  "error" : {
    "code" : "not_found",
    "message" : {
      "lang" : "en",
      "value" : "[AttributeDescriptor] with integration key [qualifier|code] was not found."
    }
  }
}

2.5. Delete an AttributeDescriptor.

DELETE /AttributeDescriptors('{integrationKey}')

2.5.1. Description

Deletes the AttributeDescriptor with the corresponding integrationKey.

2.5.2. Parameters

Type Name Description Schema

Header

integrationMessageId
optional

The integrationMessageId header allows the user to trace any InboundRequest back to the original POST, PATCH or DELETE request.

string

Path

integrationKey
required

key: integrationKey

string

2.5.3. Responses

HTTP Code Description Schema

200

Indicates that the Attribute Descriptor was successfully deleted.

No Content

400

Error responses that may occur when a DELETE request is made in an attempt to delete an item.

401

Unauthorized exception responses

403

Forbidden exception responses

404

Not Found exception responses for PATCH and DELETE operations.

2.5.4. Produces

  • application/json

2.5.5. Tags

  • Attribute Descriptors

2.5.6. Example HTTP response

Response 400
{
  "error" : {
    "code" : "invalid_key",
    "message" : {
      "lang" : "en",
      "value" : "The integration key [0215Cssss%7C] is invalid. Please consult the IntegrationKey definition of [AttributeDescriptor] for configuration details."
    }
  }
}
Response 401
{
  "error" : {
    "code" : "unauthorized",
    "message" : {
      "lang" : "en",
      "value" : "user must be authenticated"
    }
  }
}
Response 403
{
  "error" : {
    "code" : "forbidden",
    "message" : {
      "lang" : "en",
      "value" : "user is not authorized for the operation"
    }
  }
}
Response 404
{
  "error" : {
    "code" : "not_found",
    "message" : {
      "lang" : "en",
      "value" : "[AttributeDescriptor] with integration key [qualifier|code] was not found."
    }
  }
}

2.6. Update an existing AttributeDescriptor.

PATCH /AttributeDescriptors('{integrationKey}')

2.6.1. Description

Updates the AttributeDescriptor with the corresponding integrationKey. For more information about the patch behavior see Runtime Attribute Examples

2.6.2. Parameters

Type Name Description Schema

Header

Post-Persist-Hook
optional

The execute method for the PostPersistHook invokes right after the item persists in the SAP Commerce platform. For more details see Persistence Hooks

string

Header

Pre-Persist-Hook
optional

The execute method for the PrePersistHook invokes right before the Attribute Descriptor sent in the POST or PATCH request persists in the SAP Commerce platform. For more details see Persistence Hooks

string

Header

integrationMessageId
optional

The integrationMessageId header allows the user to trace any InboundRequest back to the original POST, PATCH or DELETE request.

string

Path

integrationKey
required

key: integrationKey

string

Body

body
required

2.6.3. Responses

HTTP Code Description Schema

200

Indicates the Attribute Descriptor has been successfully updated.

400

Error responses that may occur when a PATCH request is made in an attempt to update an item.

401

Unauthorized exception responses

403

Forbidden exception responses

404

Not Found exception responses for PATCH and DELETE operations.

415

Provided Media-Type is not supported

2.6.4. Consumes

  • application/json

2.6.5. Produces

  • application/json

2.6.6. Tags

  • Attribute Descriptors

2.6.7. Example HTTP response

Response 400
{
  "error" : {
    "code" : "invalid_key",
    "message" : {
      "lang" : "en",
      "value" : "The integration key [0215Cssss%7C] is invalid. Please consult the IntegrationKey definition of [AttributeDescriptor] for configuration details."
    }
  }
}
Response 401
{
  "error" : {
    "code" : "unauthorized",
    "message" : {
      "lang" : "en",
      "value" : "user must be authenticated"
    }
  }
}
Response 403
{
  "error" : {
    "code" : "forbidden",
    "message" : {
      "lang" : "en",
      "value" : "user is not authorized for the operation"
    }
  }
}
Response 404
{
  "error" : {
    "code" : "not_found",
    "message" : {
      "lang" : "en",
      "value" : "[AttributeDescriptor] with integration key [qualifier|code] was not found."
    }
  }
}
Response 415
{
  "error" : {
    "code" : "null",
    "message" : {
      "lang" : "en",
      "value" : "Media type [application/x-www-form-urlencoded] is not supported."
    }
  }
}

2.7. View the total count of all AttributeDescriptors.

GET /AttributeDescriptors/$count

2.7.1. Description

Displays the total count of all AttributeDescriptors.

2.7.2. Responses

HTTP Code Description Schema

200

A success response displaying the total count of AttributeDescriptors.

string

2.7.3. Produces

  • text/plain

2.7.4. Tags

  • Attribute Descriptors

3. Definitions

3.1. $inlinecount

Type : enum (allpages, none)

3.2. AttributeDescriptor

Name Schema

enclosedType
required

qualifier
required

string

3.3. CollectionofAttributeDescriptors

Name Schema

results
optional

3.4. ComposedType

Name Schema

code
required

string

3.5. Error

Name Schema

code
required

string

innererror
optional

string

message
required

3.6. Message

Name Schema

lang
optional

string

value
optional

string

3.7. Type

Name Schema

code
required

string

3.8. Wrapper

Name Schema

d
optional

3.9. Wrapper1

Name Schema

d
optional

3.10. errorResponseObj

Name Schema

error
optional

4. Security

4.1. auth

Type : basic