JavaScript
import Stigg from '@stigg/typescript';
const client = new Stigg({
apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});
const response = await client.v1.entityTypes.archive({ ids: ['team'] });
console.log(response.data);import os
from stigg import Stigg
client = Stigg(
api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted
)
response = client.v1.entity_types.archive(
ids=["team"],
)
print(response.data)package main
import (
"context"
"fmt"
"github.com/stiggio/stigg-go"
"github.com/stiggio/stigg-go/option"
)
func main() {
client := stigg.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.V1.EntityTypes.Archive(context.TODO(), stigg.V1EntityTypeArchiveParams{
IDs: []string{"team"},
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package io.stigg.example;
import io.stigg.client.StiggClient;
import io.stigg.client.okhttp.StiggOkHttpClient;
import io.stigg.models.v1.entitytypes.EntityTypeArchiveParams;
import io.stigg.models.v1.entitytypes.EntityTypeArchiveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
StiggClient client = StiggOkHttpClient.fromEnv();
EntityTypeArchiveParams params = EntityTypeArchiveParams.builder()
.addId("team")
.build();
EntityTypeArchiveResponse response = client.v1().entityTypes().archive(params);
}
}require "stigg"
stigg = Stigg::Client.new(api_key: "My API Key")
response = stigg.v1.entity_types.archive(ids: ["team"])
puts(response)using System;
using Stigg.Client;
using Stigg.Client.Models.V1.EntityTypes;
StiggClient client = new();
EntityTypeArchiveParams parameters = new()
{
Ids =
[
"team"
],
};
var response = await client.V1.EntityTypes.Archive(parameters);
Console.WriteLine(response);stigg v1:entity-types archive \
--api-key 'My API Key' \
--id teamcurl --request POST \
--url https://api.stigg.io/api/v1/entity-types/archive \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"ids": [
"team"
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stigg.io/api/v1/entity-types/archive",
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([
'ids' => [
'team'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"ids": [
"team"
]
}
}{
"message": "<string>",
"code": "BadUserInput",
"reason": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>",
"code": "IdentityForbidden"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Governance Entity Types
Archive entity types
Archives entity types in bulk by id. An entity type with active entities cannot be archived: archive its entities first, or the whole request fails with 400.
POST
/
api
/
v1
/
entity-types
/
archive
JavaScript
import Stigg from '@stigg/typescript';
const client = new Stigg({
apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});
const response = await client.v1.entityTypes.archive({ ids: ['team'] });
console.log(response.data);import os
from stigg import Stigg
client = Stigg(
api_key=os.environ.get("STIGG_API_KEY"), # This is the default and can be omitted
)
response = client.v1.entity_types.archive(
ids=["team"],
)
print(response.data)package main
import (
"context"
"fmt"
"github.com/stiggio/stigg-go"
"github.com/stiggio/stigg-go/option"
)
func main() {
client := stigg.NewClient(
option.WithAPIKey("My API Key"),
)
response, err := client.V1.EntityTypes.Archive(context.TODO(), stigg.V1EntityTypeArchiveParams{
IDs: []string{"team"},
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package io.stigg.example;
import io.stigg.client.StiggClient;
import io.stigg.client.okhttp.StiggOkHttpClient;
import io.stigg.models.v1.entitytypes.EntityTypeArchiveParams;
import io.stigg.models.v1.entitytypes.EntityTypeArchiveResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
StiggClient client = StiggOkHttpClient.fromEnv();
EntityTypeArchiveParams params = EntityTypeArchiveParams.builder()
.addId("team")
.build();
EntityTypeArchiveResponse response = client.v1().entityTypes().archive(params);
}
}require "stigg"
stigg = Stigg::Client.new(api_key: "My API Key")
response = stigg.v1.entity_types.archive(ids: ["team"])
puts(response)using System;
using Stigg.Client;
using Stigg.Client.Models.V1.EntityTypes;
StiggClient client = new();
EntityTypeArchiveParams parameters = new()
{
Ids =
[
"team"
],
};
var response = await client.V1.EntityTypes.Archive(parameters);
Console.WriteLine(response);stigg v1:entity-types archive \
--api-key 'My API Key' \
--id teamcurl --request POST \
--url https://api.stigg.io/api/v1/entity-types/archive \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"ids": [
"team"
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.stigg.io/api/v1/entity-types/archive",
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([
'ids' => [
'team'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"ids": [
"team"
]
}
}{
"message": "<string>",
"code": "BadUserInput",
"reason": "<string>"
}{
"message": "<string>",
"code": "Unauthenticated"
}{
"message": "<string>",
"code": "IdentityForbidden"
}{
"message": "<string>",
"code": "RateLimitExceeded"
}Headers
Body
application/json