|
This is legacy documentation
CloudBees Feature Management is now part of CloudBees Unify. For current feature management documentation, go to CloudBees Unify Feature management. This documentation covers the original CloudBees Feature Management product (formerly Rollout.io), which is end-of-life. It remains available only for existing customers who are migrating to CloudBees Unify. |
|
Support during the extension period
Because CloudBees Feature Management is an end-of-life product, support during the extension period is limited to critical items only:
This coverage is consistent with the CloudBees end-of-life policy in the support Terms & Conditions. |
This pages discusses the REST API calls for users.
Get Users
Returns all team members under the account.
https://x-api.rollout.io/public-api/users
var request = require("request"); var options = { method: 'GET', url: 'https://x-api.rollout.io/public-api/users', headers: { accept: 'application/json', authorization: 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
ccurl --request GET \ --url https://x-api.rollout.io/public-api/users \ --header 'accept: application/json' \ --header 'authorization: Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6'
require 'uri' require 'net/http' require 'openssl' url = URI("https://x-api.rollout.io/public-api/users") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["accept"] = 'application/json' request["authorization"] = 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' response = http.request(request) puts response.read_body
import requests url = "https://x-api.rollout.io/public-api/users" headers = { 'accept': "application/json", 'authorization': "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6" } response = requests.request("GET", url, headers=headers) print(response.text)
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://x-api.rollout.io/public-api/users") .get() .addHeader("accept", "application/json") .addHeader("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6") .build(); Response response = client.newCall(request).execute();
var client = new RestClient("https://x-api.rollout.io/public-api/users"); var request = new RestRequest(Method.GET); request.AddHeader("accept", "application/json"); request.AddHeader("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6"); IRestResponse response = client.Execute(request);
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://x-api.rollout.io/public-api/users" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("accept", "application/json") req.Header.Add("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
Users response
Example:
[ { "name":"John Smith", "email":"jsmith@acmecorp.example", "teamAdmin":true, "applications":{ "1a23bcd4e5fg6h7890i123j4":{ "environments":{ "Production":"write", "AcmeEnvironment":"write" } } } } ]
Response schema type: array of objects
-
String email - the user email
-
String name - Name of user
-
Boolean *teamAdmin - True if user is one of the team admins
-
Object applications - access to the following applications ID
Create User
Add a new User or override existing one
https://x-api.rollout.io/public-api/users
var request = require("request"); var options = { method: 'PUT', url: 'https://x-api.rollout.io/public-api/users', headers: { 'content-type': 'application/json', authorization: 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' }, body: { applications: { '5f1175a8f8daa545e28c8aa2': {environments: {'Production': 'read'}} }, email: 'joe.smith@acmecorp.example', name: 'Joe Smith', teamAdmin: true }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
curl --request PUT \ --url https://x-api.rollout.io/public-api/users \ --header 'authorization: Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' \ --header 'content-type: application/json' \ --data '{"applications":{"5f1175a8f8daa545e28c8aa2":{"environments":{"Production":"read"}}},"email":"joe.smith@acmecorp.example","name":"Joe Smith","teamAdmin":true}'
require 'uri' require 'net/http' require 'openssl' url = URI("https://x-api.rollout.io/public-api/users") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Put.new(url) request["content-type"] = 'application/json' request["authorization"] = 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' request.body = "{\"applications\":{\"5f1175a8f8daa545e28c8aa2\":{\"environments\":{\"Production\":\"read\"}}},\"email\":\"joe.smith@acmecorp.example\",\"name\":\"Joe Smith\",\"teamAdmin\":true}" response = http.request(request) puts response.read_body
import requests url = "https://x-api.rollout.io/public-api/users" payload = "{\"applications\":{\"5f1175a8f8daa545e28c8aa2\":{\"environments\":{\"Production\":\"read\"}}},\"email\":\"joe.smith@acmecorp.example\",\"name\":\"Joe Smith\",\"teamAdmin\":true}" headers = { 'content-type': "application/json", 'authorization': "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6" } response = requests.request("PUT", url, data=payload, headers=headers) print(response.text)
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"applications\":{\"5f1175a8f8daa545e28c8aa2\":{\"environments\":{\"Production\":\"read\"}}},\"email\":\"joe.smith@acmecorp.example\",\"name\":\"Joe Smith\",\"teamAdmin\":true}"); Request request = new Request.Builder() .url("https://x-api.rollout.io/public-api/users") .put(body) .addHeader("content-type", "application/json") .addHeader("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6") .build(); Response response = client.newCall(request).execute();
var client = new RestClient("https://x-api.rollout.io/public-api/users"); var request = new RestRequest(Method.PUT); request.AddHeader("content-type", "application/json"); request.AddHeader("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6"); request.AddParameter("application/json", "{\"applications\":{\"5f1175a8f8daa545e28c8aa2\":{\"environments\":{\"Production\":\"read\"}}},\"email\":\"joe.smith@acmecorp.example\",\"name\":\"Joe Smith\",\"teamAdmin\":true}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://x-api.rollout.io/public-api/users" payload := strings.NewReader("{\"applications\":{\"5f1175a8f8daa545e28c8aa2\":{\"environments\":{\"Production\":\"read\"}}},\"email\":\"joe.smith@acmecorp.example\",\"name\":\"Joe Smith\",\"teamAdmin\":true}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("content-type", "application/json") req.Header.Add("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
Get User
Returns the team members with given email
https://x-api.rollout.io/public-api/users/email
var request = require("request"); var options = { method: 'GET', url: 'https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example', headers: { accept: 'application/json', authorization: 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
curl --request GET \ --url https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example \ --header 'accept: application/json' \ --header 'authorization: Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6'
require 'uri' require 'net/http' require 'openssl' url = URI("https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["accept"] = 'application/json' request["authorization"] = 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' response = http.request(request) puts response.read_body
import requests url = "https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example" headers = { 'accept': "application/json", 'authorization': "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6" } response = requests.request("GET", url, headers=headers) print(response.text)
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example") .get() .addHeader("accept", "application/json") .addHeader("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6") .build(); Response response = client.newCall(request).execute();
var client = new RestClient("https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example"); var request = new RestRequest(Method.GET); request.AddHeader("accept", "application/json"); request.AddHeader("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6"); IRestResponse response = client.Execute(request);
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("accept", "application/json") req.Header.Add("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
User response
Example:
{ "name": "joe.smith@acmecorp.com", "email": "joe.smith@acmecorp.com", "teamAdmin": true, "applications": { "5f69f8d790e25112535887d2": { "environments": { "Production": "write", "Staging": "write", "Development": "write", "AcmeEnvironment": "write" } }, "5f7208c46c8bb65c30b00b77": { "environments": { "Production": "write" } } } }
Response schema type: object
-
String email - the user email
-
String name - Name of user
-
Boolean teamAdmin - True if user is one of the team admins
-
Object applications - access to the following applications id
Patch User
Patch User object, patching is done according to JSON-Patch (RFC6902)
https://x-api.rollout.io/public-api/users/email
var request = require("request"); var options = { method: 'PATCH', url: 'https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example', headers: { 'content-type': 'application/json', authorization: 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' }, body: [{op: 'replace', path: '/name', value: 'Moshe Ofnik'}], json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
curl --request PATCH \ --url https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example \ --header 'authorization: Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' \ --header 'content-type: application/json' \ --data '[{"op":"replace","path":"/name","value":"Moshe Ofnik"}]'
require 'uri' require 'net/http' require 'openssl' url = URI("https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Patch.new(url) request["content-type"] = 'application/json' request["authorization"] = 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' request.body = "[{\"op\":\"replace\",\"path\":\"/name\",\"value\":\"Moshe Ofnik\"}]" response = http.request(request) puts response.read_body
import requests url = "https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example" payload = "[{\"op\":\"replace\",\"path\":\"/name\",\"value\":\"Moshe Ofnik\"}]" headers = { 'content-type': "application/json", 'authorization': "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6" } response = requests.request("PATCH", url, data=payload, headers=headers) print(response.text)
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "[{\"op\":\"replace\",\"path\":\"/name\",\"value\":\"Moshe Ofnik\"}]"); Request request = new Request.Builder() .url("https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example") .patch(body) .addHeader("content-type", "application/json") .addHeader("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6") .build(); Response response = client.newCall(request).execute();
var client = new RestClient("https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example"); var request = new RestRequest(Method.PATCH); request.AddHeader("content-type", "application/json"); request.AddHeader("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6"); request.AddParameter("application/json", "[{\"op\":\"replace\",\"path\":\"/name\",\"value\":\"Moshe Ofnik\"}]", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example" payload := strings.NewReader("[{\"op\":\"replace\",\"path\":\"/name\",\"value\":\"Moshe Ofnik\"}]") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("content-type", "application/json") req.Header.Add("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
Delete User
Removes a user from Rollout system
https://x-api.rollout.io/public-api/users/email
var request = require("request"); var options = { method: 'DELETE', url: 'https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example', headers: {authorization: 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });
curl --request DELETE \ --url https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example \ --header 'authorization: Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6'
require 'uri' require 'net/http' require 'openssl' url = URI("https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Delete.new(url) request["authorization"] = 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6' response = http.request(request) puts response.read_body
import requests url = "https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example" headers = {'authorization': 'Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6'} response = requests.request("DELETE", url, headers=headers) print(response.text)
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example") .delete(null) .addHeader("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6") .build(); Response response = client.newCall(request).execute();
var client = new RestClient("https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example"); var request = new RestRequest(Method.DELETE); request.AddHeader("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6"); IRestResponse response = client.Execute(request);
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://x-api.rollout.io/public-api/users/joe.smith%40acmecorp.example" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("authorization", "Bearer b0c17g9f-79f4-69da-cc45-67db602c10d6") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
PATH PARAMS
-
email string - The user email
|
As a security measure, a rate limit has been implemented to one request per second, and is based on the requester IP address. Any requests at rates that exceed the rate limit will receive a |