Update status registry entry
rpc UpdateStatusListEntry
UpdateStatusListEntry
registry_api.v1.UpdateStatusListEntry
registry_api.v1.UpdateStatusListEntry
Update status registry entry
requests UpdateStatusListEntryRequest
UpdateStatusListEntryRequest
registry_api.v1.UpdateStatusListEntryRequest
registry_api.v1.UpdateStatusListEntryRequest
Field | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
credential_id | string | Credential Unique ID, e.g. “https://issuer.oidp.uscis.gov/credentials/83627465“ | ||||||||||||
credential_issuer_id | string | Credential Issuer DID. | ||||||||||||
status_purpose | StatusPurpose enum |
| ||||||||||||
credential_type | string | Credential Type, e.g. BankAccount, Citizenship. | ||||||||||||
status | bool | Status. |
resp, _ := statusListRegistryService.UpdateStatusListEntry(ctx, &v1.UpdateStatusListEntryRequest{
CredentialId: "https://issuer.oidp.uscis.gov/credentials/83627465",
CredentialIssuerId: "did:method-name:zDIDCredentialIssuerMultibase58Encoded",
CredentialType: "BankAccount",
Status: true,
StatusPurpose: v1.StatusPurpose_STATUS_PURPOSE_UNSPECIFIED,
})
fmt.Println(resp)
const updatestatuslistentryrequest = new UpdateStatusListEntryRequest();
updatestatuslistentryrequest.setCredentialId("https://issuer.oidp.uscis.gov/credentials/83627465");
updatestatuslistentryrequest.setCredentialIssuerId("did:method-name:zDIDCredentialIssuerMultibase58Encoded");
updatestatuslistentryrequest.setCredentialType("BankAccount");
updatestatuslistentryrequest.setStatus(true);
updatestatuslistentryrequest.setStatusPurpose(StatusPurpose.STATUS_PURPOSE_UNSPECIFIED);
service.updateStatusListEntry(updatestatuslistentryrequest, (err, value:UpdateStatusListEntryResponse|null) => {
const resp = JSON.stringify(err ? err : value);
console.log("received ", resp);
})
using System;
using Grpc.Core;
using RegistryApi.V1;
namespace main
{
class Program
{
static void Main(string[] args)
{
Channel channel = new Channel("stat-list-reg.YOUR_SANDBOX_ID.knoxnetworks.io:443", ChannelCredentials.Insecure);
var client = new StatusListRegistryService.StatusListRegistryServiceClient(channel);
var headers = new Metadata();
var updateStatusListEntryRequest = new UpdateStatusListEntryRequest{
CredentialId = "https://issuer.oidp.uscis.gov/credentials/83627465",
CredentialIssuerId = "did:method-name:zDIDCredentialIssuerMultibase58Encoded",
CredentialType = "BankAccount",
Status = true,
StatusPurpose = StatusPurpose.Status_purpose_unspecified,
};
var reply = client.UpdateStatusListEntry(updateStatusListEntryRequest, headers);
Console.WriteLine("Response: " + reply);
channel.ShutdownAsync().Wait();
}
}
}
package demo;
import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import registry_api.v1.Registry.StatusPurpose;
import registry_api.v1.Registry.UpdateStatusListEntryRequest;
import registry_api.v1.Registry.UpdateStatusListEntryResponse;
import registry_api.v1.StatusListRegistryServiceGrpc;
public class App {
public static void main(String[] args) {
ManagedChannel channel = ManagedChannelBuilder
.forAddress("stat-list-reg.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
.usePlaintext()
.build();
StatusListRegistryServiceGrpc.StatusListRegistryServiceBlockingStub blockStub =
StatusListRegistryServiceGrpc.newBlockingStub(channel);
UpdateStatusListEntryRequest req_UpdateStatusListEntryRequest =
UpdateStatusListEntryRequest.newBuilder()
.setCredentialId("https://issuer.oidp.uscis.gov/credentials/83627465")
.setCredentialIssuerId("did:method-name:zDIDCredentialIssuerMultibase58Encoded")
.setCredentialType("BankAccount")
.setStatus(true)
.setStatusPurpose(StatusPurpose.STATUS_PURPOSE_UNSPECIFIED)
.build();
UpdateStatusListEntryResponse resp = blockStub.updateStatusListEntry(req_UpdateStatusListEntryRequest);
System.out.println(resp);
channel.shutdown();
}
}
const updatestatuslistentryrequest = new UpdateStatusListEntryRequest();
updatestatuslistentryrequest.setCredentialId("https://issuer.oidp.uscis.gov/credentials/83627465");
updatestatuslistentryrequest.setCredentialIssuerId("did:method-name:zDIDCredentialIssuerMultibase58Encoded");
updatestatuslistentryrequest.setCredentialType("BankAccount");
updatestatuslistentryrequest.setStatus(true);
updatestatuslistentryrequest.setStatusPurpose(StatusPurpose.STATUS_PURPOSE_SUSPENSION);
service.updateStatusListEntry(updatestatuslistentryrequest, (err, value) => {
const resp = JSON.stringify(err ? err : value);
console.log("received ", resp);
})
extern crate grpc-sdks;
use tonic::transport::Channel;
use grpc-sdks::registry_api::v1::status_list_registry_service_client::StatusListRegistryServiceClient;
use grpc-sdks::registry_api::v1::StatusPurpose;
use grpc-sdks::registry_api::v1::UpdateStatusListEntryRequest;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let channel = Channel::from_static("stat-list-reg.YOUR_SANDBOX_ID.knoxnetworks.io")
.connect()
.await?;
let mut client = StatusListRegistryServiceClient::new(channel);
let request = tonic::Request::new(
UpdateStatusListEntryRequest{
credential_id: String::from("https://issuer.oidp.uscis.gov/credentials/83627465"),
credential_issuer_id: String::from("did:method-name:zDIDCredentialIssuerMultibase58Encoded"),
credential_type: String::from("BankAccount"),
status: true,
status_purpose: StatusPurpose::StatusPurposeUnspecified as i32
});
// sending request and waiting for response
let response = client.update_status_list_entry(request).await?.into_inner();
println!("RESPONSE={:?}", response);
Ok(())
}
package app
import io.grpc.ManagedChannelBuilder
import registry_api.v1.Registry.StatusPurpose
import registry_api.v1.Registry.UpdateStatusListEntryRequest
import registry_api.v1.Registry.UpdateStatusListEntryResponse
import registry_api.v1.StatusListRegistryServiceGrpc
fun main() {
val channel = ManagedChannelBuilder
.forAddress("stat-list-reg.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
.usePlaintext()
.build()
var blockStub = StatusListRegistryServiceGrpc.newBlockingStub(channel)
val req_UpdateStatusListEntryRequest = UpdateStatusListEntryRequest.newBuilder()
.setCredentialId("https://issuer.oidp.uscis.gov/credentials/83627465")
.setCredentialIssuerId("did:method-name:zDIDCredentialIssuerMultibase58Encoded")
.setCredentialType("BankAccount")
.setStatus(true)
.setStatusPurpose(StatusPurpose.STATUS_PURPOSE_UNSPECIFIED)
.build()
val resp = blockStub.updateStatusListEntry(req_UpdateStatusListEntryRequest)
println(resp)
channel.shutdown()
}
returns UpdateStatusListEntryResponse
UpdateStatusListEntryResponse
registry_api.v1.UpdateStatusListEntryResponse
registry_api.v1.UpdateStatusListEntryResponse
{}