{% extends "base.html" %} {% block main_content %} {% set base='/rest/apv/'+'/'.join(MODEL._meta.path) %}
{{ MODEL._meta.help_text }}
| Field Group Name | Field Name | Type | Description |
|---|---|---|---|
| {{ field_group.name }} | {{ field.name }} | {{ field.type_name }} | {{ field.document_text }} |
{
"{{ MODEL._meta.object_name }}": {
"meta": {
"abstract": {{ MODEL._meta.abstract | lower }},
"verbose_name": {{ MODEL._meta.verbose_name}},
},
{% if MODEL._meta.abstract %}
"subclasses": [
{
"class_name": class_name1,
"verbose_name": verbose_name1
},
...
],
{% endif %}
"fieldgroups": [
{
"fields": [
{
"verbose_name": field_verbose_name1,
"field_name": field_name1
},
...
],
"group_name": field_group_name1
},
...
]
}
}
| Method | {{MODEL_EXAMPLES['meta']['method']}} |
|---|---|
| URL | {{MODEL_EXAMPLES['meta']['url']}} |
| Request Data | {{MODEL_EXAMPLES['meta']['request_data']}} |
| Response Data | {{MODEL_EXAMPLES['meta']['response_data']}} |
| Comment | {{MODEL_EXAMPLES['meta']['comment']}} |
{
<param1>:<value1>,
<param2>:<value2>,
...
}
| Parameter | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ field.name }} | {{ field.type_name }} | {{ field.document_text }} | |||||||||||||||
| {{ field.name }} | {{ field.type_name }} (Nested Field. It should be a dict.)
|
{{ field.document_text }} |
{
"{{ MODEL._meta.object_name }}": {
"instance_id":<instance_id>,
<param1>:<value1>,
<param2>:<value2>,
...
}
}
| Method | {{example['method']}} |
|---|---|
| URL | {{example['url']}} |
| Request Data | {{example['request_data']}} |
| Response Data | {{example['response_data']}} |
| Comment | {{example['comment']}} |
{
"targets": [<target>]{% if action.related and MODEL._meta.get_field(action.related).type_name == 'asso' %}{% if action.instance_mul != '0' %}
"asso_targets": [<asso_target>],{% endif %}{% endif %}
<param1>:<value1>,
<param2>:<value2>,
...
}
| Parameter | Type | Description | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| targets | string or list | specify the target instance. | |||||||||||||
| asso_targets | string or list | {% if action.instance_mul == '*' %}specify the target asso you want to perform action on. Can be empty or not specified when there is no target asso needed. | {% endif %} {% if action.instance_mul == '1..*' %}specify the target asso you want to perform action on. And target asso can be one or more. | {% endif %} {% if action.instance_mul == '0..1' %}specify the target asso you want to perform action on. And target asso can be one or empty or be even not specified when there is no target asso needed. | {% endif %} {% if action.instance_mul == '1' %}specify one target asso you want to perform action on. And the target asso is required. | {% endif %}||||||||||
| targets | string or list | {% if action.instance_mul == '*' %}specify the target asso you want to perform action on. Can be empty or not specified when there is no target asso needed. | {% endif %} {% if action.instance_mul == '1..*' %}specify the target asso you want to perform action on. And target asso can be one or more. | {% endif %} {%if action.instance_mul == '0..1' %}specify the target asso you want to perform action on. And target asso can be one or empty or be even not specified when there is no target asso needed. | {% endif %} {% if action.instance_mul == '1' %}specify one target asso you want to perform action on. And the target asso is required. | {% endif %}||||||||||
| {{ field.name }} | {{ field.type_name }} | {{ field.document_text }} | |||||||||||||
| {{ field.name }} | {{ field.type_name }} (Nested Field. It should be a dict.)
|
Format
{% for sub_field_name, sub_sub_fields in subFieldDict.iteritems() %}
{% if sub_sub_fields %}
{
"{{ sub_field_name }}": { {% for field_name in sub_sub_fields %}{% if not loop.last %}
"{{ field_name }}" : xxxx,{% else %}
"{{ field_name }}" : xxxx{% endif %}{% endfor %}
}
}
{% else %}
{
"{{ sub_field_name }}": xxxx
}
{% endif %}
{% endfor %}
|
{
"config_change": true|false,
"msg": <msg>
}
| Parameter | Type | Description |
|---|---|---|
| config_change | bool | Whether the action causes configuration change. |
| msg | sring | Empty when action is performed successfully, otherwise it represents the error info. |
| Method | {{example['method']}} |
|---|---|
| URL | {{example['url']}} |
| Request Data | {{example['request_data']}} |
| Response Data | {{example['response_data']}} |
| Comment | {{example['comment']}} |
{
"{{ MODEL._meta.object_name }}": [
{
"instance_id":<instance_id>,
<param1>:<value1>,
<param2>:<value2>,
...
},
...
]
}
| Method | {{MODEL_EXAMPLES['instance_list']['method']}} |
|---|---|
| URL | {{MODEL_EXAMPLES['instance_list']['url']}} |
| Request Data | {{MODEL_EXAMPLES['instance_list']['request_data']}} |
| Response Data | {{MODEL_EXAMPLES['instance_list']['response_data']}} |
| Comment | {{MODEL_EXAMPLES['instance_list']['comment']}} |
| Method | {{example['method']}} |
|---|---|
| URL | {{example['url']}} |
| Request Data | {{example['request_data']}} |
| Response Data | {{example['response_data']}} |
| Comment | {{example['comment']}} |
| Parameter | Type | Description |
|---|---|---|
| instance_id | URI | ID of the instance |
| field_group_name | URI | (optional) Target field group name to query. Available names are: {% for field_grp in MODEL._meta.field_groups.values() %}{{ field_grp.name }}, {% endfor %}Notice: There could only be one field_group_name or field_name in the URL. And if both field_group_name and field_name are not specified, will try to query default field_group data. |
| field_name | URI | (optional) Target field name to query. Available names are: {% for field in MODEL._meta.fields %}{% if not field.hidden %}{{ field.name }}, {% endif %}{% endfor %}Notice: There could only be one field_group_name or field_name in the URL. |
| Field Group Name | Field Name | Type | Description |
|---|---|---|---|
| {{ field_group.name }} | {{ field.name }} | {{ field.type_name }} | {{ field.document_text }} |
{
"{{ MODEL._meta.object_name }}": {
"instance_id":<instance_id>,
<field1>:<value1>,
<field2>:<value2>,
...
}
}
When some field_group name is provided:
{
"{{ MODEL._meta.object_name }}": {
"instance_id":<instance_id>,
<field1>:<value1>,
<field2>:<value2>,
...
}
}
When some field name is provided:
{
"{{ MODEL._meta.object_name }}": {
"instance_id":<instance_id>,
<field>:<value>,
}
}
| Method | {{example['method']}} |
|---|---|
| URL | {{example['url']}} |
| Request Data | {{example['request_data']}} |
| Response Data | {{example['response_data']}} |
| Comment | {{example['comment']}} |
| Method | {{example['method']}} |
|---|---|
| URL | {{example['url']}} |
| Request Data | {{example['request_data']}} |
| Response Data | {{example['response_data']}} |
| Comment | {{example['comment']}} |
| Method | {{example['method']}} |
|---|---|
| URL | {{example['url']}} |
| Request Data | {{example['request_data']}} |
| Response Data | {{example['response_data']}} |
| Comment | {{example['comment']}} |
{
"msg": <success-or-error-msg>
}
| Method | {{example['method']}} |
|---|---|
| URL | {{example['url']}} |
| Request Data | {{example['request_data']}} |
| Response Data | {{example['response_data']}} |
| Comment | {{example['comment']}} |
{
<field_name>:<value>
}
When field name is not specified in URL:
Notice: The fields not provided are left untouched.
{
<field_name1>:<value1>,
<field_name2>:<value2>,
...
}
| Parameter | Type | Description |
|---|---|---|
| instance_id | URI | ID of the instance |
| field_name | URI | (optional) Target field name to update. Available field names are: {% for field in MODEL._meta.fields %}{% if field.visible_in_edit() and field.editable and not field.type_name == 'asso' %}{{ field.name }}, {% endif %}{% endfor %} |
| Field Name | Type | Description |
|---|---|---|
| {{ field.name }} | {{ field.type_name }} | {{ field.document_text }} |
All configuration fields and their values are replied:
{
"{{ MODEL._meta.object_name }}": {
"instance_id":<instance_id>,
<field1>:<value1>,
<field2>:<value2>,
...
<field_group1>: {
<field3>:<value3>,
<field4>:<value4>,
...
},
<field_group2>: {
<field5>:<value5>,
<field6>:<value6>,
...
},
...
}
}
| Method | {{example['method']}} |
|---|---|
| URL | {{example['url']}} |
| Request Data | {{example['request_data']}} |
| Response Data | {{example['response_data']}} |
| Comment | {{example['comment']}} |
| Parameter | Type | Description |
|---|---|---|
| instance_id | URI | ID of the instance |
| field_group_name | URI | (optional) Target field group name to query. Available names are: {% for field_grp in MODEL._meta.field_groups.values() %}{{ field_grp.name }}, {% endfor %}Notice: There could only be one field_group_name or field_name in the URL. And if both field_group_name and field_name are not specified, will try to query default field_group data. |
| field_name | URI | (optional) Target field name to query. Available names are: {% for field in MODEL._meta.fields %}{{ field.name }}, {% endfor %}Notice: There could only be one field_group_name or field_name in the URL. |
| Field Group Name | Field Name | Type | Description |
|---|---|---|---|
| {{ field_group.name }} | {{ field.name }} | {{ field.type_name }} | {{ field.document_text }} |
{
"{{ MODEL._meta.object_name }}": {
"instance_id":<instance_id>,
"{{ field.name }}":[
{
<field1>:<value1>,
<field2>:<value2>,
...
}
]
}
}
{#
When some field_group name is provided:
{
"{{ MODEL._meta.object_name }}": {
"instance_id":<instance_id>,
<field1>:<value1>,
<field2>:<value2>,
...
}
}
When some field name is provided:
{
"{{ MODEL._meta.object_name }}": {
"instance_id":<instance_id>,
<field>:<value>,
}
}
#}
| Method | {{MODEL_EXAMPLES['instance_asso_fields'][field.name]['method']}} |
|---|---|
| URL | {{MODEL_EXAMPLES['instance_asso_fields'][field.name]['url']}} |
| Request Data | {{MODEL_EXAMPLES['instance_asso_fields'][field.name]['request_data']}} |
| Response Data | {{MODEL_EXAMPLES['instance_asso_fields'][field.name]['response_data']}} |
| Comment | {{MODEL_EXAMPLES['instance_asso_fields'][field.name]['comment']}} |
| Parameter | Type | Description |
|---|---|---|
| instance_id | URI | ID of the instance |
{
"{{ MODEL._meta.object_name }}": {
"instance_id":<instance_id>,
"{{ field.name }}":<value>
}
}
| Parameter | Type | Description |
|---|---|---|
| instance_id | URI | ID of the instance |
| field_group_name | URI | (optional) Target field group name to query. Available names are: {% for field_grp in MODEL._meta.field_groups.values() %}{% if not field_grp.name == 'default' %}{{ field_grp.name }}, {% endif %}{% endfor %}Notice: There could only be one field_group_name or field_name in the URL. |
| field_name | URI | (optional) Target field name to query. Available names are: {% for field in MODEL._meta.fields %}{{ field.name }}, {% endfor %}Notice: There could only be one field_group_name or field_name in the URL. |
| Field Group Name | Field Name | Type | Description |
|---|---|---|---|
| {% if field_group.name != "default" %}{{ field_group.name }}{% endif %} | {{ field.name }} | {{ field.type_name }} | {{ field.document_text }} |
{
"{{ MODEL._meta.object_name }}": {
"instance_id":<instance_id>,
"{{ field.name }}":[
{
<field1>:<value1>,
<field2>:<value2>,
...
}
]
}
}
{#
When some field_group name is provided:
{
"{{ MODEL._meta.object_name }}": {
"instance_id":<instance_id>,
<field1>:<value1>,
<field2>:<value2>,
...
}
}
When some field name is provided:
{
"{{ MODEL._meta.object_name }}": {
"instance_id":<instance_id>,
<field>:<value>,
}
}
#}
| Method | {{MODEL_EXAMPLES['instance_asso_fields'][field.name]['method']}} |
|---|---|
| URL | {{MODEL_EXAMPLES['instance_asso_fields'][field.name]['url']}} |
| Request Data | {{MODEL_EXAMPLES['instance_asso_fields'][field.name]['request_data']}} |
| Response Data | {{MODEL_EXAMPLES['instance_asso_fields'][field.name]['response_data']}} |
| Comment | {{MODEL_EXAMPLES['instance_asso_fields'][field.name]['comment']}} |
{
<param1>:<value1>,
<param2>:<value2>,
...
}
| Parameter | Type | Description |
|---|---|---|
| {{ field.name }} | {{ field.type_name }} | {{ field.document_text }} |
| <Other Parameters> | Please refer to following concrete APIs: {% for child in MODEL._meta.get_all_concrete_children() %} {{ child._meta.object_name }}, {% endfor %} | |
| {{ field.name }} | {{ field.type_name }} | {{ field.document_text }} |
{
"{{ asso_model._meta.object_name }}": {
"instance_id":<instance_id>,
<param1>:<value1>,
<param2>:<value2>,
...
}
}
| Method | {{MODEL_EXAMPLES['instance_asso_create_instance'][field.name]['method']}} |
|---|---|
| URL | {{MODEL_EXAMPLES['instance_asso_create_instance'][field.name]['url']}} |
| Request Data | {{MODEL_EXAMPLES['instance_asso_create_instance'][field.name]['request_data']}} |
| Response Data | {{MODEL_EXAMPLES['instance_asso_create_instance'][field.name]['response_data']}} |
| Comment | {{MODEL_EXAMPLES['instance_asso_create_instance'][field.name]['comment']}} |
{
"msg": <success-or-error-msg>
}
| Method | {{MODEL_EXAMPLES['instance_asso_delete_instance'][field.name]['method']}} |
|---|---|
| URL | {{MODEL_EXAMPLES['instance_asso_delete_instance'][field.name]['url']}} |
| Request Data | {{MODEL_EXAMPLES['instance_asso_delete_instance'][field.name]['request_data']}} |
| Response Data | {{MODEL_EXAMPLES['instance_asso_delete_instance'][field.name]['response_data']}} |
| Comment | {{MODEL_EXAMPLES['instance_asso_delete_instance'][field.name]['comment']}} |