Skip to end of metadata
Go to start of metadata

User Service

Here "user" refers to people or groups using Xandr's APIs. The User Service will allow you to manage who has access to Xandr's APIs. Users are classified as by a user type of either bidder or member.

  • Bidder users can be created by other bidder users.
  • A bidder-user can create and update member-users as well as update its own user info.
  • A member-user can update its own user info.
  • Each new username associated with a particular bidder must be unique.

On This Page

REST API

To see all users you have created:
GET https://api.adnxs.com/user

To see a particular user:
GET https://api.adnxs.com/user/USER_ID

To add a user:
POST https://api.adnxs.com/user
(user JSON)

To modify an existing user:
PUT https://api.adnxs.com/user/USER_ID
(user JSON)

JSON structure

Field

Required

Type

Description

id

yes (on update)

int

Internal ID associated with the user.

active

no

Bool

Currently you cannot delete a user. For now, set to active to "false"

username

yes (on add)

string(50)

Name of the user. User names must be unique.

Note: After a user is created, the username cannot be changed.

password

yes (on add)

string

Password for the user.

email

yes

string

Email of the user. (Note that a user can be created without an email, but this will cause problems later when trying to update the user.)

user_type

yes

enum('bidder','member')

Type of user being added.

read_only

no

Boolean

Users with read_only field set to true can not add, modify, or delete resources.

entity_id

yes (on add)

int

ID of the entity the user belongs to (member or bidder). If the user_type is "bidder" this is the bidder ID. If the user_type is "member" this is the member ID.

entity_name

no

string

Name of the entity the user belongs to (member or bidder).

first_name

no

string

User's first name

last_name

no

string

User's last name

phone

no

string

User's phone contact

publisher_id

no

string

This field is only used for Displaywords

advertiser_id

no

string

This field is only used for Displaywords

advertiser_accessnoarray of objectsThe advertiser(s) that the user can access, if user_type is "member_advertiser".
publisher_accessnoarray of objectsThe publisher(s) that the user can access, if user_type is "member_publisher".
api_loginnoBoolean

True if the user has access to the API. Default is False.

 This is an admin-only field. If you create a new user who needs API access, contact customer support to request that this value be set to True.

custom_datanostringAny information relevant to the user.
send_safety_budget_notificationsnoBooleanIf true, the user will receive email notifications when the daily safety budget threshold is approached. For more details, see the daily_budget field on the Member Service.
timezonenostringThe user's timezone.
entity_reporting_decimal_typenostring

Whether number values are separated by a comma or a decimal in reports. If this field is set to decimal, the value returned would be formatted like this: 1234.56. Whereas, if this field is set to comma, the value returned would be formatted like this: 1234.56.

Possible values:

  • decimal
  • comma
reporting_decimal_typenostring

The character used for decimals in reporting. Possible values:

  • "comma"
  • "decimal" (period)

This setting can be overridden at the report level (see reporting_decimal_typein the Report Service).

decimal_marknostringThe character used to represent a decimal mark, such as "period" for a value of 12.7.
thousand_seperatornostringThe character used to separate thousands in numeric values, such as "comma" for the value 1,276.
last_modifiednodateThe date the any of the user settings were last modified.
is_developernoBooleanRead-only. This flag gives a user rights to access certain developer-focused services such as the Plugin and Plugin Instance services, which are used by apps. It is set to true by a Xandr admin on a case-by-case basis.
role_idnointThe ID of the role associated with this user.
password_expires_onnodateThe date the user password expires.
password_last_changed_onnodateThe date the user's password was last changed.

Examples

Authentication Token
Authentication is always the first step when using the API Services. The authentication token can then be written to our cookie file for future use. Please see Authentication Service for more detailed instructions.

Create a user profile text file
To give API access to "TestUser," you will create a text file in JSON format with the username and password of the user, and the ID of either a member or bidder to which this user will belong. Below we have used the "cat" command to output an example user JSON file.

Guidelines for creating your password

When creating your password, please create a complex password with the following:

  • 10 or more characters
  • 64 or fewer characters
  • At least one capital letter (A–Z)
  • At least one lowercase letter (a–z)
  • At least one digit (0–9)
  • At least one special character (such as #, $, ? %, &)

Add a new user to the Imp Bus cache

Now we will input the user file. We have used cookies to authenticate ourselves.

Retrieve user information from the Imp Bus cache
We know from the output of the above command that the user we just added has been assigned ID #59 by the Imp Bus. We can use that ID to view information about this particular user. To see all users that we have created, we would leave off the user ID.

Request API access

Notice in the returned code above the api_login field. This field can only be changed by a Xandr administrator. The final step in giving a user access to the API is to contact customer support and request that the api_login flag for the user be set to true. Be sure to include username or ID in the request.

Related Topics

  • No labels