awe.sm Administration API

Updating A Project

Update the users and domains on a project.

POSTapi.awe.sm/projects/{api_key}/update

HTTPS is supported on this endpoint.

Required Parameters

Parameter Type Description
api_key string The key of the project you wish to update. Found in project settings.
subscription_key string The key of the subscription that owns the projects being updated. Found in subscription settings.
json JSON string A project update object. See below.

Project Update Object

Only include parameters being modified.

Parameter Type Description
name string Must be globally unique. Name can only contain: a–z, A–Z, 0–9, underscores, and hyphens. Spaces are not allowed.
conversions object See Conversions Object below.
domains array of strings Adds domains authorized for this project. Domains must already be connected to the subscription that owns the project being modified. awe.sm is available to all projects and does not need to be specified.
remove_domain array of strings Removes domains authorized for this project.
default_domain string The default domain for the project. Must be one of the authorized domains. Default is awe.sm.
admins array of strings Adds users as administrators. In addition to the viewer and sharer capabilities, admins are authorized to change project settings, invite users to the project, and change permissions of other users on the project.
sharers array of strings Adds users as sharers. In addition to the viewer capabilities, sharers are authorized to use the awe.sm Publisher application to post new links.
viewers array of strings Adds users as viewers. Viewers who are authorized to use the awe.sm Stats application to view reports.
remove_user array of strings Removes users from the project.
change_role array of objects To change users' roles, specify the user and role (admin, sharer, or viewer)

Note: Users may be identified by email address, sharer_id, or awe.sm username. New users must be identified by email address and will receive a welcome email.

Conversions Object

Parameter Type Description
enabled boolean true to enable conversion tracking. false to disable.
domains string or array of strings Adds additional hostnames of websites where conversions from shares will be tracked. Accepts 3 types of values:
  • `all`: a special string value to enable conversion tracking on all redirections
  • a single hostname string, e.g. example.com
  • an array of hostnames, e.g. ["example.com", "www.example.com"]
remove_domain string or array of strings The hostnames of websites where conversions from shares will no longer be tracked. Accepts 2 types of values:
  • a single hostname string, e.g. example.com
  • an array of hostnames, e.g. ["example.com", "www.example.com"]
goal_1_label
goal_2_label
goal_3_label
goal_4_label
goal_5_label
goal_6_label
goal_7_label
goal_8_label
goal_9_label
goal_10_label
string The display name metadata for conversion tracking goals. 256 character limit.

Example Project Update Object

Remember: Only include parameters being modified.

{
    "name": "myNewProject",
    "domains" : [
        "examp.le",
        "demo.examp.le"
    ],
    "remove_domain": [
        "test.examp.le"
    ]
    "default_domain": "examp.le"
    "admins": [
        "jeremiah"
    ],
    "sharers": [
        "paul@example.com"
    ],
    "viewers": [
        "9x69x9x0-42x1-420x-9876-123139064x99"
    ],
    "remove_user": [
        "sally"
    ],
    "change_role": [
        {
            "user": "bob",
            "role": "viewer"
        }
    ],
    "conversions": {
        "enabled": true,
        "domains": [
            "example.com",
            "www.example.com"
        ],
        "remove_domain": "another-example.net",
        "goal_4_label": "Followed on Twitter via Follow Button"
    }
}

Example

Add pammy@example.com as a sharer to the project.

POST http://api.awe.sm/projects/6xxxxxxxxx58xx0xxx74xx3x76xx83x6x34xx48x7xxxx55x167037818d65x66x/update?subscription_key=sub-xXXxXxxX&application_key=nZurcZ&json={"sharers":"pammy@example.com"}

{
    "request": {
        "apikey": "6xxxxxxxxx58xx0xxx74xx3x76xx83x6x34xx48x7xxxx55x167037818d65x66x",
        "application_key": "nZurcZ",
        "json": "{\"sharers\":\"pammy@example.com\"}",
        "method": "update",
        "object": "project",
        "subscription_key": "sub-xXXxXxxX"
    },
    "response": {
        "project": {
            "admins": [
                {
                    "default_project": "HairByPammy",
                    "email": "pammy@example.com",
                    "name": "Pammy Sue",
                    "sharer_id": "8696x120-22xx-412x-58xx-456139064x96",
                    "username": "pammy"
                }
            ],
            "api_key": "6xxxxxxxxx58xx0xxx74xx3x76xx83x6x34xx48x7xxxx55x167037818d65x66x",
            "created_at": "2011-10-25 00:43:49",
            "default_domain": "awe.sm",
            "domains": [],
            "name": "myNewProject",
            "sharers": [],
            "updated_at": "2011-10-25 00:43:19",
            "viewers": []
        }
    }
}

Last updated 2012-05-14