URI | /v1/partners/{username}/users |
URI Parameters |
|
Methods | GET, POST |
GET /v1/partners/{username}/users
Gets a partner's users.
Scope | partners_read |
Query Selector Parameters |
|
Query Pagination Parameters |
|
Query Sorting Parameters |
|
Request Body Parameters |
|
Response Attributes |
|
Example JSON
Request:
GET /v1/partners/barracuda/users HTTP/1.1
Host: api.intronis.com
Authorization: OAuth vF9dft4qmT
Accept: application/json
Response:
HTTP/1.1 200 OK
Content-Type: application/json
{
"page": 1,
"page_size": 10,
"count": 2,
"links": [
{
"rel": "first",
"href": "https://api.intronis.com/v1/partners/barracuda/users?page=1"
},
],
"list": [
{
"username": "tech_user",
"name": "John Smith",
"role": "TECH",
"link": {
"rel": "self",
"href": "https://api.intronis.com/v1/partners/barracuda/users/tech_user"
}
},
{
"username": "admin_user",
"name": "John Smith",
"role": "ADMIN",
"link": {
"rel": "self",
"href": "https://api.intronis.com/v1/partners/barracuda/users/admin_user"
}
}
]
}
Example XML
Request:
GET /v1/partners/barracuda/users HTTP/1.1
Host: api.intronis.com
Authorization: OAuth vF9dft4qmT
Accept: application/xml
Response:
HTTP/1.1 200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?>
<list page="2" page_size="10" count="2">
<link rel="first" href="https://api.intronis.com/v1/partners/barracuda/users?page=1"/>
<user>
<username>tech_user</username>
<name>John Smith</name>
<role>TECH</role>
<link rel="self" href="https://api.intronis.com/v1/partners/barracuda/users/tech_user"/>
</user>
<user>
<username>admin_user</username>
<name>John Smith</name>
<role>ADMIN</role>
<link rel="self" href="https://api.intronis.com/v1/partners/barracuda/users/admin_user"/>
</user>
</list>
POST /v1/partners/{username}/users
Adds a new user to the partner.
Scope | partners_write |
Request Body Parameters |
|
Response Attributes |
|
Example JSON
Request:
POST /v1/partners/barracuda/users HTTP/1.1
Host: api.intronis.com
Authorization: OAuth vF9dft4qmT
Content-Type: application/json
{
"username": "tech_user",
"password": "ps8wEzeT",
"name": "John Smith",
"company": "barracuda",
"street_address": "334 Congress Street",
"street_address2": "",
"city": "Boston",
"state": "MA",
"zip": "02210",
"country": "USA",
"country_iso": "US",
"email": "jsmith@barracuda.com",
"phone": "617-948-5300",
"role": "TECH"
}
Response:
HTTP/1.1 201 Created
Location: https://api.intronis.com/v1/partners/barracuda/users/tech_user
Example XML
Request:
POST /v1/partners/barracuda/users HTTP/1.1
Host: api.intronis.com
Authorization: OAuth vF9dft4qmT
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8" ?>
<user>
<username>tech_user</username>
<password>ps8wEzeT</password>
<name>John Smith</name>
<company>barracuda</company>
<street_address>334 Congress Street</street_address>
<street_address2/>
<city>Boston</city>
<state>MA</state>
<zip>02210</zip>
<country>USA</country>
<country_iso>US</country_iso>
<email>jsmith@barracuda.com</email>
<phone>617-948-5300</phone>
<role>TECH</role>
</user>
Response:
HTTP/1.1 201 Created
Location: https://api.intronis.com/v1/partners/barracuda/users/tech_user