Get entity by ID
x-api-key<token>
API key for service authentication
In: header
Path Parameters
idstring
Entity CUID
Response Body
curl -X GET "http://localhost:3000/api/v1/entities/string"
fetch("http://localhost:3000/api/v1/entities/string")
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "http://localhost:3000/api/v1/entities/string"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "http://localhost:3000/api/v1/entities/string"
response = requests.request("GET", url)
print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("http://localhost:3000/api/v1/entities/string"))
.GET()
.build();
try {
HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Response body: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var response = await client.GetAsync("http://localhost:3000/api/v1/entities/string");
var responseBody = await response.Content.ReadAsStringAsync();
{
"id": "ent_1234567890abcdef",
"name": "Acme Validator",
"email": "contact@acme-validator.com",
"organization": "Acme Validator LLC",
"website": "https://acme-validator.com",
"status": "active",
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"lastActivityAt": "2024-01-01T12:30:00.000Z",
"metadata": {
"region": "US-East",
"validatorType": "professional",
"tier": "premium"
},
"totalBids": 1250,
"successfulBids": 425,
"successRate": 0.34,
"activeApiKeys": 3,
"rateLimitUsage": 65.5,
"isActive": true,
"hasApiKeys": true,
"verificationStatus": "verified"
}
{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"details": {
"field": "value",
"constraint": "must be a positive number"
},
"timestamp": "2024-01-01T12:00:00.000Z",
"path": "/api/v1/bids",
"requestId": "req_1234567890abcdef"
}
{
"statusCode": 400,
"message": "Validation failed",
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"details": {
"field": "value",
"constraint": "must be a positive number"
},
"timestamp": "2024-01-01T12:00:00.000Z",
"path": "/api/v1/bids",
"requestId": "req_1234567890abcdef"
}