Back to Collection Items
load ./chilkat.dll
# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.
set http [new_CkHttp]
# Use this online tool to generate code from sample JSON: Generate Code to Create JSON
# The following JSON is sent in the request body.
# {}
set json [new_CkJsonObject]
CkHttp_SetRequestHeader $http "Content-Type" "application/json"
# resp is a CkHttpResponse
set resp [CkHttp_PostJson3 $http "https://your-domain.atlassian.net/wiki/rest/atlassian-connect/1/app/module/dynamic" "application/json" $json]
if {[CkHttp_get_LastMethodSuccess $http] == 0} then {
puts [CkHttp_lastErrorText $http]
delete_CkHttp $http
delete_CkJsonObject $json
exit
}
puts [CkHttpResponse_get_StatusCode $resp]
puts [CkHttpResponse_bodyStr $resp]
delete_CkHttpResponse $resp
delete_CkHttp $http
delete_CkJsonObject $json
Curl Command
curl -X POST
-H "Content-Type: application/json"
-d '"<object>"'
https://your-domain.atlassian.net/wiki/rest/atlassian-connect/1/app/module/dynamic
Postman Collection Item JSON
{
"name": "Register modules",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json"
}
],
"body": {
"mode": "raw",
"raw": "\"<object>\""
},
"url": {
"raw": "{{baseUrl}}/atlassian-connect/1/app/module/dynamic",
"host": [
"{{baseUrl}}"
],
"path": [
"atlassian-connect",
"1",
"app",
"module",
"dynamic"
]
},
"description": "Registers a list of modules. For the list of modules that support dynamic registration, see [Dynamic modules](https://developer.atlassian.com/cloud/confluence/dynamic-modules/).\n\n**[Permissions](#permissions) required:** Only Connect apps can make this request."
},
"response": [
{
"name": "Returned if the request is successful.",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"webItems\": [\n {\n \"key\": \"my-webitem\",\n \"location\": \"system.admin/globalsettings\",\n \"url\": \"/my-web-item\",\n \"name\": {\n \"value\": \"My Web Item\"\n }\n }\n ],\n \"adminPages\": [\n {\n \"key\": \"my-admin-page\",\n \"name\": {\n \"value\": \"My Admin Page\"\n },\n \"url\": \"/my-admin-page\"\n }\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/atlassian-connect/1/app/module/dynamic",
"host": [
"{{baseUrl}}"
],
"path": [
"atlassian-connect",
"1",
"app",
"module",
"dynamic"
]
}
},
"status": "OK",
"code": 200,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "text/plain"
}
],
"cookie": [
],
"body": ""
},
{
"name": "Returned if:\n* any of the provided modules is invalid. For example, required properties are missing.\n* any of the modules conflict with registered dynamic modules or modules defined in the app descriptor. For example, there are duplicate keys.\n\nDetails of",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"webItems\": [\n {\n \"key\": \"my-webitem\",\n \"location\": \"system.admin/globalsettings\",\n \"url\": \"/my-web-item\",\n \"name\": {\n \"value\": \"My Web Item\"\n }\n }\n ],\n \"adminPages\": [\n {\n \"key\": \"my-admin-page\",\n \"name\": {\n \"value\": \"My Admin Page\"\n },\n \"url\": \"/my-admin-page\"\n }\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/atlassian-connect/1/app/module/dynamic",
"host": [
"{{baseUrl}}"
],
"path": [
"atlassian-connect",
"1",
"app",
"module",
"dynamic"
]
}
},
"status": "Bad Request",
"code": 400,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "*/*"
}
],
"cookie": [
],
"body": ""
},
{
"name": "Returned if the call is not from a Connect app.",
"originalRequest": {
"method": "POST",
"header": [
],
"body": {
"mode": "raw",
"raw": "{\n \"webItems\": [\n {\n \"key\": \"my-webitem\",\n \"location\": \"system.admin/globalsettings\",\n \"url\": \"/my-web-item\",\n \"name\": {\n \"value\": \"My Web Item\"\n }\n }\n ],\n \"adminPages\": [\n {\n \"key\": \"my-admin-page\",\n \"name\": {\n \"value\": \"My Admin Page\"\n },\n \"url\": \"/my-admin-page\"\n }\n ]\n}"
},
"url": {
"raw": "{{baseUrl}}/atlassian-connect/1/app/module/dynamic",
"host": [
"{{baseUrl}}"
],
"path": [
"atlassian-connect",
"1",
"app",
"module",
"dynamic"
]
}
},
"status": "Unauthorized",
"code": 401,
"_postman_previewlanguage": "text",
"header": [
{
"key": "Content-Type",
"value": "*/*"
}
],
"cookie": [
],
"body": ""
}
]
}