• Register

application.update

Description

update a single application object.  Please see Updating Objects for an overview of how the update method works.

Parameters

application

An application object, as described by the object.describe call.  If a field in the application object is ommitted, no change will be made to that field.  If extra fields are passed, they will be ignored.  The primary identifier must be specified.

Response

An application object, as described by the object.describe call.  This is actual application that was updated.

Examples

This example updates the name of the application created in the application.create example.

A Sample JSON-RPC Application Update Request

{
    "method": "application.update",
    "params": [
        {
            "id": 1234,
            "name": "new_application_name"
        }
    ],
    "id": 1
}

The JSON-RPC Response

{
    "result": {
        "id": 1234,
        "created": "2009-12-11T00:25:45Z",
        "updated": "2009-12-11T00:33:05Z",
        "username": "example_username",
        "name": "new_application_name",
        "description": "",
        "type": "",
        "commercial": false,
        "ads": false,
        "ads_system": "",
        "usage_model": "",
        "notes": "",
        "how_did_you_hear": "",
        "preferred_protocol": "",
        "preferred_output": "",
        "external_id": "",
        "uri": "",
        "status": "draft",
        "object_type": "application"
    },
    "error": null,
    "id": 1
}

Permissions Required

The user who owns the key used to authenticate the application.update call must be a member of one of the following roles

  • Administrator
  • Program Manager
  • Community Manager

See authentication.

Errors

In addition to the standard json-rpc errors and authentication errors, application.update may also return these errors:

HTTP Status Code JSON-RPC Code Error Message Description
400 1000 Invalid Object The object could not be updated because the object would be invalid.  See Validating Fields for details on the format of this error.
400 1001 Duplicate Object The object could not be updated because a change would cause it to conflict with a different object that already exists.
400 1002 Field "x" is required. The object could not be updated because a primary identifier was not passed to enable finding the object to update.
500 2002 Update Failed The object could not be updated.  This is the error message of last resort for object updates and usually indicates a systems integration failure, invalid internal data, or a transient issue.  These errors are logged by Mashery.
400 5000 Object "type" with "key" of "value" could not be found The object could not be updated because it could not be found.

Docs Navigation