JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun({
apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});
const field = await client.credentials.packages.credentials.fields.update('email', {
packageName: 'x',
credentialName: '26f1kl_-n-71',
value: 'x',
});
console.log(field.data);import os
from mobilerun_sdk import Mobilerun
client = Mobilerun(
api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"), # This is the default and can be omitted
)
field = client.credentials.packages.credentials.fields.update(
field_type="email",
package_name="x",
credential_name="26f1kl_-n-71",
value="x",
)
print(field.data)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/droidrun-cloud-go"
"github.com/stainless-sdks/droidrun-cloud-go/option"
)
func main() {
client := mobileruncloud.NewClient(
option.WithAPIKey("My API Key"),
)
field, err := client.Credentials.Packages.Credentials.Fields.Update(
context.TODO(),
mobileruncloud.CredentialPackageCredentialFieldUpdateParamsFieldTypeEmail,
mobileruncloud.CredentialPackageCredentialFieldUpdateParams{
PackageName: "x",
CredentialName: "26f1kl_-n-71",
Value: "x",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", field.Data)
}mobilerun-cloud credentials:packages:credentials:fields update \
--api-key 'My API Key' \
--package-name x \
--credential-name 26f1kl_-n-71 \
--field-type email \
--value xcurl --request PATCH \
--url https://api.mobilerun.ai/credentials/packages/{packageName}/credentials/{credentialName}/fields/{fieldType} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/credentials/packages/{packageName}/credentials/{credentialName}/fields/{fieldType}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'value' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://api.mobilerun.ai/credentials/packages/{packageName}/credentials/{credentialName}/fields/{fieldType}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/credentials/packages/{packageName}/credentials/{credentialName}/fields/{fieldType}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"ownerId": "<string>",
"createdBy": "<string>",
"userId": "<string>",
"packageName": "<string>",
"secretPath": "<string>",
"credentialName": "<string>",
"fields": [
{
"value": "<string>"
}
]
}
}{
"error": "<string>"
}App Credentials
Update the value of a credential field
Updates the value of an existing field on a credential, identified by packageName, credentialName, and fieldType in the path. The body carries the new value and returns the updated credential.
PATCH
/
credentials
/
packages
/
{packageName}
/
credentials
/
{credentialName}
/
fields
/
{fieldType}
JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun({
apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});
const field = await client.credentials.packages.credentials.fields.update('email', {
packageName: 'x',
credentialName: '26f1kl_-n-71',
value: 'x',
});
console.log(field.data);import os
from mobilerun_sdk import Mobilerun
client = Mobilerun(
api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"), # This is the default and can be omitted
)
field = client.credentials.packages.credentials.fields.update(
field_type="email",
package_name="x",
credential_name="26f1kl_-n-71",
value="x",
)
print(field.data)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/droidrun-cloud-go"
"github.com/stainless-sdks/droidrun-cloud-go/option"
)
func main() {
client := mobileruncloud.NewClient(
option.WithAPIKey("My API Key"),
)
field, err := client.Credentials.Packages.Credentials.Fields.Update(
context.TODO(),
mobileruncloud.CredentialPackageCredentialFieldUpdateParamsFieldTypeEmail,
mobileruncloud.CredentialPackageCredentialFieldUpdateParams{
PackageName: "x",
CredentialName: "26f1kl_-n-71",
Value: "x",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", field.Data)
}mobilerun-cloud credentials:packages:credentials:fields update \
--api-key 'My API Key' \
--package-name x \
--credential-name 26f1kl_-n-71 \
--field-type email \
--value xcurl --request PATCH \
--url https://api.mobilerun.ai/credentials/packages/{packageName}/credentials/{credentialName}/fields/{fieldType} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": "<string>"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/credentials/packages/{packageName}/credentials/{credentialName}/fields/{fieldType}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'value' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://api.mobilerun.ai/credentials/packages/{packageName}/credentials/{credentialName}/fields/{fieldType}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"value\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/credentials/packages/{packageName}/credentials/{credentialName}/fields/{fieldType}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"value\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": {
"ownerId": "<string>",
"createdBy": "<string>",
"userId": "<string>",
"packageName": "<string>",
"secretPath": "<string>",
"credentialName": "<string>",
"fields": [
{
"value": "<string>"
}
]
}
}{
"error": "<string>"
}Authorizations
Bearer token via Authorization header
Path Parameters
Required string length:
1 - 200Required string length:
3 - 50Pattern:
^[a-z0-9_-]+$Available options:
email, username, password, api_token, phone_number, two_factor_secret, backup_codes Body
application/json
Minimum string length:
1Was this page helpful?
⌘I