CreateStatusListEntry

Create status registry entry

rpc CreateStatusListEntry

registry_api.v1.CreateStatusListEntry

Create status registry entry

requests CreateStatusListEntryRequest

registry_api.v1.CreateStatusListEntryRequest

FieldTypeDescription
credential_idstringCredential Unique ID, e.g. “https://issuer.oidp.uscis.gov/credentials/83627465“
credential_issuer_idstringCredential Issuer DID.
status_purposeStatusPurpose enum
FieldNumberDescription
STATUS_PURPOSE_UNSPECIFIED0Status Purpose, e.g. revocation.Status Unspecified.
STATUS_PURPOSE_REVOCATION1Status Purpose, e.g. revocation.Status Revocation.
STATUS_PURPOSE_SUSPENSION2Status Purpose, e.g. revocation.Status Suspension.
credential_typestringCredential Type, e.g. BankAccount, Citizenship.
statusboolStatus.
resp, _ := statusListRegistryService.CreateStatusListEntry(ctx, &v1.CreateStatusListEntryRequest{
  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 createstatuslistentryrequest = new CreateStatusListEntryRequest();
createstatuslistentryrequest.setCredentialId("https://issuer.oidp.uscis.gov/credentials/83627465");
createstatuslistentryrequest.setCredentialIssuerId("did:method-name:zDIDCredentialIssuerMultibase58Encoded");
createstatuslistentryrequest.setCredentialType("BankAccount");
createstatuslistentryrequest.setStatus(true);
createstatuslistentryrequest.setStatusPurpose(StatusPurpose.STATUS_PURPOSE_SUSPENSION);

service.createStatusListEntry(createstatuslistentryrequest, (err, value:CreateStatusListEntryResponse|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 createStatusListEntryRequest = new CreateStatusListEntryRequest{
        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.CreateStatusListEntry(createStatusListEntryRequest, 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.CreateStatusListEntryRequest;
import registry_api.v1.Registry.CreateStatusListEntryResponse;
import registry_api.v1.Registry.StatusPurpose;
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);
    
    CreateStatusListEntryRequest req_CreateStatusListEntryRequest =
        CreateStatusListEntryRequest.newBuilder()
          .setCredentialId("https://issuer.oidp.uscis.gov/credentials/83627465")
          .setCredentialIssuerId("did:method-name:zDIDCredentialIssuerMultibase58Encoded")
          .setCredentialType("BankAccount")
          .setStatus(true)
          .setStatusPurpose(StatusPurpose.STATUS_PURPOSE_UNSPECIFIED)
          .build();
    CreateStatusListEntryResponse resp = blockStub.createStatusListEntry(req_CreateStatusListEntryRequest);
    System.out.println(resp);
    channel.shutdown();
  }
}
const createstatuslistentryrequest = new CreateStatusListEntryRequest();
createstatuslistentryrequest.setCredentialId("https://issuer.oidp.uscis.gov/credentials/83627465");
createstatuslistentryrequest.setCredentialIssuerId("did:method-name:zDIDCredentialIssuerMultibase58Encoded");
createstatuslistentryrequest.setCredentialType("BankAccount");
createstatuslistentryrequest.setStatus(true);
createstatuslistentryrequest.setStatusPurpose(StatusPurpose.STATUS_PURPOSE_SUSPENSION);

service.createStatusListEntry(createstatuslistentryrequest, (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::CreateStatusListEntryRequest;

#[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(
    CreateStatusListEntryRequest{
      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.create_status_list_entry(request).await?.into_inner();
  println!("RESPONSE={:?}", response);
  Ok(())
}
package app

import io.grpc.ManagedChannelBuilder
import registry_api.v1.Registry.CreateStatusListEntryRequest
import registry_api.v1.Registry.CreateStatusListEntryResponse
import registry_api.v1.Registry.StatusPurpose
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_CreateStatusListEntryRequest = CreateStatusListEntryRequest.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.createStatusListEntry(req_CreateStatusListEntryRequest)
    println(resp)
    channel.shutdown()
}


returns CreateStatusListEntryResponse

registry_api.v1.CreateStatusListEntryResponse

FieldTypeDescription
status_list_entryStatusListEntryCreated StatusListEntry.
{
  "status_list_entry": {
    "credential_id": "https://issuer.oidp.uscis.gov/credentials/83627465",
    "credential_issuer_id": "did:method-name:zDIDCredentialIssuerMultibase58Encoded",
    "status_purpose": 0,
    "credential_type": "BankAccount",
    "status_list_index": 0,
    "status_list_credential_id": "https://reg.YOUR_SANDBOX_URL.knoxnetworks.io/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "status": true
  }
}