This is a global notification. You can write markdown here! Link to official website

ApiEndpointsForResource Component

/{projectKey}/resource

post
https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource

Create or Update (POST) operation to a resource.

OAuth 2.0 Scopes:
manage_test:{projectKey}
Path parameters:
region
String

Free text description of the uri parameter.

cloudProvider
String

Free text description of the uri parameter.

projectKey
String

The CTP project key.

Request Body:ObjectTestTypeDraft
Response:
Request Example:cURL
curl -X POST https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}' \
--header 'Content-Type: application/json' \
--data-binary @- << DATA
{
"objectTypeProperty" : {
"arrayOfIntExample" : [ 1, 2, 1, 3, 2, 3, 1 ],
"arrayOfUniqueIntExample" : [ 1, 3, 5, 7 ],
"arrayOfTwonumbersExample" : [ 3, 5 ],
"arrayOfFloatExample" : [ 0.82 ],
"arrayOfNumberNoDefaultsExample" : [ 10, 9, 8, 7, 6 ],
"arrayOfStringExample" : [ "dog", "cat", "bird" ],
"arrayOfObjectType" : [ {
"integerExample" : 777,
"integerExampleInt32" : 1
}, {
"integerExample" : 30000,
"integerExampleInt32" : 22
} ]
}
}
DATA
201 Response Example: ObjectTestTypejson
{
"version" : 1,
"objectTypeProperty" : {
"arrayOfIntExample" : [ 2, 4, 2, 6, 4, 6, 2 ],
"arrayOfUniqueIntExample" : [ 2, 6, 10, 14 ],
"arrayOfTwonumbersExample" : [ 6, 10 ],
"arrayOfFloatExample" : [ 1.64 ],
"arrayOfNumberNoDefaultsExample" : [ 20, 18, 16, 14, 12 ],
"arrayOfStringExample" : [ "dogdog", "catcat", "birdbird" ],
"arrayOfObjectType" : [ {
"integerExample" : 1554,
"integerExampleInt32" : 2
}, {
"integerExample" : 60000,
"integerExampleInt32" : 22
} ]
}
}
put
https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource

Create or Overwrite (PUT) operation to a resource.

OAuth 2.0 Scopes:
manage_test:{projectKey}
Path parameters:
region
String

Free text description of the uri parameter.

cloudProvider
String

Free text description of the uri parameter.

projectKey
String

The CTP project key.

Request Body:ObjectTestTypeDraft
Response:
201 Response Example: ObjectTestTypejson
{
"version" : 1,
"objectTypeProperty" : {
"arrayOfIntExample" : [ 2, 4, 2, 6, 4, 6, 2 ],
"arrayOfUniqueIntExample" : [ 2, 6, 10, 14 ],
"arrayOfTwonumbersExample" : [ 6, 10 ],
"arrayOfFloatExample" : [ 1.64 ],
"arrayOfNumberNoDefaultsExample" : [ 20, 18, 16, 14, 12 ],
"arrayOfStringExample" : [ "dogdog", "catcat", "birdbird" ],
"arrayOfObjectType" : [ {
"integerExample" : 1554,
"integerExampleInt32" : 2
}, {
"integerExample" : 60000,
"integerExampleInt32" : 22
} ]
}
}
get
https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource

Query/retrieve (GET) a specific resource or resource(s). This should return a paged query result of blah.

OAuth 2.0 Scopes:
manage_test:{projectKey}, view_test:{projectKey}
Path parameters:
region
String

Free text description of the uri parameter.

cloudProvider
String

Free text description of the uri parameter.

projectKey
String

The CTP project key.

Query parameters:
stringParameter
String
floatParameter
Float
integerParameter
Int
withMarkdownDescription
Float

This markdown should be parsed correctly.

objectParameter
arrayOfString
String
The parameter can be passed multiple times.
arrayOfStringWithDescription
String

This should render above the text "The parameter can be passed multiple times."

The parameter can be passed multiple times.
Response:
Request Example:cURL
curl -X GET https://api.{region}.{cloudProvider}.commercetools.com/{projectKey}/resource -i \
--header 'Authorization: Bearer ${BEARER_TOKEN}'
200 Response Example: ArrayTestTypejson
{
"arrayOfIntExample" : [ 2, 4, 2, 6, 4, 6, 2 ],
"arrayOfUniqueIntExample" : [ 2, 6, 10, 14 ],
"arrayOfTwonumbersExample" : [ 6, 10 ],
"arrayOfFloatExample" : [ 1.64 ],
"arrayOfNumberNoDefaultsExample" : [ 20, 18, 16, 14, 12 ],
"arrayOfStringExample" : [ "dogdog", "catcat", "birdbird" ],
"arrayOfObjectType" : [ {
"integerExample" : 1554,
"integerExampleInt32" : 2
}, {
"integerExample" : 60000,
"integerExampleInt32" : 22
} ]
}