curl --request POST \
--url https://api.alpha-1edtech.ai/ims/ob/v3p0/credentials/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"@context": [
"<string>"
],
"id": "<string>",
"type": [
"<string>"
],
"issuer": "<string>",
"credentialSubject": {
"id": "<string>",
"type": [
"<string>"
],
"achievement": {
"id": "<string>",
"type": [
"<string>"
],
"name": "<string>",
"description": "<string>",
"criteria": {
"narrative": "<string>"
},
"achievementType": "<string>"
},
"identifier": [
{
"type": "<string>",
"identityHash": "<string>",
"identityType": "<string>",
"hashed": true
}
]
},
"validFrom": "<string>",
"name": "<string>",
"description": "<string>",
"proof": [
{
"type": "<string>",
"cryptosuite": "<string>",
"created": "<string>",
"proofPurpose": "<string>",
"verificationMethod": "<string>",
"proofValue": "<string>"
}
],
"validUntil": "<string>",
"credentialSchema": [
{
"id": "<string>",
"type": "<string>"
}
]
}
'import requests
url = "https://api.alpha-1edtech.ai/ims/ob/v3p0/credentials/"
payload = {
"@context": ["<string>"],
"id": "<string>",
"type": ["<string>"],
"issuer": "<string>",
"credentialSubject": {
"id": "<string>",
"type": ["<string>"],
"achievement": {
"id": "<string>",
"type": ["<string>"],
"name": "<string>",
"description": "<string>",
"criteria": { "narrative": "<string>" },
"achievementType": "<string>"
},
"identifier": [
{
"type": "<string>",
"identityHash": "<string>",
"identityType": "<string>",
"hashed": True
}
]
},
"validFrom": "<string>",
"name": "<string>",
"description": "<string>",
"proof": [
{
"type": "<string>",
"cryptosuite": "<string>",
"created": "<string>",
"proofPurpose": "<string>",
"verificationMethod": "<string>",
"proofValue": "<string>"
}
],
"validUntil": "<string>",
"credentialSchema": [
{
"id": "<string>",
"type": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
'@context': ['<string>'],
id: '<string>',
type: ['<string>'],
issuer: '<string>',
credentialSubject: {
id: '<string>',
type: ['<string>'],
achievement: {
id: '<string>',
type: ['<string>'],
name: '<string>',
description: '<string>',
criteria: {narrative: '<string>'},
achievementType: '<string>'
},
identifier: [
{
type: '<string>',
identityHash: '<string>',
identityType: '<string>',
hashed: true
}
]
},
validFrom: '<string>',
name: '<string>',
description: '<string>',
proof: [
{
type: '<string>',
cryptosuite: '<string>',
created: '<string>',
proofPurpose: '<string>',
verificationMethod: '<string>',
proofValue: '<string>'
}
],
validUntil: '<string>',
credentialSchema: [{id: '<string>', type: '<string>'}]
})
};
fetch('https://api.alpha-1edtech.ai/ims/ob/v3p0/credentials/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.alpha-1edtech.ai/ims/ob/v3p0/credentials/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'@context' => [
'<string>'
],
'id' => '<string>',
'type' => [
'<string>'
],
'issuer' => '<string>',
'credentialSubject' => [
'id' => '<string>',
'type' => [
'<string>'
],
'achievement' => [
'id' => '<string>',
'type' => [
'<string>'
],
'name' => '<string>',
'description' => '<string>',
'criteria' => [
'narrative' => '<string>'
],
'achievementType' => '<string>'
],
'identifier' => [
[
'type' => '<string>',
'identityHash' => '<string>',
'identityType' => '<string>',
'hashed' => true
]
]
],
'validFrom' => '<string>',
'name' => '<string>',
'description' => '<string>',
'proof' => [
[
'type' => '<string>',
'cryptosuite' => '<string>',
'created' => '<string>',
'proofPurpose' => '<string>',
'verificationMethod' => '<string>',
'proofValue' => '<string>'
]
],
'validUntil' => '<string>',
'credentialSchema' => [
[
'id' => '<string>',
'type' => '<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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.alpha-1edtech.ai/ims/ob/v3p0/credentials/"
payload := strings.NewReader("{\n \"@context\": [\n \"<string>\"\n ],\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"issuer\": \"<string>\",\n \"credentialSubject\": {\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"achievement\": {\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"criteria\": {\n \"narrative\": \"<string>\"\n },\n \"achievementType\": \"<string>\"\n },\n \"identifier\": [\n {\n \"type\": \"<string>\",\n \"identityHash\": \"<string>\",\n \"identityType\": \"<string>\",\n \"hashed\": true\n }\n ]\n },\n \"validFrom\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"proof\": [\n {\n \"type\": \"<string>\",\n \"cryptosuite\": \"<string>\",\n \"created\": \"<string>\",\n \"proofPurpose\": \"<string>\",\n \"verificationMethod\": \"<string>\",\n \"proofValue\": \"<string>\"\n }\n ],\n \"validUntil\": \"<string>\",\n \"credentialSchema\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.alpha-1edtech.ai/ims/ob/v3p0/credentials/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"@context\": [\n \"<string>\"\n ],\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"issuer\": \"<string>\",\n \"credentialSubject\": {\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"achievement\": {\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"criteria\": {\n \"narrative\": \"<string>\"\n },\n \"achievementType\": \"<string>\"\n },\n \"identifier\": [\n {\n \"type\": \"<string>\",\n \"identityHash\": \"<string>\",\n \"identityType\": \"<string>\",\n \"hashed\": true\n }\n ]\n },\n \"validFrom\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"proof\": [\n {\n \"type\": \"<string>\",\n \"cryptosuite\": \"<string>\",\n \"created\": \"<string>\",\n \"proofPurpose\": \"<string>\",\n \"verificationMethod\": \"<string>\",\n \"proofValue\": \"<string>\"\n }\n ],\n \"validUntil\": \"<string>\",\n \"credentialSchema\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpha-1edtech.ai/ims/ob/v3p0/credentials/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"@context\": [\n \"<string>\"\n ],\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"issuer\": \"<string>\",\n \"credentialSubject\": {\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"achievement\": {\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"criteria\": {\n \"narrative\": \"<string>\"\n },\n \"achievementType\": \"<string>\"\n },\n \"identifier\": [\n {\n \"type\": \"<string>\",\n \"identityHash\": \"<string>\",\n \"identityType\": \"<string>\",\n \"hashed\": true\n }\n ]\n },\n \"validFrom\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"proof\": [\n {\n \"type\": \"<string>\",\n \"cryptosuite\": \"<string>\",\n \"created\": \"<string>\",\n \"proofPurpose\": \"<string>\",\n \"verificationMethod\": \"<string>\",\n \"proofValue\": \"<string>\"\n }\n ],\n \"validUntil\": \"<string>\",\n \"credentialSchema\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"@context": [
"<string>"
],
"id": "<string>",
"type": [
"<string>"
],
"issuer": "<string>",
"credentialSubject": {
"id": "<string>",
"type": [
"<string>"
],
"achievement": {
"id": "<string>",
"type": [
"<string>"
],
"name": "<string>",
"description": "<string>",
"criteria": {
"narrative": "<string>"
},
"image": {
"id": "<string>",
"type": "<string>",
"caption": "<string>"
},
"achievementType": "<string>",
"creator": {
"id": "<string>",
"type": [
"<string>"
],
"name": "<string>",
"url": "<string>",
"email": "<string>",
"phone": "<string>",
"address": "<string>"
}
},
"identifier": [
{
"type": "<string>",
"identityHash": "<string>",
"identityType": "<string>",
"hashed": true
}
]
},
"validFrom": "<string>",
"name": "<string>",
"description": "<string>",
"image": {
"id": "<string>",
"type": "<string>",
"caption": "<string>"
},
"proof": [
{
"type": "<string>",
"cryptosuite": "<string>",
"created": "<string>",
"proofPurpose": "<string>",
"verificationMethod": "<string>",
"proofValue": "<string>"
}
],
"validUntil": "<string>",
"credentialSchema": [
{
"id": "<string>",
"type": "<string>"
}
]
}{
"@context": [
"<string>"
],
"id": "<string>",
"type": [
"<string>"
],
"issuer": "<string>",
"credentialSubject": {
"id": "<string>",
"type": [
"<string>"
],
"achievement": {
"id": "<string>",
"type": [
"<string>"
],
"name": "<string>",
"description": "<string>",
"criteria": {
"narrative": "<string>"
},
"image": {
"id": "<string>",
"type": "<string>",
"caption": "<string>"
},
"achievementType": "<string>",
"creator": {
"id": "<string>",
"type": [
"<string>"
],
"name": "<string>",
"url": "<string>",
"email": "<string>",
"phone": "<string>",
"address": "<string>"
}
},
"identifier": [
{
"type": "<string>",
"identityHash": "<string>",
"identityType": "<string>",
"hashed": true
}
]
},
"validFrom": "<string>",
"name": "<string>",
"description": "<string>",
"image": {
"id": "<string>",
"type": "<string>",
"caption": "<string>"
},
"proof": [
{
"type": "<string>",
"cryptosuite": "<string>",
"created": "<string>",
"proofPurpose": "<string>",
"verificationMethod": "<string>",
"proofValue": "<string>"
}
],
"validUntil": "<string>",
"credentialSchema": [
{
"id": "<string>",
"type": "<string>"
}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "invaliddata"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "unauthorisedrequest"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "forbidden"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "unknownobject"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "invaliddata"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "server_busy"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "internal_server_error"
}
]
},
"imsx_error_details": [
{}
]
}Upsert a Verifiable Open Badge Credential
Upserts (creates or updates) a Verifiable Open Badge Credential. This endpoint follows the Open Badges 3.0 specification for credential upsert operations. A credential is considered the same as another when both the issuer.id and the credential.id are equal.
- If a credential with the same issuer.id and credential.id already exists, it will be updated (HTTP 200)
- If no matching credential is found, a new credential will be created (HTTP 201)
The platform acts as the repository for these credentials, ensuring their authenticity and integrity through cryptographic proofs. All upserted credentials must be valid according to the Open Badges 3.0 specification and include proper verification methods.
curl --request POST \
--url https://api.alpha-1edtech.ai/ims/ob/v3p0/credentials/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"@context": [
"<string>"
],
"id": "<string>",
"type": [
"<string>"
],
"issuer": "<string>",
"credentialSubject": {
"id": "<string>",
"type": [
"<string>"
],
"achievement": {
"id": "<string>",
"type": [
"<string>"
],
"name": "<string>",
"description": "<string>",
"criteria": {
"narrative": "<string>"
},
"achievementType": "<string>"
},
"identifier": [
{
"type": "<string>",
"identityHash": "<string>",
"identityType": "<string>",
"hashed": true
}
]
},
"validFrom": "<string>",
"name": "<string>",
"description": "<string>",
"proof": [
{
"type": "<string>",
"cryptosuite": "<string>",
"created": "<string>",
"proofPurpose": "<string>",
"verificationMethod": "<string>",
"proofValue": "<string>"
}
],
"validUntil": "<string>",
"credentialSchema": [
{
"id": "<string>",
"type": "<string>"
}
]
}
'import requests
url = "https://api.alpha-1edtech.ai/ims/ob/v3p0/credentials/"
payload = {
"@context": ["<string>"],
"id": "<string>",
"type": ["<string>"],
"issuer": "<string>",
"credentialSubject": {
"id": "<string>",
"type": ["<string>"],
"achievement": {
"id": "<string>",
"type": ["<string>"],
"name": "<string>",
"description": "<string>",
"criteria": { "narrative": "<string>" },
"achievementType": "<string>"
},
"identifier": [
{
"type": "<string>",
"identityHash": "<string>",
"identityType": "<string>",
"hashed": True
}
]
},
"validFrom": "<string>",
"name": "<string>",
"description": "<string>",
"proof": [
{
"type": "<string>",
"cryptosuite": "<string>",
"created": "<string>",
"proofPurpose": "<string>",
"verificationMethod": "<string>",
"proofValue": "<string>"
}
],
"validUntil": "<string>",
"credentialSchema": [
{
"id": "<string>",
"type": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
'@context': ['<string>'],
id: '<string>',
type: ['<string>'],
issuer: '<string>',
credentialSubject: {
id: '<string>',
type: ['<string>'],
achievement: {
id: '<string>',
type: ['<string>'],
name: '<string>',
description: '<string>',
criteria: {narrative: '<string>'},
achievementType: '<string>'
},
identifier: [
{
type: '<string>',
identityHash: '<string>',
identityType: '<string>',
hashed: true
}
]
},
validFrom: '<string>',
name: '<string>',
description: '<string>',
proof: [
{
type: '<string>',
cryptosuite: '<string>',
created: '<string>',
proofPurpose: '<string>',
verificationMethod: '<string>',
proofValue: '<string>'
}
],
validUntil: '<string>',
credentialSchema: [{id: '<string>', type: '<string>'}]
})
};
fetch('https://api.alpha-1edtech.ai/ims/ob/v3p0/credentials/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.alpha-1edtech.ai/ims/ob/v3p0/credentials/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'@context' => [
'<string>'
],
'id' => '<string>',
'type' => [
'<string>'
],
'issuer' => '<string>',
'credentialSubject' => [
'id' => '<string>',
'type' => [
'<string>'
],
'achievement' => [
'id' => '<string>',
'type' => [
'<string>'
],
'name' => '<string>',
'description' => '<string>',
'criteria' => [
'narrative' => '<string>'
],
'achievementType' => '<string>'
],
'identifier' => [
[
'type' => '<string>',
'identityHash' => '<string>',
'identityType' => '<string>',
'hashed' => true
]
]
],
'validFrom' => '<string>',
'name' => '<string>',
'description' => '<string>',
'proof' => [
[
'type' => '<string>',
'cryptosuite' => '<string>',
'created' => '<string>',
'proofPurpose' => '<string>',
'verificationMethod' => '<string>',
'proofValue' => '<string>'
]
],
'validUntil' => '<string>',
'credentialSchema' => [
[
'id' => '<string>',
'type' => '<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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.alpha-1edtech.ai/ims/ob/v3p0/credentials/"
payload := strings.NewReader("{\n \"@context\": [\n \"<string>\"\n ],\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"issuer\": \"<string>\",\n \"credentialSubject\": {\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"achievement\": {\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"criteria\": {\n \"narrative\": \"<string>\"\n },\n \"achievementType\": \"<string>\"\n },\n \"identifier\": [\n {\n \"type\": \"<string>\",\n \"identityHash\": \"<string>\",\n \"identityType\": \"<string>\",\n \"hashed\": true\n }\n ]\n },\n \"validFrom\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"proof\": [\n {\n \"type\": \"<string>\",\n \"cryptosuite\": \"<string>\",\n \"created\": \"<string>\",\n \"proofPurpose\": \"<string>\",\n \"verificationMethod\": \"<string>\",\n \"proofValue\": \"<string>\"\n }\n ],\n \"validUntil\": \"<string>\",\n \"credentialSchema\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.alpha-1edtech.ai/ims/ob/v3p0/credentials/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"@context\": [\n \"<string>\"\n ],\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"issuer\": \"<string>\",\n \"credentialSubject\": {\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"achievement\": {\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"criteria\": {\n \"narrative\": \"<string>\"\n },\n \"achievementType\": \"<string>\"\n },\n \"identifier\": [\n {\n \"type\": \"<string>\",\n \"identityHash\": \"<string>\",\n \"identityType\": \"<string>\",\n \"hashed\": true\n }\n ]\n },\n \"validFrom\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"proof\": [\n {\n \"type\": \"<string>\",\n \"cryptosuite\": \"<string>\",\n \"created\": \"<string>\",\n \"proofPurpose\": \"<string>\",\n \"verificationMethod\": \"<string>\",\n \"proofValue\": \"<string>\"\n }\n ],\n \"validUntil\": \"<string>\",\n \"credentialSchema\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.alpha-1edtech.ai/ims/ob/v3p0/credentials/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"@context\": [\n \"<string>\"\n ],\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"issuer\": \"<string>\",\n \"credentialSubject\": {\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"achievement\": {\n \"id\": \"<string>\",\n \"type\": [\n \"<string>\"\n ],\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"criteria\": {\n \"narrative\": \"<string>\"\n },\n \"achievementType\": \"<string>\"\n },\n \"identifier\": [\n {\n \"type\": \"<string>\",\n \"identityHash\": \"<string>\",\n \"identityType\": \"<string>\",\n \"hashed\": true\n }\n ]\n },\n \"validFrom\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"proof\": [\n {\n \"type\": \"<string>\",\n \"cryptosuite\": \"<string>\",\n \"created\": \"<string>\",\n \"proofPurpose\": \"<string>\",\n \"verificationMethod\": \"<string>\",\n \"proofValue\": \"<string>\"\n }\n ],\n \"validUntil\": \"<string>\",\n \"credentialSchema\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"@context": [
"<string>"
],
"id": "<string>",
"type": [
"<string>"
],
"issuer": "<string>",
"credentialSubject": {
"id": "<string>",
"type": [
"<string>"
],
"achievement": {
"id": "<string>",
"type": [
"<string>"
],
"name": "<string>",
"description": "<string>",
"criteria": {
"narrative": "<string>"
},
"image": {
"id": "<string>",
"type": "<string>",
"caption": "<string>"
},
"achievementType": "<string>",
"creator": {
"id": "<string>",
"type": [
"<string>"
],
"name": "<string>",
"url": "<string>",
"email": "<string>",
"phone": "<string>",
"address": "<string>"
}
},
"identifier": [
{
"type": "<string>",
"identityHash": "<string>",
"identityType": "<string>",
"hashed": true
}
]
},
"validFrom": "<string>",
"name": "<string>",
"description": "<string>",
"image": {
"id": "<string>",
"type": "<string>",
"caption": "<string>"
},
"proof": [
{
"type": "<string>",
"cryptosuite": "<string>",
"created": "<string>",
"proofPurpose": "<string>",
"verificationMethod": "<string>",
"proofValue": "<string>"
}
],
"validUntil": "<string>",
"credentialSchema": [
{
"id": "<string>",
"type": "<string>"
}
]
}{
"@context": [
"<string>"
],
"id": "<string>",
"type": [
"<string>"
],
"issuer": "<string>",
"credentialSubject": {
"id": "<string>",
"type": [
"<string>"
],
"achievement": {
"id": "<string>",
"type": [
"<string>"
],
"name": "<string>",
"description": "<string>",
"criteria": {
"narrative": "<string>"
},
"image": {
"id": "<string>",
"type": "<string>",
"caption": "<string>"
},
"achievementType": "<string>",
"creator": {
"id": "<string>",
"type": [
"<string>"
],
"name": "<string>",
"url": "<string>",
"email": "<string>",
"phone": "<string>",
"address": "<string>"
}
},
"identifier": [
{
"type": "<string>",
"identityHash": "<string>",
"identityType": "<string>",
"hashed": true
}
]
},
"validFrom": "<string>",
"name": "<string>",
"description": "<string>",
"image": {
"id": "<string>",
"type": "<string>",
"caption": "<string>"
},
"proof": [
{
"type": "<string>",
"cryptosuite": "<string>",
"created": "<string>",
"proofPurpose": "<string>",
"verificationMethod": "<string>",
"proofValue": "<string>"
}
],
"validUntil": "<string>",
"credentialSchema": [
{
"id": "<string>",
"type": "<string>"
}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "invaliddata"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "unauthorisedrequest"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "forbidden"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "unknownobject"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "invaliddata"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "server_busy"
}
]
},
"imsx_error_details": [
{}
]
}{
"imsx_codeMajor": "failure",
"imsx_severity": "error",
"imsx_description": "<string>",
"imsx_CodeMinor": {
"imsx_codeMinorField": [
{
"imsx_codeMinorFieldName": "TargetEndSystem",
"imsx_codeMinorFieldValue": "internal_server_error"
}
]
},
"imsx_error_details": [
{}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Credential successfully updated
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes