Access to the Segment Management REST API is authorized through the use of an API Key and cryptographic signature which is required for each request. Each request should set the HTTP Authorization header using the HTTP Basic authentication scheme where the username is the API Key and the secret is a shared secret known only to Rubicon and you. Most programming libraries have support for this method of HTTP Authentication.
The base URL for all API requests is https://api.rubiconproject.com/.
Creates a new segment for a partner.
POST /vendors/api/inventory/v1/vendor/<vendorId>/segments
Parameter
Type
Required
Description
vendorId
Numeric
Yes
The Magnite vendor ID
The body of the request will be in JSON format:
Field
name
String
A short name for the segment. The value must be 100 characters or less, start with an alpha character, and may only contain the following: letters characters, numbers, spaces, ., _, &, -, $, (, ), /
value
The identifier for the segment. The value must be 100 characters or less, start with an alpha or numeric character, and may only contain the following: letters characters, numbers, spaces, ., _, &, -, $, (, ), /
description
An optional, non-blank, description of the segment to be used for display purposes. If not provided the the name will be used. A blank value is not accepted. The value must be 100 characters or less.
Results are returned as JSON.
SegmentId
The Magnite Segment ID
A short name for the segment
The Vendor's identifier for the segment
The description for the segment
Code
403
The user is not authorized for this call for the specified seatId
422
Missing or invalid values
==request== POST /vendors/api/inventory/v1/vendor/3/segments/ Content-Type: application/json { "name": "Baseball Enthusiast", "value": "42532", "description": "Baseball Enthusiast" }
==response== Content-Type: application/json { "rubiconSegmentId": 789, "name": "Baseball Enthusiast", "value": "42532", "description: "Baseball Enthusiast" }
Update an existing segment for a publisher.
PUT /vendors/api/inventory/v1/vendor/<vendorId>/segments/<segmentId>
The Id of the Vendor
segmentId
The Magnite SegmentId of the Segment
The Vendors's identifier for the segment
404
The requested segment ID could not be found
==request== PUT /vendors/api/inventory/v1/vendor/<vendorId>/segments/<segmentId> Content-Type: application/json { "name": "update name", "value": "update value", "description": "update description" }
==response== Content-Type: application/json { "rubiconSegmentId": 2239748, "name": "update name", "value": "update value", "description": "update description" }
Get a list of the existing segments for a publisher.
GET /vendors/api/inventory/v1/vendor/<vendorId>/segments
vendorID
segmentID
segments
Segment[]
An array of segments
==request== GET /vendors/api/inventory/v1/vendor/<vendorId>/segments
==response== Content-Type: application/json { "segments": [ { "rubiconSegmentId": 1240366, "name": "test", "value": "123456", "description": "Test" }, { "rubiconSegmentId": 1239748, "name": "hyun", "value": "joo" }, { "rubiconSegmentId": 1238428, "name": "immanuel_test_3", "value": "hello" } }
===== Example Request ===== GET /vendors/api/inventory/v1/vendor/<vendorId>/segments/<segmentId>
===== Example Response ===== { "rubiconSegmentId": 1239748, "name": "hyun", "value": "joo" }