The Configuration object contains variables which define the current behavior of the App.net platform.
{
"text": {
"uri_template_length": {
"post_id": 9,
"message_id": 12
}
},
"user": {
"annotation_max_bytes": 8192,
"text_max_length": 256
},
"file": {
"annotation_max_bytes": 8192
},
"post": {
"annotation_max_bytes": 8192,
"text_max_length": 256
},
"message": {
"annotation_max_bytes": 8192,
"text_max_length": 2048
},
"channel": {
"annotation_max_bytes": 8192
}
}
Field | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
text |
object |
Configuration that is common to all text fields (post.text, message.text, user.description.text).
|
||||||
user |
Resource Configuration Object | The configuration related to User objects. | ||||||
file |
Resource Configuration Object | The configuration related to File objects. | ||||||
post |
Resource Configuration Object | The configuration related to Post objects. | ||||||
message |
Resource Configuration Object | The configuration related to Message objects. | ||||||
channel |
Resource Configuration Object | The configuration related to Channel objects. |
{
"annotation_max_bytes": 8192,
"text_max_length": 256
}
A Resource Configuration object represents values that only apply to a specific App.net resource.
Field | Type | Description |
---|---|---|
annotation_max_bytes |
integer | The maximum number of bytes that can be attached to this type of object as an Annotation. |
text_max_length |
integer | The maximum number of characters that an instance of this object can be. For User objects, this applies to the User description. This field does not apply to Channel objects. |
The App.net platform has platform-wide limits that all apps must respect. These limits are enforced at an API level, but can be useful to have defined as constants in your app’s code, often for the purpose of displaying your user interface. Examples are things like: “how long can a Post be” or “how long can annotations be on a Channel object.” This endpoint allows you to update your app’s configuration so it always has the newest platform-wide configuration values available.
We recommend:
This pattern will ensure that no matter whether your application has network connectivity or not, you will have values, even if they are out of date. As the majority of these variables are related to user interface, slightly outdated configuration variables are generally not a problem.
This endpoint should be queried with an access token if you have one. If you are creating an app which supports multiple user accounts, you may store this data globally instead of per-user.
Returns the current Configuration object.
Your application should request this endpoint with a user or app access token if available.
Method | URL | Token |
---|---|---|
GET | https://alpha-api.app.net/stream/0/config | None |
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
"https://alpha-api.app.net/stream/0/config"
{
"data": {
"text": {
"uri_template_length": {
"post_id": 9,
"message_id": 12
}
},
"user": {
"annotation_max_bytes": 8192,
"text_max_length": 256
},
"file": {
"annotation_max_bytes": 8192
},
"post": {
"annotation_max_bytes": 8192,
"text_max_length": 256
},
"message": {
"annotation_max_bytes": 8192,
"text_max_length": 2048
},
"channel": {
"annotation_max_bytes": 8192
}
},
"meta": {
"code": 200
}
}